chore: update types
This commit is contained in:
parent
6e1f423700
commit
a8de8602b3
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;
|
||||||
|
3
types/callbacks/BundleCallbacks.d.ts
vendored
3
types/callbacks/BundleCallbacks.d.ts
vendored
@ -13,6 +13,9 @@ export declare class BundleCallbacks {
|
|||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||||
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/bundles
|
||||||
|
*/
|
||||||
getBundles(url: string, info: any, sessionID: string): string;
|
getBundles(url: string, info: any, sessionID: string): string;
|
||||||
getBundle(url: string, info: any, sessionID: string): string;
|
getBundle(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
12
types/callbacks/CustomizationCallbacks.d.ts
vendored
12
types/callbacks/CustomizationCallbacks.d.ts
vendored
@ -15,15 +15,21 @@ export declare class CustomizationCallbacks {
|
|||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Handles client/trading/customization/storage
|
* Handle client/trading/customization/storage
|
||||||
* @returns
|
* @returns IGetSuitsResponse
|
||||||
*/
|
*/
|
||||||
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetSuitsResponse>;
|
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetSuitsResponse>;
|
||||||
/**
|
/**
|
||||||
* Handles client/trading/customization
|
* Handle client/trading/customization
|
||||||
* @returns ISuit[]
|
* @returns ISuit[]
|
||||||
*/
|
*/
|
||||||
getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISuit[]>;
|
getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISuit[]>;
|
||||||
|
/**
|
||||||
|
* Handle CustomizationWear event
|
||||||
|
*/
|
||||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle CustomizationBuy event
|
||||||
|
*/
|
||||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
27
types/callbacks/DataCallbacks.d.ts
vendored
27
types/callbacks/DataCallbacks.d.ts
vendored
@ -4,7 +4,6 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|||||||
import { IGlobals } from "../models/eft/common/IGlobals";
|
import { IGlobals } from "../models/eft/common/IGlobals";
|
||||||
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
|
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
|
||||||
import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase";
|
import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase";
|
||||||
import { IQuest } from "../models/eft/common/tables/IQuest";
|
|
||||||
import { IGetItemPricesResponse } from "../models/eft/game/IGetItemPricesResponse";
|
import { IGetItemPricesResponse } from "../models/eft/game/IGetItemPricesResponse";
|
||||||
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
|
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||||
@ -24,42 +23,54 @@ export declare class DataCallbacks {
|
|||||||
protected hideoutController: HideoutController;
|
protected hideoutController: HideoutController;
|
||||||
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, ragfairController: RagfairController, hideoutController: HideoutController);
|
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, ragfairController: RagfairController, hideoutController: HideoutController);
|
||||||
/**
|
/**
|
||||||
* Handles client/settings
|
* Handle client/settings
|
||||||
* @returns ISettingsBase
|
* @returns ISettingsBase
|
||||||
*/
|
*/
|
||||||
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
||||||
/**
|
/**
|
||||||
* Handles client/globals
|
* Handle client/globals
|
||||||
* @returns IGlobals
|
* @returns IGlobals
|
||||||
*/
|
*/
|
||||||
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
||||||
/**
|
/**
|
||||||
* Handles client/items
|
* Handle client/items
|
||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
/**
|
/**
|
||||||
* Handles client/handbook/templates
|
* Handle client/handbook/templates
|
||||||
* @returns IHandbookBase
|
* @returns IHandbookBase
|
||||||
*/
|
*/
|
||||||
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHandbookBase>;
|
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHandbookBase>;
|
||||||
/**
|
/**
|
||||||
* Handles client/customization
|
* Handle client/customization
|
||||||
* @returns Record<string, ICustomizationItem
|
* @returns Record<string, ICustomizationItem
|
||||||
*/
|
*/
|
||||||
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
|
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
|
||||||
/**
|
/**
|
||||||
* Handles client/account/customization
|
* Handle client/account/customization
|
||||||
* @returns string[]
|
* @returns string[]
|
||||||
*/
|
*/
|
||||||
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
|
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
|
||||||
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
/**
|
||||||
|
* Handle client/hideout/settings
|
||||||
|
* @returns IHideoutSettingsBase
|
||||||
|
*/
|
||||||
getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutSettingsBase>;
|
getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutSettingsBase>;
|
||||||
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
||||||
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
||||||
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
||||||
|
/**
|
||||||
|
* Handle client/languages
|
||||||
|
*/
|
||||||
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>;
|
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>;
|
||||||
|
/**
|
||||||
|
* Handle client/menu/locale
|
||||||
|
*/
|
||||||
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||||
|
/**
|
||||||
|
* Handle client/locale
|
||||||
|
*/
|
||||||
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
/**
|
/**
|
||||||
* Handle client/hideout/qte/list
|
* Handle client/hideout/qte/list
|
||||||
|
38
types/callbacks/DialogueCallbacks.d.ts
vendored
38
types/callbacks/DialogueCallbacks.d.ts
vendored
@ -1,7 +1,7 @@
|
|||||||
import { DialogueController } from "../controllers/DialogueController";
|
import { DialogueController } from "../controllers/DialogueController";
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
|
import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
|
||||||
import { IChatServer } from "../models/eft/dialog/IChatServer";
|
import { IChatServer } from "../models/eft/dialog/IChatServer";
|
||||||
import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest";
|
import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest";
|
||||||
import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest";
|
import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest";
|
||||||
@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate {
|
|||||||
protected dialogueController: DialogueController;
|
protected dialogueController: DialogueController;
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
|
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
|
||||||
/**
|
/**
|
||||||
* Handles client/friend/list
|
* Handle client/friend/list
|
||||||
* @returns IGetFriendListDataResponse
|
* @returns IGetFriendListDataResponse
|
||||||
*/
|
*/
|
||||||
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
|
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
|
||||||
/**
|
/**
|
||||||
* Handles client/chatServer/list
|
* Handle client/chatServer/list
|
||||||
* @returns
|
* @returns IChatServer[]
|
||||||
*/
|
*/
|
||||||
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<IChatServer[]>;
|
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<IChatServer[]>;
|
||||||
/** Handle client/mail/dialog/list */
|
/** Handle client/mail/dialog/list */
|
||||||
@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate {
|
|||||||
getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo>;
|
getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo>;
|
||||||
/** Handle client/mail/dialog/remove */
|
/** Handle client/mail/dialog/remove */
|
||||||
removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
/** Handle client/mail/dialog/pin */
|
||||||
pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
/** Handle client/mail/dialog/unpin */
|
||||||
unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
/** Handle client/mail/dialog/read */
|
||||||
setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
/**
|
/**
|
||||||
* Handles client/mail/dialog/getAllAttachments
|
* Handle client/mail/dialog/getAllAttachments
|
||||||
* @returns IGetAllAttachmentsResponse
|
* @returns IGetAllAttachmentsResponse
|
||||||
*/
|
*/
|
||||||
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>;
|
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>;
|
||||||
|
/** Handle client/mail/msg/send */
|
||||||
|
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<string>;
|
||||||
/** Handle client/friend/request/list/outbox */
|
/** Handle client/friend/request/list/outbox */
|
||||||
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
/**
|
||||||
|
* Handle client/friend/request/list/inbox
|
||||||
|
*/
|
||||||
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
/**
|
||||||
|
* Handle client/friend/request/send
|
||||||
|
*/
|
||||||
sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData<IFriendRequestSendResponse>;
|
sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData<IFriendRequestSendResponse>;
|
||||||
|
/**
|
||||||
|
* Handle client/friend/request/accept
|
||||||
|
*/
|
||||||
acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
||||||
|
/**
|
||||||
|
* Handle client/friend/request/cancel
|
||||||
|
*/
|
||||||
|
cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
||||||
|
/** Handle client/friend/delete */
|
||||||
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
||||||
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
|
/** Handle client/friend/ignore/set */
|
||||||
|
ignoreFriend(url: string, request: {
|
||||||
|
uid: string;
|
||||||
|
}, sessionID: string): any;
|
||||||
|
/** Handle client/friend/ignore/remove */
|
||||||
|
unIgnoreFriend(url: string, request: {
|
||||||
|
uid: string;
|
||||||
|
}, sessionID: string): any;
|
||||||
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
|
17
types/callbacks/GameCallbacks.d.ts
vendored
17
types/callbacks/GameCallbacks.d.ts
vendored
@ -1,6 +1,8 @@
|
|||||||
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 { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
||||||
import { IGameKeepAliveResponse } from "../models/eft/game/IGameKeepAliveResponse";
|
import { IGameKeepAliveResponse } from "../models/eft/game/IGameKeepAliveResponse";
|
||||||
@ -14,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
|
||||||
@ -41,8 +45,17 @@ declare class GameCallbacks {
|
|||||||
* @returns IGameConfigResponse
|
* @returns IGameConfigResponse
|
||||||
*/
|
*/
|
||||||
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
|
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
|
||||||
|
/**
|
||||||
|
* Handle client/server/list
|
||||||
|
*/
|
||||||
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
|
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
|
||||||
getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any;
|
/**
|
||||||
|
* Handle client/match/group/current
|
||||||
|
*/
|
||||||
|
getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICurrentGroupResponse>;
|
||||||
|
/**
|
||||||
|
* Handle client/checkVersion
|
||||||
|
*/
|
||||||
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
|
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/keepalive
|
* Handle client/game/keepalive
|
||||||
|
14
types/callbacks/HideoutCallbacks.d.ts
vendored
14
types/callbacks/HideoutCallbacks.d.ts
vendored
@ -23,11 +23,11 @@ export declare class HideoutCallbacks implements OnUpdate {
|
|||||||
constructor(hideoutController: HideoutController, // TODO: delay needed
|
constructor(hideoutController: HideoutController, // TODO: delay needed
|
||||||
configServer: ConfigServer);
|
configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle HideoutUpgrade
|
* Handle HideoutUpgrade event
|
||||||
*/
|
*/
|
||||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle HideoutUpgradeComplete
|
* Handle HideoutUpgradeComplete event
|
||||||
*/
|
*/
|
||||||
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
@ -35,19 +35,19 @@ export declare class HideoutCallbacks implements OnUpdate {
|
|||||||
*/
|
*/
|
||||||
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle HideoutTakeItemsFromAreaSlots
|
* Handle HideoutTakeItemsFromAreaSlots event
|
||||||
*/
|
*/
|
||||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle HideoutToggleArea
|
* Handle HideoutToggleArea event
|
||||||
*/
|
*/
|
||||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle HideoutSingleProductionStart
|
* Handle HideoutSingleProductionStart event
|
||||||
*/
|
*/
|
||||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle HideoutScavCaseProductionStart
|
* Handle HideoutScavCaseProductionStart event
|
||||||
*/
|
*/
|
||||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
@ -55,7 +55,7 @@ export declare class HideoutCallbacks implements OnUpdate {
|
|||||||
*/
|
*/
|
||||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle HideoutTakeProduction
|
* Handle HideoutTakeProduction event
|
||||||
*/
|
*/
|
||||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
1
types/callbacks/InraidCallbacks.d.ts
vendored
1
types/callbacks/InraidCallbacks.d.ts
vendored
@ -12,6 +12,7 @@ export declare class InraidCallbacks {
|
|||||||
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil);
|
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Handle client/location/getLocalloot
|
* Handle client/location/getLocalloot
|
||||||
|
* Store active map in profile + applicationContext
|
||||||
* @param url
|
* @param url
|
||||||
* @param info register player request
|
* @param info register player request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
2
types/callbacks/InsuranceCallbacks.d.ts
vendored
2
types/callbacks/InsuranceCallbacks.d.ts
vendored
@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate {
|
|||||||
*/
|
*/
|
||||||
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
|
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
|
||||||
/**
|
/**
|
||||||
* Handle Insure
|
* Handle Insure event
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
7
types/callbacks/InventoryCallbacks.d.ts
vendored
7
types/callbacks/InventoryCallbacks.d.ts
vendored
@ -21,21 +21,28 @@ 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;
|
||||||
|
/** Handle Swap */
|
||||||
swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
|
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle ReadEncyclopedia */
|
||||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle ApplyInventoryChanges */
|
||||||
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle OpenRandomLootContainer */
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, 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 };
|
||||||
|
3
types/callbacks/LocationCallbacks.d.ts
vendored
3
types/callbacks/LocationCallbacks.d.ts
vendored
@ -9,7 +9,10 @@ export declare class LocationCallbacks {
|
|||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected locationController: LocationController;
|
protected locationController: LocationController;
|
||||||
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
|
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
|
||||||
|
/** Handle client/locations */
|
||||||
getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
|
getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
|
||||||
|
/** Handle client/location/getLocalloot */
|
||||||
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;
|
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;
|
||||||
|
/** Handle client/location/getAirdropLoot */
|
||||||
getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
14
types/callbacks/MatchCallbacks.d.ts
vendored
14
types/callbacks/MatchCallbacks.d.ts
vendored
@ -27,11 +27,14 @@ export declare class MatchCallbacks {
|
|||||||
protected matchController: MatchController;
|
protected matchController: MatchController;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
||||||
|
/** Handle client/match/updatePing */
|
||||||
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
||||||
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
|
/** Handle client/match/group/exit_from_menu */
|
||||||
exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
|
/** Handle client/match/group/invite/send */
|
||||||
sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData<string>;
|
sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData<string>;
|
||||||
/** Handle client/match/group/invite/accept */
|
/** Handle client/match/group/invite/accept */
|
||||||
acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>;
|
acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>;
|
||||||
@ -39,21 +42,32 @@ export declare class MatchCallbacks {
|
|||||||
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>;
|
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>;
|
||||||
/** Handle client/match/group/transfer */
|
/** Handle client/match/group/transfer */
|
||||||
transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData<boolean>;
|
transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData<boolean>;
|
||||||
|
/** Handle client/match/group/invite/cancel-all */
|
||||||
cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
|
/** @deprecated - not called on raid start/end or game start/exit */
|
||||||
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
|
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
|
||||||
|
/** Handle raid/profile/list */
|
||||||
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
||||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
||||||
|
/** Handle match/group/start_game */
|
||||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
|
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
|
||||||
|
/** Handle client/getMetricsConfig */
|
||||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated - not called on raid start/end or game start/exit
|
||||||
* Handle client/match/group/status
|
* Handle client/match/group/status
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
/** Handle client/match/group/create */
|
||||||
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
/** Handle client/match/group/delete */
|
||||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
||||||
|
/** Handle client/match/group/player/remove */
|
||||||
removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData;
|
removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData;
|
||||||
|
/** Handle client/match/offline/end */
|
||||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
|
/** Handle client/raid/configuration */
|
||||||
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;
|
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
||||||
|
3
types/callbacks/NoteCallbacks.d.ts
vendored
3
types/callbacks/NoteCallbacks.d.ts
vendored
@ -5,7 +5,10 @@ import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
|||||||
export declare class NoteCallbacks {
|
export declare class NoteCallbacks {
|
||||||
protected noteController: NoteController;
|
protected noteController: NoteController;
|
||||||
constructor(noteController: NoteController);
|
constructor(noteController: NoteController);
|
||||||
|
/** Handle AddNote event */
|
||||||
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle EditNote event */
|
||||||
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle DeleteNote event */
|
||||||
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
7
types/callbacks/NotifierCallbacks.d.ts
vendored
7
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
|
||||||
@ -18,7 +20,10 @@ export declare class NotifierCallbacks {
|
|||||||
* and the client would abort the connection due to spam.
|
* and the client would abort the connection due to spam.
|
||||||
*/
|
*/
|
||||||
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
||||||
|
/** Handle push/notifier/get */
|
||||||
|
/** Handle push/notifier/getwebsocket */
|
||||||
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
/** Handle client/notifier/channel/create */
|
||||||
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/select
|
* Handle client/game/profile/select
|
||||||
|
18
types/callbacks/PresetBuildCallbacks.d.ts
vendored
18
types/callbacks/PresetBuildCallbacks.d.ts
vendored
@ -4,13 +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);
|
||||||
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
/** Handle client/handbook/builds/my/list */
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IUserBuilds>;
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
/** Handle SaveWeaponBuild event */
|
||||||
|
saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle removeBuild event*/
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
42
types/callbacks/ProfileCallbacks.d.ts
vendored
42
types/callbacks/ProfileCallbacks.d.ts
vendored
@ -20,16 +20,17 @@ export declare class ProfileCallbacks {
|
|||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected profileController: ProfileController;
|
protected profileController: ProfileController;
|
||||||
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController);
|
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController);
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/create
|
||||||
|
*/
|
||||||
createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<any>;
|
createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
/**
|
/**
|
||||||
|
* Handle client/game/profile/list
|
||||||
* Get the complete player profile (scav + pmc character)
|
* Get the complete player profile (scav + pmc character)
|
||||||
* @param url
|
|
||||||
* @param info Empty
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Profile object
|
|
||||||
*/
|
*/
|
||||||
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
||||||
/**
|
/**
|
||||||
|
* Handle client/game/profile/savage/regenerate
|
||||||
* Handle the creation of a scav profile for player
|
* Handle the creation of a scav profile for player
|
||||||
* Occurs post-raid and when profile first created immediately after character details are confirmed by player
|
* Occurs post-raid and when profile first created immediately after character details are confirmed by player
|
||||||
* @param url
|
* @param url
|
||||||
@ -40,33 +41,40 @@ export declare class ProfileCallbacks {
|
|||||||
regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/voice/change event
|
* Handle client/game/profile/voice/change event
|
||||||
* @param url
|
|
||||||
* @param info Change voice request object
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Client response
|
|
||||||
*/
|
*/
|
||||||
changeVoice(url: string, info: IProfileChangeVoiceRequestData, sessionID: string): INullResponseData;
|
changeVoice(url: string, info: IProfileChangeVoiceRequestData, sessionID: string): INullResponseData;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/nickname/change event
|
* Handle client/game/profile/nickname/change event
|
||||||
* Client allows player to adjust their profile name
|
* Client allows player to adjust their profile name
|
||||||
* @param url
|
|
||||||
* @param info Change nickname request object
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns client response
|
|
||||||
*/
|
*/
|
||||||
changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/nickname/validate
|
||||||
|
*/
|
||||||
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/nickname/reserved
|
||||||
|
*/
|
||||||
getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||||
/**
|
/**
|
||||||
|
* Handle client/profile/status
|
||||||
* Called when creating a character when choosing a character face/voice
|
* Called when creating a character when choosing a character face/voice
|
||||||
* @param url
|
|
||||||
* @param info response (empty)
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
*/
|
||||||
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
|
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
|
||||||
|
/**
|
||||||
|
* Handle client/profile/settings
|
||||||
|
*/
|
||||||
getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData<string>;
|
getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData<string>;
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/search
|
||||||
|
*/
|
||||||
searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData<ISearchFriendResponse[]>;
|
searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData<ISearchFriendResponse[]>;
|
||||||
|
/**
|
||||||
|
* Handle launcher/profile/info
|
||||||
|
*/
|
||||||
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
|
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
|
||||||
getAllMiniProfiles(url: string, info: any, sessionID: string): string;
|
/**
|
||||||
|
* Handle /launcher/profiles
|
||||||
|
*/
|
||||||
|
getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
19
types/callbacks/QuestCallbacks.d.ts
vendored
19
types/callbacks/QuestCallbacks.d.ts
vendored
@ -17,17 +17,28 @@ export declare class QuestCallbacks {
|
|||||||
protected questController: QuestController;
|
protected questController: QuestController;
|
||||||
protected repeatableQuestController: RepeatableQuestController;
|
protected repeatableQuestController: RepeatableQuestController;
|
||||||
constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController);
|
constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController);
|
||||||
|
/**
|
||||||
|
* Handle RepeatableQuestChange event
|
||||||
|
*/
|
||||||
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle QuestAccept event
|
||||||
|
*/
|
||||||
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle QuestComplete event
|
||||||
|
*/
|
||||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle QuestHandover event
|
||||||
|
*/
|
||||||
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle client/quest/list
|
* Handle client/quest/list
|
||||||
* @param url
|
|
||||||
* @param info
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
*/
|
||||||
listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
||||||
|
/**
|
||||||
|
* Handle client/repeatalbeQuests/activityPeriods
|
||||||
|
*/
|
||||||
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
|
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
|
||||||
}
|
}
|
||||||
|
17
types/callbacks/RagfairCallbacks.d.ts
vendored
17
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,21 +29,32 @@ 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>;
|
||||||
|
/**
|
||||||
|
* Handle client/ragfair/search
|
||||||
|
* Handle client/ragfair/find
|
||||||
|
*/
|
||||||
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
||||||
|
/** Handle client/ragfair/itemMarketPrice */
|
||||||
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
||||||
|
/** Handle RagFairAddOffer event */
|
||||||
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** \Handle RagFairRemoveOffer event */
|
||||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle RagFairRenewOffer event */
|
||||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle /client/items/prices
|
* Handle /client/items/prices
|
||||||
* Called when clicking an item to list on flea
|
* Called when clicking an item to list on flea
|
||||||
*/
|
*/
|
||||||
getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
|
getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
/** 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;
|
||||||
}
|
}
|
||||||
|
22
types/callbacks/RepairCallbacks.d.ts
vendored
22
types/callbacks/RepairCallbacks.d.ts
vendored
@ -7,19 +7,21 @@ export declare class RepairCallbacks {
|
|||||||
protected repairController: RepairController;
|
protected repairController: RepairController;
|
||||||
constructor(repairController: RepairController);
|
constructor(repairController: RepairController);
|
||||||
/**
|
/**
|
||||||
|
* Handle TraderRepair event
|
||||||
* use trader to repair item
|
* use trader to repair item
|
||||||
* @param pmcData
|
* @param pmcData Player profile
|
||||||
* @param body
|
* @param traderRepairRequest Request object
|
||||||
* @param sessionID
|
* @param sessionID Session id
|
||||||
* @returns
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
traderRepair(pmcData: IPmcData, traderRepairRequest: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Repair event
|
||||||
* Use repair kit to repair item
|
* Use repair kit to repair item
|
||||||
* @param pmcData
|
* @param pmcData Player profile
|
||||||
* @param body
|
* @param repairRequest Request object
|
||||||
* @param sessionID
|
* @param sessionID Session id
|
||||||
* @returns
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
repair(pmcData: IPmcData, repairRequest: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
6
types/callbacks/TradeCallbacks.d.ts
vendored
6
types/callbacks/TradeCallbacks.d.ts
vendored
@ -3,12 +3,16 @@ 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);
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/items/moving TradingConfirm
|
* Handle client/game/profile/items/moving TradingConfirm event
|
||||||
*/
|
*/
|
||||||
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** 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;
|
||||||
}
|
}
|
||||||
|
3
types/callbacks/TraderCallbacks.d.ts
vendored
3
types/callbacks/TraderCallbacks.d.ts
vendored
@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate {
|
|||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
onUpdate(): Promise<boolean>;
|
onUpdate(): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
/** Handle client/trading/api/traderSettings */
|
||||||
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
||||||
|
/** Handle client/trading/api/getTrader */
|
||||||
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
||||||
|
/** Handle client/trading/api/getTraderAssort */
|
||||||
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
||||||
}
|
}
|
||||||
|
2
types/callbacks/WishlistCallbacks.d.ts
vendored
2
types/callbacks/WishlistCallbacks.d.ts
vendored
@ -5,6 +5,8 @@ import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"
|
|||||||
export declare class WishlistCallbacks {
|
export declare class WishlistCallbacks {
|
||||||
protected wishlistController: WishlistController;
|
protected wishlistController: WishlistController;
|
||||||
constructor(wishlistController: WishlistController);
|
constructor(wishlistController: WishlistController);
|
||||||
|
/** Handle AddToWishList event */
|
||||||
addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle RemoveFromWishList event */
|
||||||
removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
5
types/controllers/BotController.d.ts
vendored
5
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);
|
||||||
/**
|
/**
|
||||||
@ -38,6 +40,7 @@ export declare class BotController {
|
|||||||
*/
|
*/
|
||||||
getBotPresetGenerationLimit(type: string): number;
|
getBotPresetGenerationLimit(type: string): number;
|
||||||
/**
|
/**
|
||||||
|
* Handle singleplayer/settings/bot/difficulty
|
||||||
* Get the core.json difficulty settings from database\bots
|
* Get the core.json difficulty settings from database\bots
|
||||||
* @returns IBotCore
|
* @returns IBotCore
|
||||||
*/
|
*/
|
||||||
@ -69,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;
|
||||||
}
|
}
|
||||||
|
11
types/controllers/CustomizationController.d.ts
vendored
11
types/controllers/CustomizationController.d.ts
vendored
@ -28,9 +28,13 @@ export declare class CustomizationController {
|
|||||||
* @returns ISuit array
|
* @returns ISuit array
|
||||||
*/
|
*/
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
/** Equip one to many clothing items to player */
|
/**
|
||||||
|
* Handle CustomizationWear event
|
||||||
|
* Equip one to many clothing items to player
|
||||||
|
*/
|
||||||
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle CustomizationBuy event
|
||||||
* Purchase/unlock a clothing item from a trader
|
* Purchase/unlock a clothing item from a trader
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param buyClothingRequest Request object
|
* @param buyClothingRequest Request object
|
||||||
@ -42,8 +46,8 @@ export declare class CustomizationController {
|
|||||||
/**
|
/**
|
||||||
* Has an outfit been purchased by a player
|
* Has an outfit been purchased by a player
|
||||||
* @param suitId clothing id
|
* @param suitId clothing id
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id of profile to check for clothing in
|
||||||
* @returns true if purchased already
|
* @returns true if already purchased
|
||||||
*/
|
*/
|
||||||
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
||||||
/**
|
/**
|
||||||
@ -60,7 +64,6 @@ export declare class CustomizationController {
|
|||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param clothingItem Clothing item purchased
|
* @param clothingItem Clothing item purchased
|
||||||
* @param output Client response
|
* @param output Client response
|
||||||
* @returns
|
|
||||||
*/
|
*/
|
||||||
protected payForClothingItem(sessionId: string, pmcData: IPmcData, clothingItem: ClothingItem, output: IItemEventRouterResponse): void;
|
protected payForClothingItem(sessionId: string, pmcData: IPmcData, clothingItem: ClothingItem, output: IItemEventRouterResponse): void;
|
||||||
protected getAllTraderSuits(sessionID: string): ISuit[];
|
protected getAllTraderSuits(sessionID: string): ISuit[];
|
||||||
|
94
types/controllers/DialogueController.d.ts
vendored
94
types/controllers/DialogueController.d.ts
vendored
@ -1,18 +1,43 @@
|
|||||||
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 { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
||||||
import { DialogueInfo, IAkiProfile, IUserDialogInfo, Message } from "../models/eft/profile/IAkiProfile";
|
import { ISendMessageRequest } from "../models/eft/dialog/ISendMessageRequest";
|
||||||
|
import { Dialogue, DialogueInfo, IAkiProfile, IUserDialogInfo, Message } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { MessageType } from "../models/enums/MessageType";
|
||||||
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
|
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 { MailSendService } from "../services/MailSendService";
|
||||||
|
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 saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper);
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
|
protected giftService: GiftService;
|
||||||
|
protected 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 */
|
||||||
update(): void;
|
update(): void;
|
||||||
|
/**
|
||||||
|
* Handle client/friend/list
|
||||||
|
* @returns IGetFriendListDataResponse
|
||||||
|
*/
|
||||||
getFriendList(sessionID: string): IGetFriendListDataResponse;
|
getFriendList(sessionID: string): IGetFriendListDataResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle client/mail/dialog/list
|
||||||
* Create array holding trader dialogs and mail interactions with player
|
* Create array holding trader dialogs and mail interactions with player
|
||||||
* Set the content of the dialogue on the list tab.
|
* Set the content of the dialogue on the list tab.
|
||||||
* @param sessionID Session Id
|
* @param sessionID Session Id
|
||||||
@ -27,15 +52,37 @@ export declare class DialogueController {
|
|||||||
*/
|
*/
|
||||||
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
|
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
|
||||||
/**
|
/**
|
||||||
|
* Get the users involved in a dialog (player + other party)
|
||||||
|
* @param dialog The dialog to check for users
|
||||||
|
* @param messageType What type of message is being sent
|
||||||
|
* @param sessionID Player id
|
||||||
|
* @returns IUserDialogInfo array
|
||||||
|
*/
|
||||||
|
getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[];
|
||||||
|
/**
|
||||||
|
* Handle client/mail/dialog/view
|
||||||
* Handle player clicking 'messenger' and seeing all the messages they've recieved
|
* Handle player clicking 'messenger' and seeing all the messages they've recieved
|
||||||
* Set the content of the dialogue on the details panel, showing all the messages
|
* Set the content of the dialogue on the details panel, showing all the messages
|
||||||
* for the specified dialogue.
|
* for the specified dialogue.
|
||||||
* @param dialogueID Dialog id
|
* @param request Get dialog request
|
||||||
* @param sessionID Session id
|
* @param sessionId Session id
|
||||||
* @returns IGetMailDialogViewResponseData object
|
* @returns IGetMailDialogViewResponseData object
|
||||||
*/
|
*/
|
||||||
generateDialogueView(dialogueID: string, sessionID: string): IGetMailDialogViewResponseData;
|
generateDialogueView(request: IGetMailDialogViewRequestData, sessionId: string): IGetMailDialogViewResponseData;
|
||||||
protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[];
|
/**
|
||||||
|
* Get dialog from player profile, create if doesn't exist
|
||||||
|
* @param profile Player profile
|
||||||
|
* @param request get dialog request (params used when dialog doesnt exist in profile)
|
||||||
|
* @returns Dialogue
|
||||||
|
*/
|
||||||
|
protected getDialogByIdFromProfile(profile: IAkiProfile, request: IGetMailDialogViewRequestData): Dialogue;
|
||||||
|
/**
|
||||||
|
* Get the users involved in a mail between two entities
|
||||||
|
* @param fullProfile Player profile
|
||||||
|
* @param dialogUsers The participants of the mail
|
||||||
|
* @returns IUserDialogInfo array
|
||||||
|
*/
|
||||||
|
protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[];
|
||||||
/**
|
/**
|
||||||
* Get a count of messages with attachments from a particular dialog
|
* Get a count of messages with attachments from a particular dialog
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -49,16 +96,39 @@ 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;
|
||||||
removeDialogue(dialogueID: string, sessionID: string): void;
|
|
||||||
setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void;
|
|
||||||
setRead(dialogueIDs: string[], sessionID: string): void;
|
|
||||||
/**
|
/**
|
||||||
|
* Handle client/mail/dialog/remove
|
||||||
|
* Remove an entire dialog with an entity (trader/user)
|
||||||
|
* @param dialogueId id of the dialog to remove
|
||||||
|
* @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
|
||||||
* 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 */
|
||||||
|
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 getSptFriendData(friendId?: string): IUserDialogInfo;
|
||||||
/**
|
/**
|
||||||
* Get messages from a specific dialog that have items not expired
|
* Get messages from a specific dialog that have items not expired
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
|
75
types/controllers/GameController.d.ts
vendored
75
types/controllers/GameController.d.ts
vendored
@ -8,30 +8,38 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
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";
|
||||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
|
import { IGameKeepAliveResponse } from "../models/eft/game/IGameKeepAliveResponse";
|
||||||
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
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 { 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;
|
||||||
@ -39,14 +47,54 @@ 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 applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected os: any;
|
protected os: any;
|
||||||
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, 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
|
||||||
|
*/
|
||||||
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 */
|
||||||
|
protected adjustMapBotLimits(): void;
|
||||||
|
/**
|
||||||
|
* Handle client/game/config
|
||||||
|
*/
|
||||||
|
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||||
|
/**
|
||||||
|
* Handle client/server/list
|
||||||
|
*/
|
||||||
|
getServer(sessionId: string): IServerDetails[];
|
||||||
|
/**
|
||||||
|
* Handle client/match/group/current
|
||||||
|
*/
|
||||||
|
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
|
||||||
|
/**
|
||||||
|
* Handle client/checkVersion
|
||||||
|
*/
|
||||||
|
getValidGameVersion(sessionId: string): ICheckVersionResponse;
|
||||||
|
/**
|
||||||
|
* Handle client/game/keepalive
|
||||||
|
*/
|
||||||
|
getKeepAlive(sessionId: string): IGameKeepAliveResponse;
|
||||||
/**
|
/**
|
||||||
* BSG have two values for shotgun dispersion, we make sure both have the same value
|
* BSG have two values for shotgun dispersion, we make sure both have the same value
|
||||||
*/
|
*/
|
||||||
@ -56,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
|
||||||
@ -70,6 +119,11 @@ export declare class GameController {
|
|||||||
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
|
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
|
||||||
*/
|
*/
|
||||||
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
|
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
|
||||||
|
/**
|
||||||
|
* Send starting gifts to profile after x days
|
||||||
|
* @param pmcProfile Profile to add gifts to
|
||||||
|
*/
|
||||||
|
protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long
|
* Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long
|
||||||
*/
|
*/
|
||||||
@ -79,11 +133,20 @@ export declare class GameController {
|
|||||||
* @param fullProfile Profile to add mod details to
|
* @param fullProfile Profile to add mod details to
|
||||||
*/
|
*/
|
||||||
protected saveActiveModsToProfile(fullProfile: IAkiProfile): void;
|
protected saveActiveModsToProfile(fullProfile: IAkiProfile): void;
|
||||||
|
/**
|
||||||
|
* Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json
|
||||||
|
*/
|
||||||
|
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
|
||||||
*/
|
*/
|
||||||
@ -93,8 +156,4 @@ export declare class GameController {
|
|||||||
*/
|
*/
|
||||||
protected adjustLabsRaiderSpawnRate(): void;
|
protected adjustLabsRaiderSpawnRate(): void;
|
||||||
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
||||||
getGameConfig(sessionID: string): IGameConfigResponse;
|
|
||||||
getServer(): IServerDetails[];
|
|
||||||
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
|
|
||||||
getValidGameVersion(): ICheckVersionResponse;
|
|
||||||
}
|
}
|
||||||
|
33
types/controllers/HealthController.d.ts
vendored
33
types/controllers/HealthController.d.ts
vendored
@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { PaymentService } from "../services/PaymentService";
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class HealthController {
|
export declare class HealthController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
@ -21,38 +22,42 @@ export declare class HealthController {
|
|||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper);
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
* 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
|
||||||
* 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;
|
||||||
/**
|
/**
|
||||||
@ -62,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;
|
|
||||||
}
|
}
|
||||||
|
42
types/controllers/HideoutController.d.ts
vendored
42
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";
|
||||||
@ -59,6 +61,7 @@ export declare class HideoutController {
|
|||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService);
|
||||||
/**
|
/**
|
||||||
|
* Handle HideoutUpgrade event
|
||||||
* Start a hideout area upgrade
|
* Start a hideout area upgrade
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request upgrade start request
|
* @param request upgrade start request
|
||||||
@ -67,6 +70,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle HideoutUpgradeComplete event
|
||||||
* Complete a hideout area upgrade
|
* Complete a hideout area upgrade
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Completed upgrade request
|
* @param request Completed upgrade request
|
||||||
@ -74,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
|
||||||
@ -84,6 +119,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle HideoutTakeItemsFromAreaSlots event
|
||||||
* Remove item from hideout area and place into player inventory
|
* Remove item from hideout area and place into player inventory
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Take item out of area request
|
* @param request Take item out of area request
|
||||||
@ -102,6 +138,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle HideoutToggleArea event
|
||||||
* Toggle area on/off
|
* Toggle area on/off
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Toggle area request
|
* @param request Toggle area request
|
||||||
@ -110,6 +147,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
toggleArea(pmcData: IPmcData, request: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
toggleArea(pmcData: IPmcData, request: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle HideoutSingleProductionStart event
|
||||||
* Start production for an item from hideout area
|
* Start production for an item from hideout area
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param body Start prodution of single item request
|
* @param body Start prodution of single item request
|
||||||
@ -118,6 +156,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle HideoutScavCaseProductionStart event
|
||||||
* Handles event after clicking 'start' on the scav case hideout page
|
* Handles event after clicking 'start' on the scav case hideout page
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
* @param body client request object
|
* @param body client request object
|
||||||
@ -149,6 +188,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
continuousProductionStart(pmcData: IPmcData, request: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
continuousProductionStart(pmcData: IPmcData, request: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle HideoutTakeProduction event
|
||||||
* Take completed item out of hideout area and place into player inventory
|
* Take completed item out of hideout area and place into player inventory
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Remove production from area request
|
* @param request Remove production from area request
|
||||||
@ -167,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
|
||||||
|
8
types/controllers/InraidController.d.ts
vendored
8
types/controllers/InraidController.d.ts
vendored
@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState";
|
||||||
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
||||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
@ -52,6 +53,7 @@ export declare class InraidController {
|
|||||||
*/
|
*/
|
||||||
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle raid/profile/save
|
||||||
* Save profile state to disk
|
* Save profile state to disk
|
||||||
* Handles pmc/pscav
|
* Handles pmc/pscav
|
||||||
* @param offraidData post-raid request data
|
* @param offraidData post-raid request data
|
||||||
@ -98,14 +100,12 @@ export declare class InraidController {
|
|||||||
* @param statusOnExit exit value from offraidData object
|
* @param statusOnExit exit value from offraidData object
|
||||||
* @returns true if dead
|
* @returns true if dead
|
||||||
*/
|
*/
|
||||||
protected isPlayerDead(statusOnExit: string): boolean;
|
protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean;
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
|
139
types/controllers/InsuranceController.d.ts
vendored
139
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,25 +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;
|
||||||
*/
|
|
||||||
protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean;
|
|
||||||
/**
|
/**
|
||||||
|
* 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 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
|
||||||
* 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
|
||||||
@ -53,10 +166,12 @@ export declare class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* 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;
|
||||||
}
|
}
|
||||||
|
59
types/controllers/InventoryController.d.ts
vendored
59
types/controllers/InventoryController.d.ts
vendored
@ -1,10 +1,11 @@
|
|||||||
|
import { LootGenerator } from "../generators/LootGenerator";
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
|
||||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData";
|
import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData";
|
||||||
import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData";
|
import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData";
|
||||||
@ -37,19 +38,21 @@ export declare class InventoryController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected questHelper: QuestHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected lootGenerator: LootGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
@ -61,41 +64,58 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a event router response with inventory trader message
|
||||||
|
* @param output Item event router response
|
||||||
|
* @returns Item event router response
|
||||||
|
*/
|
||||||
|
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
*/
|
*/
|
||||||
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;
|
||||||
/**
|
|
||||||
* Give Item
|
|
||||||
* its used for "add" item like gifts etc.
|
|
||||||
*/
|
|
||||||
addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse;
|
|
||||||
/**
|
/**
|
||||||
* Handles folding of Weapons
|
* Handles folding of Weapons
|
||||||
*/
|
*/
|
||||||
@ -179,6 +199,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
protected sanitiseMapMarkerText(mapNoteText: string): string;
|
protected sanitiseMapMarkerText(mapNoteText: string): string;
|
||||||
/**
|
/**
|
||||||
|
* Handle OpenRandomLootContainer event
|
||||||
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
|
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
|
||||||
* @param pmcData Profile data
|
* @param pmcData Profile data
|
||||||
* @param body open loot container request data
|
* @param body open loot container request data
|
||||||
|
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[];
|
||||||
}
|
}
|
||||||
|
32
types/controllers/LocationController.d.ts
vendored
32
types/controllers/LocationController.d.ts
vendored
@ -3,9 +3,11 @@ import { LootGenerator } from "../generators/LootGenerator";
|
|||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
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 { 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 { LootItem } from "../models/spt/services/LootItem";
|
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,20 +30,36 @@ 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;
|
||||||
get(location: string): ILocationBase;
|
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||||
generate(name: string): ILocationBase;
|
|
||||||
/**
|
/**
|
||||||
|
* Handle client/location/getLocalloot
|
||||||
|
* Get a location (map) with generated loot data
|
||||||
|
* @param sessionId Player id
|
||||||
|
* @param request Map request to generate
|
||||||
|
* @returns ILocationBase
|
||||||
|
*/
|
||||||
|
get(sessionId: string, request: IGetLocationRequestData): ILocationBase;
|
||||||
|
/**
|
||||||
|
* Generate a maps base location with loot
|
||||||
|
* @param name Map name
|
||||||
|
* @returns ILocationBase
|
||||||
|
*/
|
||||||
|
protected generate(name: string): ILocationBase;
|
||||||
|
/**
|
||||||
|
* Handle client/locations
|
||||||
* Get all maps base location properties without loot data
|
* Get all maps base location properties without loot data
|
||||||
|
* @param sessionId Players Id
|
||||||
* @returns ILocationsGenerateAllResponse
|
* @returns ILocationsGenerateAllResponse
|
||||||
*/
|
*/
|
||||||
generateAll(): ILocationsGenerateAllResponse;
|
generateAll(sessionId: string): ILocationsGenerateAllResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle client/location/getAirdropLoot
|
||||||
* Get loot for an airdop container
|
* Get loot for an airdop container
|
||||||
* Generates it randomly based on config/airdrop.json values
|
* Generates it randomly based on config/airdrop.json values
|
||||||
* @returns Array of LootItem objects
|
* @returns Array of LootItem objects
|
||||||
*/
|
*/
|
||||||
getAirdropLoot(): LootItem[];
|
getAirdropLoot(): IAirdropLootResult;
|
||||||
/**
|
/**
|
||||||
* Randomly pick a type of airdrop loot using weighted values from config
|
* Randomly pick a type of airdrop loot using weighted values from config
|
||||||
* @returns airdrop type value
|
* @returns airdrop type value
|
||||||
|
16
types/controllers/MatchController.d.ts
vendored
16
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,18 +32,23 @@ 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 */
|
||||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||||
|
/** Handle client/match/group/create */
|
||||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||||
|
/** Handle client/match/group/delete */
|
||||||
deleteGroup(info: any): void;
|
deleteGroup(info: any): void;
|
||||||
|
/** Handle match/group/start_game */
|
||||||
joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult;
|
joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult;
|
||||||
|
/** Handle client/match/group/status */
|
||||||
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
||||||
/**
|
/**
|
||||||
* Handle /client/raid/configuration
|
* Handle /client/raid/configuration
|
||||||
* @param request
|
* @param request Raid config request
|
||||||
* @param sessionID
|
* @param sessionID Session id
|
||||||
*/
|
*/
|
||||||
startOfflineRaid(request: IGetRaidConfigurationRequestData, sessionID: string): void;
|
startOfflineRaid(request: IGetRaidConfigurationRequestData, sessionID: string): void;
|
||||||
/**
|
/**
|
||||||
@ -52,9 +57,10 @@ export declare class MatchController {
|
|||||||
* @returns bot difficulty
|
* @returns bot difficulty
|
||||||
*/
|
*/
|
||||||
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
|
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
|
||||||
|
/** Handle client/match/offline/end */
|
||||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void;
|
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void;
|
||||||
/**
|
/**
|
||||||
* Is extract by car
|
* Was extract by car
|
||||||
* @param extractName name of extract
|
* @param extractName name of extract
|
||||||
* @returns true if car extract
|
* @returns true if car extract
|
||||||
*/
|
*/
|
||||||
|
1
types/controllers/NotifierController.d.ts
vendored
1
types/controllers/NotifierController.d.ts
vendored
@ -18,5 +18,6 @@ export declare class NotifierController {
|
|||||||
*/
|
*/
|
||||||
notifyAsync(sessionID: string): Promise<unknown>;
|
notifyAsync(sessionID: string): Promise<unknown>;
|
||||||
getServer(sessionID: string): string;
|
getServer(sessionID: string): string;
|
||||||
|
/** Handle client/notifier/channel/create */
|
||||||
getChannel(sessionID: string): INotifierChannel;
|
getChannel(sessionID: string): INotifierChannel;
|
||||||
}
|
}
|
||||||
|
28
types/controllers/PresetBuildController.d.ts
vendored
28
types/controllers/PresetBuildController.d.ts
vendored
@ -2,17 +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);
|
||||||
getUserBuilds(sessionID: string): WeaponBuild[];
|
/** Handle client/handbook/builds/my/list */
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
getUserBuilds(sessionID: string): IUserBuilds;
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
/** Handle SaveWeaponBuild event */
|
||||||
|
saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
|
/** Handle SaveEquipmentBuild event */
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
52
types/controllers/ProfileController.d.ts
vendored
52
types/controllers/ProfileController.d.ts
vendored
@ -14,40 +14,88 @@ import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateR
|
|||||||
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
|
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
|
||||||
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
|
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
|
||||||
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { MailSendService } from "../services/MailSendService";
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class ProfileController {
|
export declare class ProfileController {
|
||||||
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
||||||
|
/**
|
||||||
|
* Handle /launcher/profiles
|
||||||
|
*/
|
||||||
getMiniProfiles(): IMiniProfile[];
|
getMiniProfiles(): IMiniProfile[];
|
||||||
|
/**
|
||||||
|
* Handle launcher/profile/info
|
||||||
|
*/
|
||||||
getMiniProfile(sessionID: string): any;
|
getMiniProfile(sessionID: string): any;
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/list
|
||||||
|
*/
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
getCompleteProfile(sessionID: string): IPmcData[];
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/create
|
||||||
|
*/
|
||||||
createProfile(info: IProfileCreateRequestData, sessionID: string): void;
|
createProfile(info: IProfileCreateRequestData, sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Delete a profile
|
||||||
|
* @param sessionID Id of profile to delete
|
||||||
|
*/
|
||||||
|
protected deleteProfileBySessionId(sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Iterate over all quests in player profile, inspect rewards for the quests current state (accepted/completed)
|
||||||
|
* and send rewards to them in mail
|
||||||
|
* @param profileDetails Player profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param response Event router response
|
||||||
|
*/
|
||||||
protected givePlayerStartingQuestRewards(profileDetails: IAkiProfile, sessionID: string, response: IItemEventRouterResponse): void;
|
protected givePlayerStartingQuestRewards(profileDetails: IAkiProfile, sessionID: string, response: IItemEventRouterResponse): void;
|
||||||
|
/**
|
||||||
|
* For each trader reset their state to what a level 1 player would see
|
||||||
|
* @param sessionID Session id of profile to reset
|
||||||
|
*/
|
||||||
|
protected resetAllTradersInProfile(sessionID: string): void;
|
||||||
/**
|
/**
|
||||||
* Generate a player scav object
|
* Generate a player scav object
|
||||||
* pmc profile MUST exist first before pscav can be generated
|
* PMC profile MUST exist first before pscav can be generated
|
||||||
* @param sessionID
|
* @param sessionID
|
||||||
* @returns IPmcData object
|
* @returns IPmcData object
|
||||||
*/
|
*/
|
||||||
generatePlayerScav(sessionID: string): IPmcData;
|
generatePlayerScav(sessionID: string): IPmcData;
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/nickname/validate
|
||||||
|
*/
|
||||||
validateNickname(info: IValidateNicknameRequestData, sessionID: string): string;
|
validateNickname(info: IValidateNicknameRequestData, sessionID: string): string;
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/nickname/change event
|
||||||
|
* Client allows player to adjust their profile name
|
||||||
|
*/
|
||||||
changeNickname(info: IProfileChangeNicknameRequestData, sessionID: string): string;
|
changeNickname(info: IProfileChangeNicknameRequestData, sessionID: string): string;
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/voice/change event
|
||||||
|
*/
|
||||||
changeVoice(info: IProfileChangeVoiceRequestData, sessionID: string): void;
|
changeVoice(info: IProfileChangeVoiceRequestData, sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/search
|
||||||
|
*/
|
||||||
getFriends(info: ISearchFriendRequestData, sessionID: string): ISearchFriendResponse[];
|
getFriends(info: ISearchFriendRequestData, sessionID: string): ISearchFriendResponse[];
|
||||||
}
|
}
|
||||||
|
43
types/controllers/QuestController.d.ts
vendored
43
types/controllers/QuestController.d.ts
vendored
@ -3,7 +3,9 @@ import { ItemHelper } from "../helpers/ItemHelper";
|
|||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
|
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";
|
||||||
@ -18,33 +20,54 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
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 { PlayerService } from "../services/PlayerService";
|
import { PlayerService } from "../services/PlayerService";
|
||||||
|
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;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected questConditionHelper: QuestConditionHelper;
|
protected questConditionHelper: QuestConditionHelper;
|
||||||
protected playerService: PlayerService;
|
protected playerService: PlayerService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
|
protected seasonalEventService: SeasonalEventService;
|
||||||
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, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, 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
|
||||||
* Get all quests visible to player
|
* Get all quests visible to player
|
||||||
* Exclude quests with incomplete preconditions (level/loyalty)
|
* Exclude quests with incomplete preconditions (level/loyalty)
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
* @returns array of IQuest
|
* @returns array of IQuest
|
||||||
*/
|
*/
|
||||||
getClientQuests(sessionID: string): IQuest[];
|
getClientQuests(sessionID: string): IQuest[];
|
||||||
|
/**
|
||||||
|
* Does a provided quest have a level requirement equal to or below defined level
|
||||||
|
* @param quest Quest to check
|
||||||
|
* @param playerLevel level of player to test against quest
|
||||||
|
* @returns true if quest can be seen/accepted by player of defined level
|
||||||
|
*/
|
||||||
|
protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean;
|
||||||
|
/**
|
||||||
|
* Should a quest be shown to the player in trader quest screen
|
||||||
|
* @param questId Quest to check
|
||||||
|
* @returns true = show to player
|
||||||
|
*/
|
||||||
|
protected showEventQuestToPlayer(questId: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Is the quest for the opposite side the player is on
|
* Is the quest for the opposite side the player is on
|
||||||
* @param playerSide Player side (usec/bear)
|
* @param playerSide Player side (usec/bear)
|
||||||
@ -52,6 +75,7 @@ export declare class QuestController {
|
|||||||
*/
|
*/
|
||||||
protected questIsForOtherSide(playerSide: string, questId: string): boolean;
|
protected questIsForOtherSide(playerSide: string, questId: string): boolean;
|
||||||
/**
|
/**
|
||||||
|
* Handle QuestAccept event
|
||||||
* Handle the client accepting a quest and starting it
|
* Handle the client accepting a quest and starting it
|
||||||
* Send starting rewards if any to player and
|
* Send starting rewards if any to player and
|
||||||
* Send start notification if any to player
|
* Send start notification if any to player
|
||||||
@ -79,15 +103,23 @@ export declare class QuestController {
|
|||||||
*/
|
*/
|
||||||
protected getRepeatableQuestFromProfile(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData): IRepeatableQuest;
|
protected getRepeatableQuestFromProfile(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData): IRepeatableQuest;
|
||||||
/**
|
/**
|
||||||
|
* Handle QuestComplete event
|
||||||
* Update completed quest in profile
|
* Update completed quest in profile
|
||||||
* Add newly unlocked quests to profile
|
* Add newly unlocked quests to profile
|
||||||
* Also recalculate thier level due to exp rewards
|
* Also recalculate their level due to exp rewards
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param body Completed quest request
|
* @param body Completed quest request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @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
|
||||||
@ -110,15 +142,16 @@ 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
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param handoverQuestRequest handover item request
|
* @param handoverQuestRequest handover item request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
37
types/controllers/RagfairController.d.ts
vendored
37
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
|
||||||
@ -120,11 +121,23 @@ export declare class RagfairController {
|
|||||||
/**
|
/**
|
||||||
* List item(s) on flea for sale
|
* List item(s) on flea for sale
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param offerRequest Flea list creatio offer
|
* @param offerRequest Flea list creation offer
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @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;
|
||||||
}
|
}
|
||||||
|
2
types/controllers/RepairController.d.ts
vendored
2
types/controllers/RepairController.d.ts
vendored
@ -23,6 +23,7 @@ export declare class RepairController {
|
|||||||
protected repairConfig: IRepairConfig;
|
protected repairConfig: IRepairConfig;
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService);
|
||||||
/**
|
/**
|
||||||
|
* Handle TraderRepair event
|
||||||
* Repair with trader
|
* Repair with trader
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
* @param body endpoint request data
|
* @param body endpoint request data
|
||||||
@ -31,6 +32,7 @@ export declare class RepairController {
|
|||||||
*/
|
*/
|
||||||
traderRepair(sessionID: string, body: ITraderRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
|
traderRepair(sessionID: string, body: ITraderRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Repair event
|
||||||
* Repair with repair kit
|
* Repair with repair kit
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
* @param body endpoint request data
|
* @param body endpoint request data
|
||||||
|
33
types/controllers/RepeatableQuestController.d.ts
vendored
33
types/controllers/RepeatableQuestController.d.ts
vendored
@ -77,7 +77,7 @@ export declare class RepeatableQuestController {
|
|||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, handbookHelper: HandbookHelper, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, handbookHelper: HandbookHelper, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint
|
* Handle client/repeatalbeQuests/activityPeriods
|
||||||
* Returns an array of objects in the format of repeatable quests to the client.
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
* repeatableQuestObject = {
|
* repeatableQuestObject = {
|
||||||
* id: Unique Id,
|
* id: Unique Id,
|
||||||
@ -113,7 +113,7 @@ export declare class RepeatableQuestController {
|
|||||||
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
||||||
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
||||||
*/
|
*/
|
||||||
generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record<string, TraderInfo>, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record<string, TraderInfo>, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
||||||
/**
|
/**
|
||||||
* Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps
|
* Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps
|
||||||
*/
|
*/
|
||||||
@ -128,7 +128,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {object} a object which contains the base elements for repeatable quests of the requests type
|
* @returns {object} a object which contains the base elements for repeatable quests of the requests type
|
||||||
* (needs to be filled with reward and conditions by called to make a valid quest)
|
* (needs to be filled with reward and conditions by called to make a valid quest)
|
||||||
*/
|
*/
|
||||||
generateRepeatableTemplate(type: string, traderId: string, side: string): IRepeatableQuest;
|
protected generateRepeatableTemplate(type: string, traderId: string, side: string): IRepeatableQuest;
|
||||||
/**
|
/**
|
||||||
* Generates a valid Exploration quest
|
* Generates a valid Exploration quest
|
||||||
*
|
*
|
||||||
@ -138,7 +138,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of quest type format for "Exploration" (see assets/database/templates/repeatableQuests.json)
|
* @returns {object} object of quest type format for "Exploration" (see assets/database/templates/repeatableQuests.json)
|
||||||
*/
|
*/
|
||||||
generateExplorationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IExploration;
|
protected generateExplorationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IExploration;
|
||||||
/**
|
/**
|
||||||
* Generates a valid Completion quest
|
* Generates a valid Completion quest
|
||||||
*
|
*
|
||||||
@ -147,7 +147,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of quest type format for "Completion" (see assets/database/templates/repeatableQuests.json)
|
* @returns {object} object of quest type format for "Completion" (see assets/database/templates/repeatableQuests.json)
|
||||||
*/
|
*/
|
||||||
generateCompletionQuest(pmcLevel: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): ICompletion;
|
protected generateCompletionQuest(pmcLevel: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): ICompletion;
|
||||||
/**
|
/**
|
||||||
* Generates a valid Elimination quest
|
* Generates a valid Elimination quest
|
||||||
*
|
*
|
||||||
@ -157,7 +157,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json)
|
* @returns {object} object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json)
|
||||||
*/
|
*/
|
||||||
generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
|
protected generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
|
||||||
/**
|
/**
|
||||||
* Get the relevant elimination config based on the current players PMC level
|
* Get the relevant elimination config based on the current players PMC level
|
||||||
* @param pmcLevel Level of PMC character
|
* @param pmcLevel Level of PMC character
|
||||||
@ -178,7 +178,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {string} exit The exit name to generate the condition for
|
* @param {string} exit The exit name to generate the condition for
|
||||||
* @returns {object} Exit condition
|
* @returns {object} Exit condition
|
||||||
*/
|
*/
|
||||||
generateExplorationExitCondition(exit: Exit): IExplorationCondition;
|
protected generateExplorationExitCondition(exit: Exit): IExplorationCondition;
|
||||||
/**
|
/**
|
||||||
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
||||||
* This is a helper method for GenerateCompletionQuest to create a completion condition (of which a completion quest theoretically can have many)
|
* This is a helper method for GenerateCompletionQuest to create a completion condition (of which a completion quest theoretically can have many)
|
||||||
@ -187,7 +187,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {integer} value amount of items of this specific type to request
|
* @param {integer} value amount of items of this specific type to request
|
||||||
* @returns {object} object of "Completion"-condition
|
* @returns {object} object of "Completion"-condition
|
||||||
*/
|
*/
|
||||||
generateCompletionAvailableForFinish(targetItemId: string, value: number): ICompletionAvailableFor;
|
protected generateCompletionAvailableForFinish(targetItemId: string, value: number): ICompletionAvailableFor;
|
||||||
/**
|
/**
|
||||||
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
||||||
* This is a helper method for GenerateEliminationQuest to create a location condition.
|
* This is a helper method for GenerateEliminationQuest to create a location condition.
|
||||||
@ -195,7 +195,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {string} location the location on which to fulfill the elimination quest
|
* @param {string} location the location on which to fulfill the elimination quest
|
||||||
* @returns {object} object of "Elimination"-location-subcondition
|
* @returns {object} object of "Elimination"-location-subcondition
|
||||||
*/
|
*/
|
||||||
generateEliminationLocation(location: string[]): IEliminationCondition;
|
protected generateEliminationLocation(location: string[]): IEliminationCondition;
|
||||||
/**
|
/**
|
||||||
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
||||||
* This is a helper method for GenerateEliminationQuest to create a kill condition.
|
* This is a helper method for GenerateEliminationQuest to create a kill condition.
|
||||||
@ -205,7 +205,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {number} distance distance from which to kill (currently only >= supported)
|
* @param {number} distance distance from which to kill (currently only >= supported)
|
||||||
* @returns {object} object of "Elimination"-kill-subcondition
|
* @returns {object} object of "Elimination"-kill-subcondition
|
||||||
*/
|
*/
|
||||||
generateEliminationCondition(target: string, bodyPart: string[], distance: number): IEliminationCondition;
|
protected generateEliminationCondition(target: string, bodyPart: string[], distance: number): IEliminationCondition;
|
||||||
/**
|
/**
|
||||||
* Used to create a quest pool during each cycle of repeatable quest generation. The pool will be subsequently
|
* Used to create a quest pool during each cycle of repeatable quest generation. The pool will be subsequently
|
||||||
* narrowed down during quest generation to avoid duplicate quests. Like duplicate extractions or elimination quests
|
* narrowed down during quest generation to avoid duplicate quests. Like duplicate extractions or elimination quests
|
||||||
@ -214,7 +214,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param pmcLevel level of pmc generating quest pool
|
* @param pmcLevel level of pmc generating quest pool
|
||||||
* @returns IQuestTypePool
|
* @returns IQuestTypePool
|
||||||
*/
|
*/
|
||||||
generateQuestPool(repeatableConfig: IRepeatableQuestConfig, pmcLevel: number): IQuestTypePool;
|
protected generateQuestPool(repeatableConfig: IRepeatableQuestConfig, pmcLevel: number): IQuestTypePool;
|
||||||
/**
|
/**
|
||||||
* Generate the reward for a mission. A reward can consist of
|
* Generate the reward for a mission. A reward can consist of
|
||||||
* - Experience
|
* - Experience
|
||||||
@ -235,7 +235,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
*/
|
*/
|
||||||
generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRewards;
|
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRewards;
|
||||||
/**
|
/**
|
||||||
* Helper to create a reward item structured as required by the client
|
* Helper to create a reward item structured as required by the client
|
||||||
*
|
*
|
||||||
@ -244,9 +244,12 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {integer} index all rewards will be appended to a list, for unkown reasons the client wants the index
|
* @param {integer} index all rewards will be appended to a list, for unkown reasons the client wants the index
|
||||||
* @returns {object} object of "Reward"-item-type
|
* @returns {object} object of "Reward"-item-type
|
||||||
*/
|
*/
|
||||||
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
protected generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
||||||
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
||||||
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
|
protected probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
|
||||||
|
/**
|
||||||
|
* Handle RepeatableQuestChange event
|
||||||
|
*/
|
||||||
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
||||||
@ -260,5 +263,5 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {string} tpl template id of item to check
|
* @param {string} tpl template id of item to check
|
||||||
* @returns boolean: true if item is valid reward
|
* @returns boolean: true if item is valid reward
|
||||||
*/
|
*/
|
||||||
isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
|
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
|
||||||
}
|
}
|
||||||
|
36
types/controllers/TradeController.d.ts
vendored
36
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,22 +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 */
|
||||||
confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** 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 };
|
||||||
|
3
types/controllers/TraderController.d.ts
vendored
3
types/controllers/TraderController.d.ts
vendored
@ -35,6 +35,7 @@ export declare class TraderController {
|
|||||||
*/
|
*/
|
||||||
update(): boolean;
|
update(): boolean;
|
||||||
/**
|
/**
|
||||||
|
* Handle client/trading/api/traderSettings
|
||||||
* Return an array of all traders
|
* Return an array of all traders
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns array if ITraderBase objects
|
* @returns array if ITraderBase objects
|
||||||
@ -47,6 +48,8 @@ export declare class TraderController {
|
|||||||
* @returns 1,-1 or 0
|
* @returns 1,-1 or 0
|
||||||
*/
|
*/
|
||||||
protected sortByTraderId(traderA: ITraderBase, traderB: ITraderBase): number;
|
protected sortByTraderId(traderA: ITraderBase, traderB: ITraderBase): number;
|
||||||
|
/** Handle client/trading/api/getTrader */
|
||||||
getTrader(sessionID: string, traderID: string): ITraderBase;
|
getTrader(sessionID: string, traderID: string): ITraderBase;
|
||||||
|
/** Handle client/trading/api/getTraderAssort */
|
||||||
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
||||||
}
|
}
|
||||||
|
1
types/controllers/WeatherController.d.ts
vendored
1
types/controllers/WeatherController.d.ts
vendored
@ -9,6 +9,7 @@ export declare class WeatherController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected weatherConfig: IWeatherConfig;
|
protected weatherConfig: IWeatherConfig;
|
||||||
constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer);
|
constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer);
|
||||||
|
/** Handle client/weather */
|
||||||
generate(): IWeatherData;
|
generate(): IWeatherData;
|
||||||
/**
|
/**
|
||||||
* Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK)
|
* Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK)
|
||||||
|
2
types/controllers/WishlistController.d.ts
vendored
2
types/controllers/WishlistController.d.ts
vendored
@ -5,6 +5,8 @@ import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"
|
|||||||
export declare class WishlistController {
|
export declare class WishlistController {
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
constructor(eventOutputHolder: EventOutputHolder);
|
constructor(eventOutputHolder: EventOutputHolder);
|
||||||
|
/** Handle AddToWishList */
|
||||||
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle RemoveFromWishList event */
|
||||||
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
4
types/di/Router.d.ts
vendored
4
types/di/Router.d.ts
vendored
@ -2,10 +2,10 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
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";
|
||||||
export declare class Router {
|
export declare class Router {
|
||||||
private handledRoutes;
|
protected handledRoutes: HandledRoute[];
|
||||||
getTopLevelRoute(): string;
|
getTopLevelRoute(): string;
|
||||||
protected getHandledRoutes(): HandledRoute[];
|
protected getHandledRoutes(): HandledRoute[];
|
||||||
private getInternalHandledRoutes;
|
protected getInternalHandledRoutes(): HandledRoute[];
|
||||||
canHandle(url: string, partialMatch?: boolean): boolean;
|
canHandle(url: string, partialMatch?: boolean): boolean;
|
||||||
}
|
}
|
||||||
export declare class StaticRouter extends Router {
|
export declare class StaticRouter extends Router {
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
4
types/generators/BotLevelGenerator.d.ts
vendored
4
types/generators/BotLevelGenerator.d.ts
vendored
@ -1,6 +1,6 @@
|
|||||||
import { MinMax } from "../models/common/MinMax";
|
import { MinMax } from "../models/common/MinMax";
|
||||||
import { IRandomisedBotLevelResult } from "../models/eft/bot/IRandomisedBotLevelResult";
|
import { IRandomisedBotLevelResult } from "../models/eft/bot/IRandomisedBotLevelResult";
|
||||||
import { ExpTable } from "../models/eft/common/IGlobals";
|
import { IExpTable } from "../models/eft/common/IGlobals";
|
||||||
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
@ -25,5 +25,5 @@ export declare class BotLevelGenerator {
|
|||||||
* @param relativeDeltaMax max delta above player level to go
|
* @param relativeDeltaMax max delta above player level to go
|
||||||
* @returns highest level possible for bot
|
* @returns highest level possible for bot
|
||||||
*/
|
*/
|
||||||
protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: ExpTable[]): number;
|
protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number;
|
||||||
}
|
}
|
||||||
|
60
types/generators/BotLootGenerator.d.ts
vendored
60
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;
|
||||||
/**
|
/**
|
||||||
@ -65,22 +89,22 @@ 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;
|
||||||
/**
|
/**
|
||||||
* 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
|
* @returns ITemplateItem object
|
||||||
*/
|
*/
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
* 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
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValue(isPmc: boolean): 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;
|
||||||
@ -89,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;
|
||||||
|
24
types/generators/BotWeaponGenerator.d.ts
vendored
24
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,10 +68,17 @@ 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;
|
||||||
|
/**
|
||||||
|
* Insert a cartridge into a weapon
|
||||||
|
* @param weaponWithModsArray Weapon and mods
|
||||||
|
* @param ammoTpl Cartridge to add to weapon
|
||||||
|
* @param desiredSlotId name of slot, e.g. patron_in_weapon
|
||||||
|
*/
|
||||||
|
protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void;
|
||||||
/**
|
/**
|
||||||
* Create array with weapon base as only element and
|
* Create array with weapon base as only element and
|
||||||
* add additional properties based on weapon type
|
* add additional properties based on weapon type
|
||||||
@ -97,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
|
||||||
|
@ -6,15 +6,17 @@ 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 { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
export declare class FenceBaseAssortGenerator {
|
export declare class FenceBaseAssortGenerator {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Create base fence assorts dynamically and store in db
|
* Create base fence assorts dynamically and store in db
|
||||||
*/
|
*/
|
||||||
|
88
types/generators/LocationGenerator.d.ts
vendored
88
types/generators/LocationGenerator.d.ts
vendored
@ -2,25 +2,35 @@ 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 { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
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 { 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";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
export interface IContainerItem {
|
export interface IContainerItem {
|
||||||
items: Item[];
|
items: Item[];
|
||||||
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,17 +43,72 @@ 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);
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container
|
* Create an array of container objects with randomised loot
|
||||||
* @param containerIn
|
* @param locationBase Map base to generate containers for
|
||||||
* @param staticForced
|
* @param staticAmmoDist Static ammo distribution - database.loot.staticAmmo
|
||||||
* @param staticLootDist
|
* @returns Array of container objects
|
||||||
* @param staticAmmoDist
|
*/
|
||||||
|
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
|
||||||
|
* Handle forced items + seasonal item removal when not in season
|
||||||
|
* @param staticContainer The container itself we will add loot to
|
||||||
|
* @param staticForced Loot we need to force into the container
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param staticAmmoDist staticAmmo.json
|
||||||
* @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(containerIn: 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
|
||||||
|
* @param containerTpl Tpl id of the container
|
||||||
|
* @returns number[][]
|
||||||
|
*/
|
||||||
|
protected getContainerMapping(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Look up a containers itemcountDistribution data and choose an item count based on the found weights
|
||||||
|
* @param containerTypeId Container to get item count for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param locationName Map name (to get per-map multiplier for from config)
|
||||||
|
* @returns item count
|
||||||
|
*/
|
||||||
|
protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>, locationName: string): number;
|
||||||
|
/**
|
||||||
|
* Get all possible loot items that can be placed into a container
|
||||||
|
* Do not add seasonal items if found + current date is inside seasonal event
|
||||||
|
* @param containerTypeId Contianer to get possible loot for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @returns ProbabilityObjectArray of item tpls + probabilty
|
||||||
|
*/
|
||||||
|
protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>): ProbabilityObjectArray<string, number>;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
/**
|
/**
|
||||||
@ -65,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
|
||||||
|
50
types/generators/LootGenerator.d.ts
vendored
50
types/generators/LootGenerator.d.ts
vendored
@ -1,12 +1,18 @@
|
|||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
|
import { IPreset } from "../models/eft/common/IGlobals";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { AddItem } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
|
import { ISealedAirdropContainerSettings, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
import { LootItem } from "../models/spt/services/LootItem";
|
import { LootItem } from "../models/spt/services/LootItem";
|
||||||
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 { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { RagfairLinkedItemService } from "../services/RagfairLinkedItemService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
type ItemLimit = {
|
type ItemLimit = {
|
||||||
@ -19,9 +25,13 @@ export declare class LootGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected ragfairLinkedItemService: RagfairLinkedItemService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService);
|
||||||
/**
|
/**
|
||||||
* Generate a list of items based on configuration options parameter
|
* Generate a list of items based on configuration options parameter
|
||||||
* @param options parameters to adjust how loot is generated
|
* @param options parameters to adjust how loot is generated
|
||||||
@ -61,9 +71,43 @@ export declare class LootGenerator {
|
|||||||
* @param result array to add found preset to
|
* @param result array to add found preset to
|
||||||
* @returns true if preset was valid and added to pool
|
* @returns true if preset was valid and added to pool
|
||||||
*/
|
*/
|
||||||
protected findAndAddRandomPresetToLoot(globalDefaultPresets: [string, Preset][], itemTypeCounts: Record<string, {
|
protected findAndAddRandomPresetToLoot(globalDefaultPresets: [string, IPreset][], itemTypeCounts: Record<string, {
|
||||||
current: number;
|
current: number;
|
||||||
max: number;
|
max: number;
|
||||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||||
|
/**
|
||||||
|
* Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds)
|
||||||
|
* @param containerSettings sealed weapon container settings
|
||||||
|
* @returns Array of items to add to player inventory
|
||||||
|
*/
|
||||||
|
getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): AddItem[];
|
||||||
|
/**
|
||||||
|
* Get non-weapon mod rewards for a sealed container
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param weaponDetailsDb Details for the weapon to reward player
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): AddItem[];
|
||||||
|
/**
|
||||||
|
* Iterate over the container weaponModRewardLimits settings and create an array of weapon mods to reward player
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param linkedItemsToWeapon All items that can be attached/inserted into weapon
|
||||||
|
* @param chosenWeaponPreset The weapon preset given to player as reward
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: IPreset): AddItem[];
|
||||||
|
/**
|
||||||
|
* Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards
|
||||||
|
* @param rewardContainerDetails
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): AddItem[];
|
||||||
|
/**
|
||||||
|
* A bug in inventoryHelper.addItem() means you cannot add the same item to the array twice with a count of 1, it causes duplication
|
||||||
|
* Default adds 1, or increments count
|
||||||
|
* @param itemTplToAdd items tpl we want to add to array
|
||||||
|
* @param resultsArray Array to add item tpl to
|
||||||
|
*/
|
||||||
|
protected addOrIncrementItemToArray(itemTplToAdd: string, resultsArray: AddItem[]): void;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
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
|
||||||
|
6
types/generators/RagfairAssortGenerator.d.ts
vendored
6
types/generators/RagfairAssortGenerator.d.ts
vendored
@ -1,5 +1,5 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { IPreset } from "../models/eft/common/IGlobals";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -36,12 +36,12 @@ export declare class RagfairAssortGenerator {
|
|||||||
* Get presets from globals.json
|
* Get presets from globals.json
|
||||||
* @returns Preset object array
|
* @returns Preset object array
|
||||||
*/
|
*/
|
||||||
protected getPresets(): Preset[];
|
protected getPresets(): IPreset[];
|
||||||
/**
|
/**
|
||||||
* Get default presets from globals.json
|
* Get default presets from globals.json
|
||||||
* @returns Preset object array
|
* @returns Preset object array
|
||||||
*/
|
*/
|
||||||
protected getDefaultPresets(): Preset[];
|
protected getDefaultPresets(): IPreset[];
|
||||||
/**
|
/**
|
||||||
* Create a base assort item and return it with populated values + 999999 stack count + unlimited count = true
|
* Create a base assort item and return it with populated values + 999999 stack count + unlimited count = true
|
||||||
* @param tplId tplid to add to item
|
* @param tplId tplid to add to item
|
||||||
|
72
types/generators/RagfairOfferGenerator.d.ts
vendored
72
types/generators/RagfairOfferGenerator.d.ts
vendored
@ -48,13 +48,34 @@ export declare class RagfairOfferGenerator {
|
|||||||
price: number;
|
price: number;
|
||||||
}[];
|
}[];
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
||||||
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
/**
|
||||||
|
* Create a flea offer and store it in the Ragfair server offers array
|
||||||
|
* @param userID Owner of the offer
|
||||||
|
* @param time Time offer is listed at
|
||||||
|
* @param items Items in the offer
|
||||||
|
* @param barterScheme Cost of item (currency or barter)
|
||||||
|
* @param loyalLevel Loyalty level needed to buy item
|
||||||
|
* @param sellInOnePiece Flags sellInOnePiece to be true
|
||||||
|
* @returns 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()
|
||||||
|
* @param userID Owner of the offer
|
||||||
|
* @param time Time offer is listed at
|
||||||
|
* @param items Items in the offer
|
||||||
|
* @param barterScheme Cost of item (currency or barter)
|
||||||
|
* @param loyalLevel Loyalty level needed to buy item
|
||||||
|
* @param sellInOnePiece Set StackObjectsCount to 1
|
||||||
|
* @returns 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
|
||||||
@ -69,8 +90,18 @@ export declare class RagfairOfferGenerator {
|
|||||||
* @returns count of roubles
|
* @returns count of roubles
|
||||||
*/
|
*/
|
||||||
protected calculateRoublePrice(currencyCount: number, currencyType: string): number;
|
protected calculateRoublePrice(currencyCount: number, currencyType: string): number;
|
||||||
protected getTraderId(userID: string): string;
|
/**
|
||||||
protected getRating(userID: string): number;
|
* Check userId, if its a player, return their pmc _id, otherwise return userId parameter
|
||||||
|
* @param userId Users Id to check
|
||||||
|
* @returns Users Id
|
||||||
|
*/
|
||||||
|
protected getTraderId(userId: string): string;
|
||||||
|
/**
|
||||||
|
* Get a flea trading rating for the passed in user
|
||||||
|
* @param userId User to get flea rating of
|
||||||
|
* @returns Flea rating value
|
||||||
|
*/
|
||||||
|
protected getRating(userId: string): number;
|
||||||
/**
|
/**
|
||||||
* Is the offers user rating growing
|
* Is the offers user rating growing
|
||||||
* @param userID user to check rating of
|
* @param userID user to check rating of
|
||||||
@ -89,15 +120,22 @@ export declare class RagfairOfferGenerator {
|
|||||||
* @param expiredOffers optional, expired offers to regenerate
|
* @param expiredOffers optional, expired offers to regenerate
|
||||||
*/
|
*/
|
||||||
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param assortItemIndex Index of assort item
|
||||||
|
* @param assortItemsToProcess Item array containing index
|
||||||
|
* @param expiredOffers Currently expired offers on flea
|
||||||
|
* @param config Ragfair dynamic config
|
||||||
|
*/
|
||||||
protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise<void>;
|
protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Create one flea offer for a specific item
|
* Create one flea offer for a specific item
|
||||||
* @param items Item to create offer for
|
* @param items Item to create offer for
|
||||||
* @param isPreset Is item a weapon preset
|
* @param isPreset Is item a weapon preset
|
||||||
* @param itemDetails raw db item details
|
* @param itemDetails raw db item details
|
||||||
* @returns
|
* @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
|
||||||
@ -111,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
|
||||||
@ -142,9 +180,9 @@ export declare class RagfairOfferGenerator {
|
|||||||
/**
|
/**
|
||||||
* Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
|
* Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
|
||||||
* @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
|
||||||
@ -156,19 +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[];
|
||||||
/**
|
|
||||||
* Create a flea offer and store it in the Ragfair server offers array
|
|
||||||
* @param userID owner of the offer
|
|
||||||
* @param time time offer is put up
|
|
||||||
* @param items items in the offer
|
|
||||||
* @param barterScheme cost of item (currency or barter)
|
|
||||||
* @param loyalLevel Loyalty level needed to buy item
|
|
||||||
* @param price price of offer
|
|
||||||
* @param sellInOnePiece
|
|
||||||
* @returns Ragfair offer
|
|
||||||
*/
|
|
||||||
createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
|
||||||
}
|
}
|
||||||
|
13
types/generators/ScavCaseRewardGenerator.d.ts
vendored
13
types/generators/ScavCaseRewardGenerator.d.ts
vendored
@ -1,5 +1,6 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { Product } from "../models/eft/common/tables/IBotBase";
|
import { Product } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { Upd } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||||
import { IScavCaseConfig } from "../models/spt/config/IScavCaseConfig";
|
import { IScavCaseConfig } from "../models/spt/config/IScavCaseConfig";
|
||||||
@ -24,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
|
||||||
@ -32,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
|
||||||
@ -78,7 +81,7 @@ export declare class ScavCaseRewardGenerator {
|
|||||||
protected addStackCountToAmmoAndMoney(item: ITemplateItem, resultItem: {
|
protected addStackCountToAmmoAndMoney(item: ITemplateItem, resultItem: {
|
||||||
_id: string;
|
_id: string;
|
||||||
_tpl: string;
|
_tpl: string;
|
||||||
upd: any;
|
upd: Upd;
|
||||||
}, rarity: string): void;
|
}, rarity: string): void;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
8
types/generators/WeatherGenerator.d.ts
vendored
8
types/generators/WeatherGenerator.d.ts
vendored
@ -16,6 +16,11 @@ export declare class WeatherGenerator {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected weatherConfig: IWeatherConfig;
|
protected weatherConfig: IWeatherConfig;
|
||||||
constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Get current + raid datetime and format into correct BSG format and return
|
||||||
|
* @param data Weather data
|
||||||
|
* @returns IWeatherData
|
||||||
|
*/
|
||||||
calculateGameTime(data: IWeatherData): IWeatherData;
|
calculateGameTime(data: IWeatherData): IWeatherData;
|
||||||
/**
|
/**
|
||||||
* Get server uptime seconds multiplied by a multiplier and add to current time as seconds
|
* Get server uptime seconds multiplied by a multiplier and add to current time as seconds
|
||||||
@ -33,7 +38,7 @@ export declare class WeatherGenerator {
|
|||||||
/**
|
/**
|
||||||
* Get current time formatted to fit BSGs requirement
|
* Get current time formatted to fit BSGs requirement
|
||||||
* @param date date to format into bsg style
|
* @param date date to format into bsg style
|
||||||
* @returns
|
* @returns Time formatted in BSG format
|
||||||
*/
|
*/
|
||||||
protected getBSGFormattedTime(date: Date): string;
|
protected getBSGFormattedTime(date: Date): string;
|
||||||
/**
|
/**
|
||||||
@ -47,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;
|
||||||
|
10
types/helpers/AssortHelper.d.ts
vendored
10
types/helpers/AssortHelper.d.ts
vendored
@ -14,12 +14,12 @@ export declare class AssortHelper {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper);
|
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper);
|
||||||
/**
|
/**
|
||||||
* Remove assorts from a trader that have not been unlocked yet
|
* Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest)
|
||||||
* @param pmcProfile player profile
|
* @param pmcProfile Player profile
|
||||||
* @param traderId traders id the assort belongs to
|
* @param traderId Traders id the assort belongs to
|
||||||
* @param traderAssorts All assort items from same trader
|
* @param traderAssorts All assort items from same trader
|
||||||
* @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders
|
* @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete)
|
||||||
* @returns assort items minus locked quest assorts
|
* @returns Assort items minus locked quest assorts
|
||||||
*/
|
*/
|
||||||
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record<string, Record<string, string>>, flea?: boolean): ITraderAssort;
|
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record<string, Record<string, string>>, flea?: boolean): ITraderAssort;
|
||||||
/**
|
/**
|
||||||
|
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
|
||||||
|
32
types/helpers/ContainerHelper.d.ts
vendored
32
types/helpers/ContainerHelper.d.ts
vendored
@ -6,7 +6,35 @@ export declare class FindSlotResult {
|
|||||||
constructor(success?: boolean, x?: any, y?: any, rotation?: boolean);
|
constructor(success?: boolean, x?: any, y?: any, rotation?: boolean);
|
||||||
}
|
}
|
||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
/**
|
||||||
|
* Finds a slot for an item in a given 2D container map
|
||||||
|
* @param container2D Array of container with slots filled/free
|
||||||
|
* @param itemWidth Width of item
|
||||||
|
* @param itemHeight Height of item
|
||||||
|
* @returns Location to place item in container
|
||||||
|
*/
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
/**
|
||||||
|
* Find a slot inside a container an item can be placed in
|
||||||
|
* @param container2D Container to find space in
|
||||||
|
* @param containerX Container x size
|
||||||
|
* @param containerY Container y size
|
||||||
|
* @param x ???
|
||||||
|
* @param y ???
|
||||||
|
* @param itemW Items width
|
||||||
|
* @param itemH Items height
|
||||||
|
* @returns True - slot found
|
||||||
|
*/
|
||||||
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
|
/**
|
||||||
|
* Find a free slot for an item to be placed at
|
||||||
|
* @param container2D Container to palce item in
|
||||||
|
* @param x Container x size
|
||||||
|
* @param y Container y size
|
||||||
|
* @param itemW Items width
|
||||||
|
* @param itemH Items height
|
||||||
|
* @param rotate is item rotated
|
||||||
|
* @returns Location to place item
|
||||||
|
*/
|
||||||
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
22
types/helpers/DialogueHelper.d.ts
vendored
22
types/helpers/DialogueHelper.d.ts
vendored
@ -20,21 +20,13 @@ export declare class DialogueHelper {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||||
/**
|
/**
|
||||||
* Create basic message context template
|
* @deprecated Use MailSendService.sendMessage() or helpers
|
||||||
* @param templateId
|
|
||||||
* @param messageType
|
|
||||||
* @param maxStoreTime
|
|
||||||
* @returns
|
|
||||||
*/
|
*/
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent;
|
||||||
/**
|
/**
|
||||||
* Add a templated message to the dialogue.
|
* @deprecated Use MailSendService.sendMessage() or helpers
|
||||||
* @param dialogueID
|
|
||||||
* @param messageContent
|
|
||||||
* @param sessionID
|
|
||||||
* @param rewards
|
|
||||||
*/
|
*/
|
||||||
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void;
|
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void;
|
||||||
/**
|
/**
|
||||||
* Get the preview contents of the last message in a dialogue.
|
* Get the preview contents of the last message in a dialogue.
|
||||||
* @param dialogue
|
* @param dialogue
|
||||||
@ -49,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>;
|
||||||
}
|
}
|
||||||
|
26
types/helpers/DurabilityLimitsHelper.d.ts
vendored
26
types/helpers/DurabilityLimitsHelper.d.ts
vendored
@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Get max durability for a weapon based on bot role
|
||||||
|
* @param itemTemplate UNUSED - Item to get durability for
|
||||||
|
* @param botRole Role of bot to get max durability for
|
||||||
|
* @returns Max durability of weapon
|
||||||
|
*/
|
||||||
getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||||
|
/**
|
||||||
|
* Get max durability value for armor based on bot role
|
||||||
|
* @param itemTemplate Item to get max durability for
|
||||||
|
* @param botRole Role of bot to get max durability for
|
||||||
|
* @returns max durability
|
||||||
|
*/
|
||||||
getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||||
|
/**
|
||||||
|
* Get randomised current weapon durability by bot role
|
||||||
|
* @param itemTemplate Unused - Item to get current durability of
|
||||||
|
* @param botRole Role of bot to get current durability for
|
||||||
|
* @param maxDurability Max durability of weapon
|
||||||
|
* @returns Current weapon durability
|
||||||
|
*/
|
||||||
getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||||
|
/**
|
||||||
|
* Get randomised current armor durability by bot role
|
||||||
|
* @param itemTemplate Unused - Item to get current durability of
|
||||||
|
* @param botRole Role of bot to get current durability for
|
||||||
|
* @param maxDurability Max durability of armor
|
||||||
|
* @returns Current armor durability
|
||||||
|
*/
|
||||||
getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||||
protected generateMaxWeaponDurability(botRole: string): number;
|
protected generateMaxWeaponDurability(botRole: string): number;
|
||||||
protected generateMaxPmcArmorDurability(itemMaxDurability: number): number;
|
protected generateMaxPmcArmorDurability(itemMaxDurability: number): number;
|
||||||
|
16
types/helpers/HandbookHelper.d.ts
vendored
16
types/helpers/HandbookHelper.d.ts
vendored
@ -14,6 +14,9 @@ export declare class HandbookHelper {
|
|||||||
protected lookupCacheGenerated: boolean;
|
protected lookupCacheGenerated: boolean;
|
||||||
protected handbookPriceCache: LookupCollection;
|
protected handbookPriceCache: LookupCollection;
|
||||||
constructor(databaseServer: DatabaseServer);
|
constructor(databaseServer: DatabaseServer);
|
||||||
|
/**
|
||||||
|
* Create an in-memory cache of all items with associated handbook price in handbookPriceCache class
|
||||||
|
*/
|
||||||
hydrateLookup(): void;
|
hydrateLookup(): void;
|
||||||
/**
|
/**
|
||||||
* Get price from internal cache, if cache empty look up price directly in handbook (expensive)
|
* Get price from internal cache, if cache empty look up price directly in handbook (expensive)
|
||||||
@ -23,18 +26,23 @@ export declare class HandbookHelper {
|
|||||||
*/
|
*/
|
||||||
getTemplatePrice(tpl: string): number;
|
getTemplatePrice(tpl: string): number;
|
||||||
/**
|
/**
|
||||||
* all items in template with the given parent category
|
* Get all items in template with the given parent category
|
||||||
* @param x
|
* @param parentId
|
||||||
* @returns string array
|
* @returns string array
|
||||||
*/
|
*/
|
||||||
templatesWithParent(x: string): string[];
|
templatesWithParent(parentId: string): string[];
|
||||||
/**
|
/**
|
||||||
* Does category exist in handbook cache
|
* Does category exist in handbook cache
|
||||||
* @param category
|
* @param category
|
||||||
* @returns true if exists in cache
|
* @returns true if exists in cache
|
||||||
*/
|
*/
|
||||||
isCategory(category: string): boolean;
|
isCategory(category: string): boolean;
|
||||||
childrenCategories(x: string): string[];
|
/**
|
||||||
|
* Get all items associated with a categories parent
|
||||||
|
* @param categoryParent
|
||||||
|
* @returns string array
|
||||||
|
*/
|
||||||
|
childrenCategories(categoryParent: string): string[];
|
||||||
/**
|
/**
|
||||||
* Convert non-roubles into roubles
|
* Convert non-roubles into roubles
|
||||||
* @param nonRoubleCurrencyCount Currency count to convert
|
* @param nonRoubleCurrencyCount Currency count to convert
|
||||||
|
5
types/helpers/HealthHelper.d.ts
vendored
5
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;
|
||||||
/**
|
/**
|
||||||
@ -53,5 +54,7 @@ export declare class HealthHelper {
|
|||||||
* @param duration How long the effect has left in seconds (-1 by default, no duration).
|
* @param duration How long the effect has left in seconds (-1 by default, no duration).
|
||||||
*/
|
*/
|
||||||
protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: string, duration?: number): void;
|
protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: string, duration?: number): void;
|
||||||
protected isEmpty(map: any): boolean;
|
protected isEmpty(map: Record<string, {
|
||||||
|
Time: number;
|
||||||
|
}>): boolean;
|
||||||
}
|
}
|
||||||
|
60
types/helpers/HideoutHelper.d.ts
vendored
60
types/helpers/HideoutHelper.d.ts
vendored
@ -51,18 +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;
|
||||||
isProductionType(productive: Productive): productive is Production;
|
|
||||||
applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void;
|
|
||||||
/**
|
/**
|
||||||
* TODO:
|
* Is the provided object a Production type
|
||||||
* After looking at the skills there doesnt seem to be a configuration per skill to boost
|
* @param productive
|
||||||
* the XP gain PER skill. I THINK you should be able to put the variable "SkillProgress" (just like health has it)
|
* @returns
|
||||||
* 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;
|
isProductionType(productive: Productive): productive is Production;
|
||||||
|
/**
|
||||||
|
* Apply bonus to player profile given after completing hideout upgrades
|
||||||
|
* @param pmcData Profile to add bonus to
|
||||||
|
* @param bonus Bonus to add to profile
|
||||||
|
*/
|
||||||
|
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
|
||||||
@ -78,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
|
||||||
@ -136,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
|
||||||
@ -148,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
|
||||||
@ -159,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
|
||||||
@ -180,38 +191,39 @@ 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
|
||||||
* @returns coin slot count
|
* @returns coin slot count
|
||||||
*/
|
*/
|
||||||
protected getBTCSlots(pmcData: IPmcData): number;
|
protected getBTCSlots(pmcData: IPmcData): number;
|
||||||
/**
|
|
||||||
* Get a count of bitcoins player miner can hold
|
|
||||||
*/
|
|
||||||
protected getManagementSkillsSlots(): number;
|
|
||||||
/**
|
/**
|
||||||
* Does profile have elite hideout management skill
|
* Does profile have elite hideout management skill
|
||||||
* @param pmcData Profile to look at
|
* @param pmcData Profile to look at
|
||||||
* @returns True if profile has skill
|
* @returns True if profile has skill
|
||||||
*/
|
*/
|
||||||
protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean;
|
protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Get a count of bitcoins player miner can hold
|
||||||
|
*/
|
||||||
|
protected getBitcoinMinerContainerSlotSize(): number;
|
||||||
/**
|
/**
|
||||||
* Get the hideout management skill from player profile
|
* Get the hideout management skill from player profile
|
||||||
* @param pmcData Profile to look at
|
* @param pmcData Profile to look at
|
||||||
* @returns Hideout management skill object
|
* @returns Hideout management skill object
|
||||||
*/
|
*/
|
||||||
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
||||||
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
|
||||||
/**
|
/**
|
||||||
* Get the crafting skill details from player profile
|
* HideoutManagement skill gives a consumption bonus the higher the level
|
||||||
* @param pmcData Player profile
|
* 0.5% per level per 1-51, (25.5% at max)
|
||||||
* @returns crafting skill, null if not found
|
* @param pmcData Profile to get hideout consumption level level from
|
||||||
|
* @returns consumption bonus
|
||||||
*/
|
*/
|
||||||
protected getCraftingSkill(pmcData: IPmcData): Common;
|
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
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -236,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;
|
||||||
|
9
types/helpers/HttpServerHelper.d.ts
vendored
9
types/helpers/HttpServerHelper.d.ts
vendored
@ -16,8 +16,17 @@ export declare class HttpServerHelper {
|
|||||||
};
|
};
|
||||||
constructor(configServer: ConfigServer);
|
constructor(configServer: ConfigServer);
|
||||||
getMimeText(key: string): string;
|
getMimeText(key: string): string;
|
||||||
|
/**
|
||||||
|
* Combine ip and port into url
|
||||||
|
* @returns url
|
||||||
|
*/
|
||||||
buildUrl(): string;
|
buildUrl(): string;
|
||||||
|
/**
|
||||||
|
* Prepend http to the url:port
|
||||||
|
* @returns URI
|
||||||
|
*/
|
||||||
getBackendUrl(): string;
|
getBackendUrl(): string;
|
||||||
|
/** Get websocket url + port */
|
||||||
getWebsocketUrl(): string;
|
getWebsocketUrl(): string;
|
||||||
sendTextJson(resp: any, output: any): void;
|
sendTextJson(resp: any, output: any): void;
|
||||||
}
|
}
|
||||||
|
42
types/helpers/InRaidHelper.d.ts
vendored
42
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);
|
||||||
/**
|
/**
|
||||||
* Should quest items be removed from player inventory on death
|
* 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,12 +65,27 @@ 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;
|
||||||
/**
|
/**
|
||||||
* Take body part effects from client profile and apply to server profile
|
* Take body part effects from client profile and apply to server profile
|
||||||
* @param saveProgressRequest post-raid request
|
* @param saveProgressRequest post-raid request
|
||||||
* @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
|
||||||
@ -79,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
|
||||||
|
79
types/helpers/InventoryHelper.d.ts
vendored
79
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;
|
||||||
@ -53,11 +57,23 @@ export declare class InventoryHelper {
|
|||||||
* @param callback Code to execute later (function)
|
* @param callback Code to execute later (function)
|
||||||
* @param foundInRaid Will results added to inventory be set as found in raid
|
* @param foundInRaid Will results added to inventory be set as found in raid
|
||||||
* @param addUpd Additional upd properties for items being added to inventory
|
* @param addUpd Additional upd properties for items being added to inventory
|
||||||
|
* @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): 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
|
||||||
@ -65,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
|
||||||
@ -75,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;
|
||||||
/**
|
/**
|
||||||
* Remove item from player inventory
|
* Handle Remove event
|
||||||
* @param pmcData Profile to remove item from
|
* Remove item from player inventory + insured items array
|
||||||
|
* 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
|
||||||
@ -99,19 +125,37 @@ export declare class InventoryHelper {
|
|||||||
* @returns Array
|
* @returns Array
|
||||||
*/
|
*/
|
||||||
protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][];
|
protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][];
|
||||||
protected getStashType(sessionID: string): string;
|
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>;
|
||||||
/**
|
/**
|
||||||
* Internal helper function to transfer an item from one profile to another.
|
* Get the players stash items tpl
|
||||||
* fromProfileData: Profile of the source.
|
* @param sessionID Player id
|
||||||
* toProfileData: Profile of the destination.
|
* @returns Stash tpl
|
||||||
* body: Move request
|
*/
|
||||||
*/
|
protected getStashType(sessionID: string): string;
|
||||||
|
/**
|
||||||
|
* Internal helper function to transfer an item from one profile to another.
|
||||||
|
* @param fromItems Inventory of the source (can be non-player)
|
||||||
|
* @param toItems Inventory of the destination
|
||||||
|
* @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
|
||||||
@ -128,6 +172,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns Reward details
|
* @returns Reward details
|
||||||
*/
|
*/
|
||||||
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
||||||
|
getInventoryConfig(): IInventoryConfig;
|
||||||
}
|
}
|
||||||
declare namespace InventoryHelper {
|
declare namespace InventoryHelper {
|
||||||
interface InventoryItemHash {
|
interface InventoryItemHash {
|
||||||
|
91
types/helpers/ItemHelper.d.ts
vendored
91
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
|
||||||
@ -51,11 +52,34 @@ declare class ItemHelper {
|
|||||||
/**
|
/**
|
||||||
* Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
* 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
|
* found in the handbook. If the price can't be found at all return 0
|
||||||
*
|
* @param tpl Item to look price up of
|
||||||
* @param {string} tpl the item template to check
|
* @returns Price in roubles
|
||||||
* @returns {integer} The price of the item or 0 if not found
|
|
||||||
*/
|
*/
|
||||||
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
|
||||||
|
* @param tpl Items tpl id to look up price
|
||||||
|
* @returns Price in roubles (0 if not found)
|
||||||
|
*/
|
||||||
|
getStaticItemPrice(tpl: string): number;
|
||||||
|
/**
|
||||||
|
* Get the dynamic (flea) price in roubles for an item by tpl
|
||||||
|
* @param tpl Items tpl id to look up price
|
||||||
|
* @returns Price in roubles (undefined if not found)
|
||||||
|
*/
|
||||||
|
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.
|
||||||
@ -114,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
|
||||||
@ -153,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
|
||||||
@ -172,28 +190,28 @@ 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)
|
||||||
* @param pmcData
|
* @param pmcData Player profile
|
||||||
* @param items
|
* @param items Items to adjust ID values of
|
||||||
* @param insuredItems insured items to not replace ids for
|
* @param insuredItems insured items to not replace ids for
|
||||||
* @param fastPanel
|
* @param fastPanel
|
||||||
* @returns
|
* @returns Item[]
|
||||||
*/
|
*/
|
||||||
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[];
|
||||||
/**
|
/**
|
||||||
* WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do
|
* WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do
|
||||||
* @param {string} tpl Items tpl to check parents of
|
* @param {string} tpl Items tpl to check parents of
|
||||||
@ -226,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
|
||||||
@ -243,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
|
||||||
|
13
types/helpers/NotifierHelper.d.ts
vendored
13
types/helpers/NotifierHelper.d.ts
vendored
@ -9,9 +9,18 @@ export declare class NotifierHelper {
|
|||||||
protected defaultNotification: INotification;
|
protected defaultNotification: INotification;
|
||||||
constructor(httpServerHelper: HttpServerHelper);
|
constructor(httpServerHelper: HttpServerHelper);
|
||||||
getDefaultNotification(): INotification;
|
getDefaultNotification(): INotification;
|
||||||
/** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */
|
/**
|
||||||
|
* Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside
|
||||||
|
* @param dialogueMessage Message from dialog that was sent
|
||||||
|
* @param ragfairData Ragfair data to attach to notification
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification;
|
createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification;
|
||||||
/** Creates a new notification with the specified dialogueMessage object. */
|
/**
|
||||||
|
* Create a new notification with the specified dialogueMessage object
|
||||||
|
* @param dialogueMessage
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
createNewMessageNotification(dialogueMessage: Message): INotification;
|
createNewMessageNotification(dialogueMessage: Message): INotification;
|
||||||
getWebSocketServer(sessionID: string): string;
|
getWebSocketServer(sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
17
types/helpers/PresetHelper.d.ts
vendored
17
types/helpers/PresetHelper.d.ts
vendored
@ -1,18 +1,23 @@
|
|||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { IPreset } from "../models/eft/common/IGlobals";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class PresetHelper {
|
export declare class PresetHelper {
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected lookup: Record<string, string[]>;
|
protected lookup: Record<string, string[]>;
|
||||||
protected defaultPresets: Record<string, Preset>;
|
protected defaultPresets: Record<string, IPreset>;
|
||||||
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer);
|
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer);
|
||||||
hydratePresetStore(input: Record<string, string[]>): void;
|
hydratePresetStore(input: Record<string, string[]>): void;
|
||||||
getDefaultPresets(): Record<string, Preset>;
|
getDefaultPresets(): Record<string, IPreset>;
|
||||||
isPreset(id: string): boolean;
|
isPreset(id: string): boolean;
|
||||||
hasPreset(templateId: string): boolean;
|
hasPreset(templateId: string): boolean;
|
||||||
getPreset(id: string): Preset;
|
getPreset(id: string): IPreset;
|
||||||
getPresets(templateId: string): Preset[];
|
getPresets(templateId: string): IPreset[];
|
||||||
getDefaultPreset(templateId: string): Preset;
|
/**
|
||||||
|
* 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;
|
||||||
getBaseItemTpl(presetId: string): string;
|
getBaseItemTpl(presetId: string): string;
|
||||||
}
|
}
|
||||||
|
32
types/helpers/ProfileHelper.d.ts
vendored
32
types/helpers/ProfileHelper.d.ts
vendored
@ -1,5 +1,5 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Stats } from "../models/eft/common/tables/IBotBase";
|
import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase";
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
@ -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
|
||||||
@ -68,6 +68,10 @@ export declare class ProfileHelper {
|
|||||||
getFullProfile(sessionID: string): IAkiProfile;
|
getFullProfile(sessionID: string): IAkiProfile;
|
||||||
getPmcProfile(sessionID: string): IPmcData;
|
getPmcProfile(sessionID: string): IPmcData;
|
||||||
getScavProfile(sessionID: string): IPmcData;
|
getScavProfile(sessionID: string): IPmcData;
|
||||||
|
/**
|
||||||
|
* Get baseline counter values for a fresh profile
|
||||||
|
* @returns Stats
|
||||||
|
*/
|
||||||
getDefaultCounters(): Stats;
|
getDefaultCounters(): Stats;
|
||||||
protected isWiped(sessionID: string): boolean;
|
protected isWiped(sessionID: string): boolean;
|
||||||
protected getServerVersion(): string;
|
protected getServerVersion(): string;
|
||||||
@ -77,4 +81,24 @@ export declare class ProfileHelper {
|
|||||||
* @returns profile without secure container
|
* @returns profile without secure container
|
||||||
*/
|
*/
|
||||||
removeSecureContainer(profile: IPmcData): IPmcData;
|
removeSecureContainer(profile: IPmcData): IPmcData;
|
||||||
|
/**
|
||||||
|
* Flag a profile as having received a gift
|
||||||
|
* Store giftid in profile aki object
|
||||||
|
* @param playerId Player to add gift flag to
|
||||||
|
* @param giftId Gift player received
|
||||||
|
*/
|
||||||
|
addGiftReceivedFlagToProfile(playerId: string, giftId: string): void;
|
||||||
|
/**
|
||||||
|
* Check if profile has recieved a gift by id
|
||||||
|
* @param playerId Player profile to check for gift
|
||||||
|
* @param giftId Gift to check for
|
||||||
|
* @returns True if player has recieved gift previously
|
||||||
|
*/
|
||||||
|
playerHasRecievedGift(playerId: string, giftId: string): boolean;
|
||||||
|
/**
|
||||||
|
* Find Stat in profile counters and increment by one
|
||||||
|
* @param counters Counters to search for key
|
||||||
|
* @param keyToIncrement Key
|
||||||
|
*/
|
||||||
|
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
||||||
}
|
}
|
||||||
|
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[];
|
||||||
}
|
}
|
||||||
|
40
types/helpers/QuestHelper.d.ts
vendored
40
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";
|
||||||
@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
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 { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
@ -20,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 {
|
||||||
@ -28,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;
|
||||||
@ -37,9 +40,10 @@ export declare class QuestHelper {
|
|||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
|
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, 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
|
||||||
@ -63,6 +67,7 @@ export declare class QuestHelper {
|
|||||||
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
||||||
/**
|
/**
|
||||||
* Increase skill points of a skill on player profile
|
* Increase skill points of a skill on player profile
|
||||||
|
* Dupe of PlayerService.incrementSkillLevel()
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param skillName Name of skill to increase skill points of
|
* @param skillName Name of skill to increase skill points of
|
||||||
@ -81,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
|
||||||
@ -101,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
|
||||||
@ -157,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
|
||||||
@ -214,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
|
||||||
|
47
types/helpers/RagfairOfferHelper.d.ts
vendored
47
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";
|
||||||
@ -12,10 +13,11 @@ 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 { LocaleService } from "../services/LocaleService";
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
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";
|
||||||
@ -32,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;
|
||||||
@ -42,15 +43,17 @@ export declare class RagfairOfferHelper {
|
|||||||
protected ragfairHelper: RagfairHelper;
|
protected ragfairHelper: RagfairHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
|
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, 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
|
||||||
@ -65,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
|
||||||
@ -110,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
|
||||||
|
36
types/helpers/RagfairServerHelper.d.ts
vendored
36
types/helpers/RagfairServerHelper.d.ts
vendored
@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
import { MailSendService } from "../services/MailSendService";
|
||||||
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";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
import { DialogueHelper } from "./DialogueHelper";
|
import { DialogueHelper } from "./DialogueHelper";
|
||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
|
import { TraderHelper } from "./TraderHelper";
|
||||||
/**
|
/**
|
||||||
* Helper class for common ragfair server actions
|
* Helper class for common ragfair server actions
|
||||||
*/
|
*/
|
||||||
export declare class RagfairServerHelper {
|
export declare class RagfairServerHelper {
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
protected static goodsReturnedTemplate: string;
|
protected static goodsReturnedTemplate: string;
|
||||||
constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Is item valid / on blacklist / quest item
|
* Is item valid / on blacklist / quest item
|
||||||
* @param itemDetails
|
* @param itemDetails
|
||||||
* @returns boolean
|
* @returns boolean
|
||||||
*/
|
*/
|
||||||
isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean;
|
isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean;
|
||||||
protected isItemBlacklisted(itemTemplateId: string): boolean;
|
/**
|
||||||
isTrader(userID: string): boolean;
|
* Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic
|
||||||
isPlayer(userID: string): boolean;
|
* @param itemTemplateId Item tpl to check is blacklisted
|
||||||
returnItems(sessionID: string, items: Item[]): void;
|
* @returns True if its blacklsited
|
||||||
|
*/
|
||||||
|
protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean;
|
||||||
|
/**
|
||||||
|
* is supplied id a trader
|
||||||
|
* @param traderId
|
||||||
|
* @returns True if id was a trader
|
||||||
|
*/
|
||||||
|
isTrader(traderId: string): boolean;
|
||||||
|
/**
|
||||||
|
* Is this user id the logged in player
|
||||||
|
* @param userId Id to test
|
||||||
|
* @returns True is the current player
|
||||||
|
*/
|
||||||
|
isPlayer(userId: string): boolean;
|
||||||
|
/**
|
||||||
|
* Send items back to player
|
||||||
|
* @param sessionID Player to send items to
|
||||||
|
* @param returnedItems Items to send to player
|
||||||
|
*/
|
||||||
|
returnItems(sessionID: string, returnedItems: Item[]): void;
|
||||||
calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number;
|
calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number;
|
||||||
/**
|
/**
|
||||||
* Choose a currency at random with bias
|
* Choose a currency at random with bias
|
||||||
|
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
|
||||||
|
57
types/helpers/TraderHelper.d.ts
vendored
57
types/helpers/TraderHelper.d.ts
vendored
@ -1,5 +1,8 @@
|
|||||||
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 { 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";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -33,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
|
||||||
@ -41,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
|
||||||
@ -64,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
|
||||||
@ -106,4 +122,37 @@ export declare class TraderHelper {
|
|||||||
* @returns Rouble price
|
* @returns Rouble price
|
||||||
*/
|
*/
|
||||||
getHighestSellToTraderPrice(tpl: string): number;
|
getHighestSellToTraderPrice(tpl: string): number;
|
||||||
|
/**
|
||||||
|
* Get a trader enum key by its value
|
||||||
|
* @param traderId Traders id
|
||||||
|
* @returns Traders key
|
||||||
|
*/
|
||||||
|
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
|
||||||
|
3
types/loaders/BundleLoader.d.ts
vendored
3
types/loaders/BundleLoader.d.ts
vendored
@ -15,6 +15,9 @@ export declare class BundleLoader {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected bundles: Record<string, BundleInfo>;
|
protected bundles: Record<string, BundleInfo>;
|
||||||
constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil);
|
constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil);
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/bundles
|
||||||
|
*/
|
||||||
getBundles(local: boolean): BundleInfo[];
|
getBundles(local: boolean): BundleInfo[];
|
||||||
getBundle(key: string, local: boolean): BundleInfo;
|
getBundle(key: string, local: boolean): BundleInfo;
|
||||||
addBundles(modpath: string): void;
|
addBundles(modpath: string): void;
|
||||||
|
8
types/loaders/PreAkiModLoader.d.ts
vendored
8
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,9 +37,10 @@ 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 duplciate mods loaded, show error if duplicate mod found
|
* 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
|
||||||
*/
|
*/
|
||||||
protected checkForDuplicateMods(modPackageData: Record<string, IPackageJsonData>): void;
|
protected checkForDuplicateMods(modPackageData: Record<string, IPackageJsonData>): void;
|
||||||
/**
|
/**
|
||||||
@ -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;
|
||||||
/**
|
/**
|
||||||
|
966
types/models/eft/common/IGlobals.d.ts
vendored
966
types/models/eft/common/IGlobals.d.ts
vendored
File diff suppressed because it is too large
Load Diff
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;
|
||||||
}
|
}
|
||||||
|
41
types/models/eft/common/ILocationBase.d.ts
vendored
41
types/models/eft/common/ILocationBase.d.ts
vendored
@ -1,3 +1,5 @@
|
|||||||
|
import { MinMax } from "../../../models/common/MinMax";
|
||||||
|
import { Ixyz } from "./Ixyz";
|
||||||
export interface ILocationBase {
|
export interface ILocationBase {
|
||||||
AccessKeys: string[];
|
AccessKeys: string[];
|
||||||
AirdropParameters: AirdropParameter[];
|
AirdropParameters: AirdropParameter[];
|
||||||
@ -16,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;
|
||||||
@ -28,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;
|
||||||
@ -35,6 +40,7 @@ export interface ILocationBase {
|
|||||||
IsSecret: boolean;
|
IsSecret: boolean;
|
||||||
Locked: boolean;
|
Locked: boolean;
|
||||||
Loot: any[];
|
Loot: any[];
|
||||||
|
MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[];
|
||||||
MaxBotPerZone: number;
|
MaxBotPerZone: number;
|
||||||
MaxDistToFreePoint: number;
|
MaxDistToFreePoint: number;
|
||||||
MaxPlayers: number;
|
MaxPlayers: number;
|
||||||
@ -44,11 +50,13 @@ 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;
|
||||||
OpenZones: string;
|
OpenZones: string;
|
||||||
Preview: Preview;
|
Preview: Preview;
|
||||||
|
PlayersRequestCount: number;
|
||||||
RequiredPlayerLevel?: number;
|
RequiredPlayerLevel?: number;
|
||||||
RequiredPlayerLevelMin?: number;
|
RequiredPlayerLevelMin?: number;
|
||||||
RequiredPlayerLevelMax?: number;
|
RequiredPlayerLevelMax?: number;
|
||||||
@ -81,9 +89,13 @@ export interface ILocationBase {
|
|||||||
users_summon_seconds: number;
|
users_summon_seconds: number;
|
||||||
waves: Wave[];
|
waves: Wave[];
|
||||||
}
|
}
|
||||||
export interface ILimit {
|
export interface INonWaveGroupScenario {
|
||||||
min: number;
|
Chance: number;
|
||||||
max: number;
|
Enabled: boolean;
|
||||||
|
MaxToBeGroup: number;
|
||||||
|
MinToBeGroup: number;
|
||||||
|
}
|
||||||
|
export interface ILimit extends MinMax {
|
||||||
items: any[];
|
items: any[];
|
||||||
}
|
}
|
||||||
export interface AirdropParameter {
|
export interface AirdropParameter {
|
||||||
@ -140,10 +152,12 @@ export interface BotLocationModifier {
|
|||||||
Scattering: number;
|
Scattering: number;
|
||||||
VisibleDistance: number;
|
VisibleDistance: number;
|
||||||
}
|
}
|
||||||
export interface MinMaxBot {
|
export interface MinMaxBot extends MinMax {
|
||||||
WildSpawnType: WildSpawnType;
|
WildSpawnType: WildSpawnType | string;
|
||||||
max: number;
|
}
|
||||||
min: number;
|
export interface MinPlayerWaitTime {
|
||||||
|
minPlayers: number;
|
||||||
|
time: number;
|
||||||
}
|
}
|
||||||
export interface Preview {
|
export interface Preview {
|
||||||
path: string;
|
path: string;
|
||||||
@ -160,7 +174,7 @@ export interface SpawnPointParam {
|
|||||||
DelayToCanSpawnSec: number;
|
DelayToCanSpawnSec: number;
|
||||||
Id: string;
|
Id: string;
|
||||||
Infiltration: string;
|
Infiltration: string;
|
||||||
Position: xyz;
|
Position: Ixyz;
|
||||||
Rotation: number;
|
Rotation: number;
|
||||||
Sides: string[];
|
Sides: string[];
|
||||||
}
|
}
|
||||||
@ -169,14 +183,9 @@ export interface ColliderParams {
|
|||||||
_props: Props;
|
_props: Props;
|
||||||
}
|
}
|
||||||
export interface Props {
|
export interface Props {
|
||||||
Center: xyz;
|
Center: Ixyz;
|
||||||
Radius: number;
|
Radius: number;
|
||||||
}
|
}
|
||||||
export interface xyz {
|
|
||||||
x: number;
|
|
||||||
y: number;
|
|
||||||
z: number;
|
|
||||||
}
|
|
||||||
export interface Exit {
|
export interface Exit {
|
||||||
Chance: number;
|
Chance: number;
|
||||||
Count: number;
|
Count: number;
|
||||||
@ -208,8 +217,10 @@ 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",
|
||||||
MARKSMAN = "marksman"
|
MARKSMAN = "marksman",
|
||||||
|
PMCBOT = "pmcbot"
|
||||||
}
|
}
|
||||||
|
15
types/models/eft/common/ILooseLoot.d.ts
vendored
15
types/models/eft/common/ILooseLoot.d.ts
vendored
@ -1,3 +1,4 @@
|
|||||||
|
import { Ixyz } from "./Ixyz";
|
||||||
import { Item } from "./tables/IItem";
|
import { Item } from "./tables/IItem";
|
||||||
export interface ILooseLoot {
|
export interface ILooseLoot {
|
||||||
spawnpointCount: SpawnpointCount;
|
spawnpointCount: SpawnpointCount;
|
||||||
@ -15,14 +16,15 @@ 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: Xyz;
|
Position: Ixyz;
|
||||||
Rotation: Xyz;
|
Rotation: Ixyz;
|
||||||
|
IsAlwaysSpawn: boolean;
|
||||||
IsGroupPosition: boolean;
|
IsGroupPosition: boolean;
|
||||||
GroupPositions: any[];
|
GroupPositions: any[];
|
||||||
Root: any;
|
Root: string;
|
||||||
Items: Item[];
|
Items: Item[];
|
||||||
}
|
}
|
||||||
export interface Spawnpoint {
|
export interface Spawnpoint {
|
||||||
@ -31,11 +33,6 @@ export interface Spawnpoint {
|
|||||||
template: SpawnpointTemplate;
|
template: SpawnpointTemplate;
|
||||||
itemDistribution: ItemDistribution[];
|
itemDistribution: ItemDistribution[];
|
||||||
}
|
}
|
||||||
export interface Xyz {
|
|
||||||
x: number;
|
|
||||||
y: number;
|
|
||||||
z: number;
|
|
||||||
}
|
|
||||||
export interface ItemDistribution {
|
export interface ItemDistribution {
|
||||||
composedKey: ComposedKey;
|
composedKey: ComposedKey;
|
||||||
relativeProbability: number;
|
relativeProbability: number;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
5
types/models/eft/common/Ixyz.d.ts
vendored
Normal file
5
types/models/eft/common/Ixyz.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export interface Ixyz {
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
z: number;
|
||||||
|
}
|
33
types/models/eft/common/tables/IBotBase.d.ts
vendored
33
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;
|
||||||
@ -40,6 +42,7 @@ export interface Info {
|
|||||||
Nickname: string;
|
Nickname: string;
|
||||||
LowerNickname: string;
|
LowerNickname: string;
|
||||||
Side: string;
|
Side: string;
|
||||||
|
SquadInviteRestriction: boolean;
|
||||||
Voice: string;
|
Voice: string;
|
||||||
Level: number;
|
Level: number;
|
||||||
Experience: number;
|
Experience: number;
|
||||||
@ -120,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 {
|
||||||
@ -145,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;
|
||||||
@ -266,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;
|
||||||
}
|
}
|
||||||
@ -290,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 {
|
||||||
@ -340,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;
|
||||||
@ -352,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,3 +1,4 @@
|
|||||||
|
import { Ixyz } from "../Ixyz";
|
||||||
export interface ICustomizationItem {
|
export interface ICustomizationItem {
|
||||||
_id: string;
|
_id: string;
|
||||||
_name: string;
|
_name: string;
|
||||||
@ -19,15 +20,10 @@ export interface Props {
|
|||||||
Prefab: Prefab;
|
Prefab: Prefab;
|
||||||
WatchPrefab: Prefab;
|
WatchPrefab: Prefab;
|
||||||
IntegratedArmorVest: boolean;
|
IntegratedArmorVest: boolean;
|
||||||
WatchPosition: Xyz;
|
WatchPosition: Ixyz;
|
||||||
WatchRotation: Xyz;
|
WatchRotation: Ixyz;
|
||||||
}
|
}
|
||||||
export interface Prefab {
|
export interface Prefab {
|
||||||
path: string;
|
path: string;
|
||||||
rcid: string;
|
rcid: string;
|
||||||
}
|
}
|
||||||
export interface Xyz {
|
|
||||||
x: number;
|
|
||||||
y: number;
|
|
||||||
z: number;
|
|
||||||
}
|
|
||||||
|
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