Update types for 3.1.0
This commit is contained in:
parent
add59019b3
commit
d2f5908185
@ -3,12 +3,15 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
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 { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||||
|
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -18,21 +21,21 @@ 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);
|
||||||
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
||||||
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
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;
|
||||||
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
putMetrics(url: string, info: any, sessionID: string): INullResponseData;
|
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
|
||||||
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<any> | IGetBodyResponseData<true>;
|
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
createGroup(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
|
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { PresetBuildController } from "../controllers/PresetBuildController";
|
import { PresetBuildController } from "../controllers/PresetBuildController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
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";
|
||||||
@ -9,7 +10,7 @@ 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: any, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric
|
|||||||
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
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 { 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 { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -36,5 +37,5 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
|||||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
sendReport(url: string, info: any, sessionID: string): INullResponseData;
|
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,29 @@ export declare class HealthController {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
/**
|
||||||
|
* stores in-raid player health
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param info Request data
|
||||||
|
* @param sessionID
|
||||||
|
* @param addEffects Should effects found be added or removed from profile
|
||||||
|
*/
|
||||||
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
||||||
|
/**
|
||||||
|
* When healing in menu
|
||||||
|
* @param pmcData
|
||||||
|
* @param body
|
||||||
|
* @param sessionID
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Occurs on post-raid healing page
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param info Request data from client
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ export declare class InventoryController {
|
|||||||
* @param body response request
|
* @param body response request
|
||||||
* @returns tplid
|
* @returns tplid
|
||||||
*/
|
*/
|
||||||
protected getItemTpl(body: IInventoryExamineRequestData): string;
|
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handles sorting of Inventory.
|
* Handles sorting of Inventory.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
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 { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
@ -23,7 +24,7 @@ export declare class MatchController {
|
|||||||
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||||
getEnabled(): boolean;
|
getEnabled(): boolean;
|
||||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||||
createGroup(sessionID: string, info: any): any;
|
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||||
deleteGroup(info: any): void;
|
deleteGroup(info: any): void;
|
||||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||||
protected getMatch(location: string): any;
|
protected getMatch(location: string): any;
|
||||||
|
@ -31,16 +31,54 @@ export declare class BotGenerator {
|
|||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||||
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
||||||
|
/**
|
||||||
|
* Choose if a bot should become a Pmc by checking if bot type is allowed to become a Pmc in bot config
|
||||||
|
* @param isPlayerScav is a player scav being generated, forces choice returned to never be a pmc
|
||||||
|
*/
|
||||||
|
protected shouldBotBePmc(isPlayerScav: boolean, role: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get a randomised PMC side based on bot config value 'isUsec'
|
||||||
|
* @returns pmc side as string
|
||||||
|
*/
|
||||||
|
protected getRandomisedPmcSide(): string;
|
||||||
|
/**
|
||||||
|
* Get a clone of the database\bots\base.json file
|
||||||
|
* @returns IBotBase object
|
||||||
|
*/
|
||||||
|
protected getCloneOfBotBase(): IBotBase;
|
||||||
protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase;
|
protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase;
|
||||||
|
/**
|
||||||
|
* Log the number of PMCs generated to the debug console
|
||||||
|
*/
|
||||||
|
protected logPmcGeneratedCount(output: IBotBase[]): void;
|
||||||
protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult;
|
protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult;
|
||||||
/** Converts health object to the required format */
|
/**
|
||||||
|
* Converts health object to the required format
|
||||||
|
* @param healthObj health object from bot json
|
||||||
|
* @param playerScav Is a pscav bot being generated
|
||||||
|
* @returns PmcHealth object
|
||||||
|
*/
|
||||||
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
||||||
protected generateSkills(skillsObj: Skills): Skills;
|
protected generateSkills(skillsObj: Skills): Skills;
|
||||||
|
/**
|
||||||
|
* Convert from pmc side (usec/bear) to the side as defined in the bot config (usecType/bearType)
|
||||||
|
* @param pmcSide eft side (usec/bear)
|
||||||
|
* @returns pmc side as defined in config
|
||||||
|
*/
|
||||||
protected getPmcRole(pmcSide: string): string;
|
protected getPmcRole(pmcSide: string): string;
|
||||||
|
/**
|
||||||
|
* Iterate through bots inventory and loot to find and remove christmas items (as defined in GameEventHelper)
|
||||||
|
* @param nodeInventory Bots inventory to iterate over
|
||||||
|
*/
|
||||||
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
||||||
protected generateId(bot: IBotBase): IBotBase;
|
protected generateId(bot: IBotBase): IBotBase;
|
||||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||||
protected getPMCDifficulty(requestedDifficulty: string): string;
|
protected getPMCDifficulty(requestedDifficulty: string): string;
|
||||||
|
/**
|
||||||
|
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
||||||
|
* @param bot bot to add dogtag to
|
||||||
|
* @returns Bot with dogtag added
|
||||||
|
*/
|
||||||
protected generateDogtag(bot: IBotBase): IBotBase;
|
protected generateDogtag(bot: IBotBase): IBotBase;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -9,7 +9,9 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class BotWeaponGenerator {
|
export declare class BotWeaponGenerator {
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -18,7 +20,7 @@ export declare class BotWeaponGenerator {
|
|||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private readonly modMagazineSlotId;
|
private readonly modMagazineSlotId;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
||||||
generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
|
generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
|
||||||
/**
|
/**
|
||||||
* Get the mods necessary to kit out a weapon to its preset level
|
* Get the mods necessary to kit out a weapon to its preset level
|
||||||
|
@ -15,13 +15,37 @@ export declare class HealthHelper {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected healthConfig: IHealthConfig;
|
protected healthConfig: IHealthConfig;
|
||||||
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
|
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Resets the profiles vitality/healh and vitality/effects properties to their defaults
|
||||||
|
* @param sessionID Session Id
|
||||||
|
* @returns updated profile
|
||||||
|
*/
|
||||||
resetVitality(sessionID: string): IAkiProfile;
|
resetVitality(sessionID: string): IAkiProfile;
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
/**
|
||||||
|
* Update player profile with changes from request object
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param info Request object
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param addEffects Should effects be added or removed (default - add)
|
||||||
|
*/
|
||||||
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
||||||
protected saveHealth(pmcData: IPmcData, sessionID: string): void;
|
protected saveHealth(pmcData: IPmcData, sessionID: string): void;
|
||||||
protected saveEffects(pmcData: IPmcData, sessionID: string): void;
|
/**
|
||||||
protected addEffect(pmcData: IPmcData, sessionID: string, effect: {
|
* Save effects to profile
|
||||||
bodyPart: string;
|
* Works by removing all effects and adding them back from profile
|
||||||
effectType: string;
|
* Remoces empty 'Effects' objects if found
|
||||||
}): void;
|
* @param pmcData Player profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param addEffects Should effects be added back to profile
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void;
|
||||||
|
/**
|
||||||
|
* Add effect to body part in profile
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param effectBodyPart body part to edit
|
||||||
|
* @param effectType Effect to add to body part
|
||||||
|
*/
|
||||||
|
protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: string): void;
|
||||||
protected isEmpty(map: any): boolean;
|
protected isEmpty(map: any): boolean;
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,18 @@ export declare class InRaidHelper {
|
|||||||
markFoundItems(pmcData: IPmcData, profile: IPmcData, isPlayerScav: boolean): IPmcData;
|
markFoundItems(pmcData: IPmcData, profile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||||
removeFoundInRaidStatusFromItems(profile: IPmcData): IPmcData;
|
removeFoundInRaidStatusFromItems(profile: IPmcData): IPmcData;
|
||||||
setInventory(sessionID: string, pmcData: IPmcData, profile: IPmcData): IPmcData;
|
setInventory(sessionID: string, pmcData: IPmcData, profile: IPmcData): IPmcData;
|
||||||
|
/**
|
||||||
|
* Clear pmc inventory of all items except those that are exempt
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns Player profile with pmc inventory cleared
|
||||||
|
*/
|
||||||
deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData;
|
deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData;
|
||||||
|
/**
|
||||||
|
* Does the provided items slotId mean its kept on the player after death
|
||||||
|
* @param slotId slotid of item to check
|
||||||
|
* @returns true if item is kept after death
|
||||||
|
*/
|
||||||
|
isItemKeptAfterDeath(slotId: string): boolean;
|
||||||
getPlayerGear(items: Item[]): Item[];
|
getPlayerGear(items: Item[]): Item[];
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
|
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item, Repairable } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -18,7 +18,7 @@ declare class ItemHelper {
|
|||||||
*/
|
*/
|
||||||
isValidItem(tpl: string, invalidBaseTypes?: string[]): boolean;
|
isValidItem(tpl: string, invalidBaseTypes?: string[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Checks if a id is a valid item. Valid meaning that it's an item that may be a reward
|
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
|
||||||
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
||||||
* @param {*} tpl template id of item to check
|
* @param {*} tpl template id of item to check
|
||||||
* @returns boolean: true if item is valid reward
|
* @returns boolean: true if item is valid reward
|
||||||
@ -83,6 +83,11 @@ declare class ItemHelper {
|
|||||||
* @returns {array} The array of StackSlotItems
|
* @returns {array} The array of StackSlotItems
|
||||||
*/
|
*/
|
||||||
generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[];
|
generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[];
|
||||||
|
/**
|
||||||
|
* Gets item data from items.json
|
||||||
|
* @param tpl items template id to look up
|
||||||
|
* @returns bool - is valid + template item object as array
|
||||||
|
*/
|
||||||
getItem(tpl: string): [boolean, ITemplateItem];
|
getItem(tpl: string): [boolean, ITemplateItem];
|
||||||
/**
|
/**
|
||||||
* get normalized value (0-1) based on item condition
|
* get normalized value (0-1) based on item condition
|
||||||
@ -90,24 +95,64 @@ declare class ItemHelper {
|
|||||||
* @returns number between 0 and 1
|
* @returns number between 0 and 1
|
||||||
*/
|
*/
|
||||||
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
|
||||||
|
* @param itemDetails
|
||||||
|
* @param repairable repairable object
|
||||||
|
* @param item
|
||||||
|
* @returns a number between 0 and 1
|
||||||
|
*/
|
||||||
|
protected getRepairableItemQualityValue(itemDetails: ITemplateItem, repairable: Repairable, item: Item): number;
|
||||||
|
/**
|
||||||
|
* Recursive function that looks at every item from parameter and gets their childrens Ids
|
||||||
|
* @param items
|
||||||
|
* @param itemID
|
||||||
|
* @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 baseItemId
|
||||||
|
* @returns An array of Item objects
|
||||||
*/
|
*/
|
||||||
findAndReturnChildrenAsItems(items: Item[], baseItemId: string): Item[];
|
findAndReturnChildrenAsItems(items: Item[], baseItemId: string): Item[];
|
||||||
/**
|
/**
|
||||||
* find children of the item in a given assort (weapons parts for example, need recursive loop function)
|
* Find children of the item in a given assort (weapons parts for example, need recursive loop function)
|
||||||
|
* @param itemIdToFind Template id of item to check for
|
||||||
|
* @param assort Array of items to check in
|
||||||
|
* @returns Array of children of requested item
|
||||||
*/
|
*/
|
||||||
findAndReturnChildrenByAssort(itemIdToFind: string, assort: Item[]): Item[];
|
findAndReturnChildrenByAssort(itemIdToFind: string, assort: Item[]): Item[];
|
||||||
|
/**
|
||||||
|
* Check if the passed in item has buy count restrictions
|
||||||
|
* @param itemToCheck Item to check
|
||||||
|
* @returns true if it has buy restrictions
|
||||||
|
*/
|
||||||
hasBuyRestrictions(itemToCheck: Item): boolean;
|
hasBuyRestrictions(itemToCheck: Item): boolean;
|
||||||
/**
|
/**
|
||||||
* Is Dogtag
|
* is the passed in template id a dog tag
|
||||||
* Checks if an item is a dogtag. Used under profile_f.js to modify preparePrice based
|
* @param tpl Template id to check
|
||||||
* on the level of the 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;
|
isNotSellable(tpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Gets the identifier for a child using slotId, locationX and locationY.
|
||||||
|
* @param item
|
||||||
|
* @returns "slotId OR slotid,locationX,locationY"
|
||||||
|
*/
|
||||||
getChildId(item: Item): string;
|
getChildId(item: Item): string;
|
||||||
|
/**
|
||||||
|
* Can the pased in item be stacked
|
||||||
|
* @param tpl item to check
|
||||||
|
* @returns true if it can be stacked
|
||||||
|
*/
|
||||||
isItemTplStackable(tpl: string): boolean;
|
isItemTplStackable(tpl: string): boolean;
|
||||||
/**
|
/**
|
||||||
* split item stack if it exceeds StackMaxSize
|
* split item stack if it exceeds StackMaxSize
|
||||||
@ -122,10 +167,12 @@ declare class ItemHelper {
|
|||||||
*/
|
*/
|
||||||
findBarterItems(by: string, pmcData: IPmcData, barter_itemID: string): any[];
|
findBarterItems(by: string, pmcData: IPmcData, barter_itemID: string): any[];
|
||||||
/**
|
/**
|
||||||
* @param {Object} pmcData
|
*
|
||||||
* @param {Array} items
|
* @param pmcData
|
||||||
* @param {Object} fastPanel
|
* @param items
|
||||||
* @returns Array
|
* @param insuredItems insured items to not replace ids for
|
||||||
|
* @param fastPanel
|
||||||
|
* @returns
|
||||||
*/
|
*/
|
||||||
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
||||||
/**
|
/**
|
||||||
@ -141,6 +188,12 @@ declare class ItemHelper {
|
|||||||
* @returns boolean
|
* @returns boolean
|
||||||
*/
|
*/
|
||||||
isQuestItem(tpl: string): boolean;
|
isQuestItem(tpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get the inventory size of an item
|
||||||
|
* @param items
|
||||||
|
* @param rootItemId
|
||||||
|
* @returns ItemSize object (width and height)
|
||||||
|
*/
|
||||||
getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize;
|
getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize;
|
||||||
}
|
}
|
||||||
declare namespace ItemHelper {
|
declare namespace ItemHelper {
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class PresetHelper {
|
export declare class PresetHelper {
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected lookup: Record<string, string[]>;
|
protected lookup: Record<string, string[]>;
|
||||||
constructor(databaseServer: DatabaseServer);
|
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer);
|
||||||
hydratePresetStore(input: Record<string, string[]>): void;
|
hydratePresetStore(input: Record<string, string[]>): void;
|
||||||
isPreset(id: string): boolean;
|
isPreset(id: string): boolean;
|
||||||
hasPreset(templateId: string): boolean;
|
hasPreset(templateId: string): boolean;
|
||||||
|
@ -20,6 +20,12 @@ export declare class ProfileHelper {
|
|||||||
resetProfileQuestCondition(sessionID: string, conditionId: string): void;
|
resetProfileQuestCondition(sessionID: string, conditionId: string): void;
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
getCompleteProfile(sessionID: string): IPmcData[];
|
||||||
isNicknameTaken(info: IValidateNicknameRequestData, sessionID: string): boolean;
|
isNicknameTaken(info: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||||
|
/**
|
||||||
|
* Add experience to a PMC inside the players profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param experienceToAdd Experiecne to add to PMC character
|
||||||
|
*/
|
||||||
|
addExperienceToPmc(sessionID: string, experienceToAdd: number): void;
|
||||||
getProfileByPmcId(pmcId: string): IPmcData;
|
getProfileByPmcId(pmcId: string): IPmcData;
|
||||||
getExperience(level: number): number;
|
getExperience(level: number): number;
|
||||||
getMaxLevel(): number;
|
getMaxLevel(): number;
|
||||||
|
@ -75,8 +75,22 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
cleanQuestConditions(quest: IQuest): IQuest;
|
cleanQuestConditions(quest: IQuest): IQuest;
|
||||||
failQuest(pmcData: IPmcData, body: any, sessionID: string): any;
|
failQuest(pmcData: IPmcData, body: any, sessionID: string): any;
|
||||||
|
/**
|
||||||
|
* Get quest by id from database
|
||||||
|
* @param questId questid to look for
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @returns IQuest object
|
||||||
|
*/
|
||||||
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
||||||
getQuestLocaleIdFromDb(messageId: string): string;
|
getQuestLocaleIdFromDb(messageId: string): string;
|
||||||
|
/**
|
||||||
|
* Give player quest rewards - Skills/exp/trader standing/items/assort unlocks
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param body complete quest request
|
||||||
|
* @param state State of the quest now its complete
|
||||||
|
* @param sessionID Seession id
|
||||||
|
* @returns array of reward objects
|
||||||
|
*/
|
||||||
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[];
|
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[];
|
||||||
/**
|
/**
|
||||||
* Get the intel center bonus a player has
|
* Get the intel center bonus a player has
|
||||||
|
@ -35,7 +35,13 @@ 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;
|
||||||
changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void;
|
/**
|
||||||
|
* Alter a traders unlocked status
|
||||||
|
* @param traderID Trader to alter
|
||||||
|
* @param status New status to use
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
|
setTraderUnlockedState(traderID: string, status: boolean, sessionID: string): void;
|
||||||
/**
|
/**
|
||||||
* Get a list of items and their prices from player inventory that can be sold to a trader
|
* Get a list of items and their prices from player inventory that can be sold to a trader
|
||||||
* @param traderID trader id being traded with
|
* @param traderID trader id being traded with
|
||||||
@ -79,7 +85,14 @@ export declare class TraderHelper {
|
|||||||
protected getRawItemPrice(pmcData: IPmcData, item: Item): number;
|
protected getRawItemPrice(pmcData: IPmcData, item: Item): number;
|
||||||
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel, traderID: string): number;
|
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel, traderID: string): number;
|
||||||
/**
|
/**
|
||||||
* Calculate traders level based on exp amount and increment level if over threshold
|
* Add standing to a trader and level them up if exp goes over level threshold
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param traderId traders id
|
||||||
|
* @param standingToAdd Standing value to add to trader
|
||||||
|
*/
|
||||||
|
addStandingToTrader(sessionID: string, traderId: string, standingToAdd: number): void;
|
||||||
|
/**
|
||||||
|
* Calculate traders level based on exp amount and increments level if over threshold
|
||||||
* @param traderID trader to process
|
* @param traderID trader to process
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
*/
|
*/
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { QuestRewardType } from "../../../enums/QuestRewardType";
|
||||||
import { Item } from "./IItem";
|
import { Item } from "./IItem";
|
||||||
export interface IQuest {
|
export interface IQuest {
|
||||||
QuestName: string;
|
QuestName: string;
|
||||||
@ -99,9 +100,9 @@ export interface Rewards {
|
|||||||
Expired: Reward[];
|
Expired: Reward[];
|
||||||
}
|
}
|
||||||
export interface Reward {
|
export interface Reward {
|
||||||
value?: string;
|
value?: string | number;
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: QuestRewardType;
|
||||||
index: number;
|
index: number;
|
||||||
target?: string;
|
target?: string;
|
||||||
items?: Item[];
|
items?: Item[];
|
||||||
|
5
TypeScript/10ScopesAndTypes/types/models/eft/health/Effect.d.ts
vendored
Normal file
5
TypeScript/10ScopesAndTypes/types/models/eft/health/Effect.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export declare enum Effect {
|
||||||
|
Fracture = "Fracture",
|
||||||
|
LightBleeding = "LightBleeding",
|
||||||
|
HeavyBleeding = "HeavyBleeding"
|
||||||
|
}
|
6
TypeScript/10ScopesAndTypes/types/models/eft/match/ICreateGroupRequestData.d.ts
vendored
Normal file
6
TypeScript/10ScopesAndTypes/types/models/eft/match/ICreateGroupRequestData.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { RaidMode } from "../../enums/RaidMode";
|
||||||
|
export interface ICreateGroupRequestData {
|
||||||
|
location: string;
|
||||||
|
raidMode: RaidMode;
|
||||||
|
startInGroup: boolean;
|
||||||
|
}
|
@ -1,8 +1,9 @@
|
|||||||
|
import { RaidMode } from "../../enums/RaidMode";
|
||||||
export interface IGetGroupStatusRequestData {
|
export interface IGetGroupStatusRequestData {
|
||||||
location: string;
|
location: string;
|
||||||
savage: boolean;
|
savage: boolean;
|
||||||
dt: string;
|
dt: string;
|
||||||
keyId: string;
|
keyId: string;
|
||||||
raidMode: string;
|
raidMode: RaidMode;
|
||||||
startInGroup: boolean;
|
startInGroup: boolean;
|
||||||
}
|
}
|
||||||
|
10
TypeScript/10ScopesAndTypes/types/models/eft/match/IPutMetricsRequestData.d.ts
vendored
Normal file
10
TypeScript/10ScopesAndTypes/types/models/eft/match/IPutMetricsRequestData.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export interface IPutMetricsRequestData {
|
||||||
|
sid: string;
|
||||||
|
settings: any;
|
||||||
|
SharedSettings: any;
|
||||||
|
HardwareDescription: any;
|
||||||
|
Location: string;
|
||||||
|
Metrics: any;
|
||||||
|
ClientEvents: any;
|
||||||
|
SpikeSamples: any[];
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
import { BotAmount } from "../../enums/BotAmount";
|
||||||
|
import { BotDifficulty } from "../../enums/BotDifficulty";
|
||||||
export interface IStartOfflineRaidRequestData {
|
export interface IStartOfflineRaidRequestData {
|
||||||
locationName: string;
|
locationName: string;
|
||||||
startTime: number;
|
startTime: number;
|
||||||
@ -16,11 +18,11 @@ export interface TimeAndWeatherSettings {
|
|||||||
export interface BotsSettings {
|
export interface BotsSettings {
|
||||||
isEnabled: boolean;
|
isEnabled: boolean;
|
||||||
isScavWars: boolean;
|
isScavWars: boolean;
|
||||||
botAmount: string;
|
botAmount: BotAmount;
|
||||||
}
|
}
|
||||||
export interface WavesSettings {
|
export interface WavesSettings {
|
||||||
botDifficulty: string;
|
botDifficulty: BotDifficulty;
|
||||||
isBosses: boolean;
|
isBosses: boolean;
|
||||||
isTaggedAndCursed: boolean;
|
isTaggedAndCursed: boolean;
|
||||||
wavesBotAmount: string;
|
wavesBotAmount: BotAmount;
|
||||||
}
|
}
|
||||||
|
3
TypeScript/10ScopesAndTypes/types/models/eft/match/IUpdatePingRequestData.d.ts
vendored
Normal file
3
TypeScript/10ScopesAndTypes/types/models/eft/match/IUpdatePingRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface IUpdatePingRequestData {
|
||||||
|
servers: any[];
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
export interface ICompleteQuestRequestData {
|
export interface ICompleteQuestRequestData {
|
||||||
Action: string;
|
Action: string;
|
||||||
|
/** Quest Id */
|
||||||
qid: string;
|
qid: string;
|
||||||
removeExcessItems: boolean;
|
removeExcessItems: boolean;
|
||||||
}
|
}
|
||||||
|
3
TypeScript/10ScopesAndTypes/types/models/eft/ragfair/ISendRagfairReportRequestData.d.ts
vendored
Normal file
3
TypeScript/10ScopesAndTypes/types/models/eft/ragfair/ISendRagfairReportRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface ISendRagfairReportRequestData {
|
||||||
|
offerId: number;
|
||||||
|
}
|
7
TypeScript/10ScopesAndTypes/types/models/enums/BotAmount.d.ts
vendored
Normal file
7
TypeScript/10ScopesAndTypes/types/models/enums/BotAmount.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export declare enum BotAmount {
|
||||||
|
AsOnline = "AsOnline",
|
||||||
|
Low = "Low",
|
||||||
|
Medium = "Medium",
|
||||||
|
High = "High",
|
||||||
|
Horde = "Horde"
|
||||||
|
}
|
8
TypeScript/10ScopesAndTypes/types/models/enums/BotDifficulty.d.ts
vendored
Normal file
8
TypeScript/10ScopesAndTypes/types/models/enums/BotDifficulty.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export declare enum BotDifficulty {
|
||||||
|
AsOnline = "AsOnline",
|
||||||
|
Easy = "Easy",
|
||||||
|
Medium = "Medium",
|
||||||
|
Hard = "Hard",
|
||||||
|
Impossible = "Impossible",
|
||||||
|
Random = "Random"
|
||||||
|
}
|
8
TypeScript/10ScopesAndTypes/types/models/enums/QuestRewardType.d.ts
vendored
Normal file
8
TypeScript/10ScopesAndTypes/types/models/enums/QuestRewardType.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export declare enum QuestRewardType {
|
||||||
|
Skill = "Skill",
|
||||||
|
Experience = "Experience",
|
||||||
|
TraderStanding = "TraderStanding",
|
||||||
|
TraderUnlock = "TraderUnlock",
|
||||||
|
Item = "Item",
|
||||||
|
AssortmentUnlock = "AssortmentUnlock"
|
||||||
|
}
|
10
TypeScript/10ScopesAndTypes/types/models/enums/QuestStatus.d.ts
vendored
Normal file
10
TypeScript/10ScopesAndTypes/types/models/enums/QuestStatus.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export declare enum QuestStatus {
|
||||||
|
Locked = 0,
|
||||||
|
AvailableForStart = 1,
|
||||||
|
Started = 2,
|
||||||
|
AvailableForFinish = 3,
|
||||||
|
Success = 4,
|
||||||
|
Fail = 5,
|
||||||
|
FailRestartable = 6,
|
||||||
|
MarkedAsFailed = 7
|
||||||
|
}
|
5
TypeScript/10ScopesAndTypes/types/models/enums/RaidMode.d.ts
vendored
Normal file
5
TypeScript/10ScopesAndTypes/types/models/enums/RaidMode.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export declare enum RaidMode {
|
||||||
|
Online = "Online",
|
||||||
|
Local = "Local",
|
||||||
|
Coop = "Coop"
|
||||||
|
}
|
@ -14,6 +14,7 @@ export interface RaidMenuSettings {
|
|||||||
bossEnabled: boolean;
|
bossEnabled: boolean;
|
||||||
scavWars: boolean;
|
scavWars: boolean;
|
||||||
taggedAndCursed: boolean;
|
taggedAndCursed: boolean;
|
||||||
|
enablePve: boolean;
|
||||||
}
|
}
|
||||||
export interface Save {
|
export interface Save {
|
||||||
loot: boolean;
|
loot: boolean;
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class MatchLocationService {
|
export declare class MatchLocationService {
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected locations: {};
|
protected locations: {};
|
||||||
constructor(timeUtil: TimeUtil);
|
constructor(timeUtil: TimeUtil);
|
||||||
createGroup(sessionID: string, info: any): any;
|
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||||
deleteGroup(info: any): void;
|
deleteGroup(info: any): void;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
@ -43,4 +44,11 @@ export declare class RagfairPriceService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
|
getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
|
||||||
|
/**
|
||||||
|
* Attempt to get the default preset for a weapon, failing that get the first preset in the array
|
||||||
|
* (assumes default = has encyclopedia entry)
|
||||||
|
* @param presets weapon presets to choose from
|
||||||
|
* @returns Default preset object
|
||||||
|
*/
|
||||||
|
protected getDefaultWeaponPreset(presets: Preset[], weapon: Item): Preset;
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,15 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
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 { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||||
|
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -18,21 +21,21 @@ 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);
|
||||||
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
||||||
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
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;
|
||||||
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
putMetrics(url: string, info: any, sessionID: string): INullResponseData;
|
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
|
||||||
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<any> | IGetBodyResponseData<true>;
|
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
createGroup(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
|
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { PresetBuildController } from "../controllers/PresetBuildController";
|
import { PresetBuildController } from "../controllers/PresetBuildController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
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";
|
||||||
@ -9,7 +10,7 @@ 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: any, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric
|
|||||||
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
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 { 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 { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -36,5 +37,5 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
|||||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
sendReport(url: string, info: any, sessionID: string): INullResponseData;
|
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,29 @@ export declare class HealthController {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
/**
|
||||||
|
* stores in-raid player health
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param info Request data
|
||||||
|
* @param sessionID
|
||||||
|
* @param addEffects Should effects found be added or removed from profile
|
||||||
|
*/
|
||||||
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
||||||
|
/**
|
||||||
|
* When healing in menu
|
||||||
|
* @param pmcData
|
||||||
|
* @param body
|
||||||
|
* @param sessionID
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Occurs on post-raid healing page
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param info Request data from client
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ export declare class InventoryController {
|
|||||||
* @param body response request
|
* @param body response request
|
||||||
* @returns tplid
|
* @returns tplid
|
||||||
*/
|
*/
|
||||||
protected getItemTpl(body: IInventoryExamineRequestData): string;
|
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handles sorting of Inventory.
|
* Handles sorting of Inventory.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
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 { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
@ -23,7 +24,7 @@ export declare class MatchController {
|
|||||||
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||||
getEnabled(): boolean;
|
getEnabled(): boolean;
|
||||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||||
createGroup(sessionID: string, info: any): any;
|
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||||
deleteGroup(info: any): void;
|
deleteGroup(info: any): void;
|
||||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||||
protected getMatch(location: string): any;
|
protected getMatch(location: string): any;
|
||||||
|
@ -31,16 +31,54 @@ export declare class BotGenerator {
|
|||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||||
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
||||||
|
/**
|
||||||
|
* Choose if a bot should become a Pmc by checking if bot type is allowed to become a Pmc in bot config
|
||||||
|
* @param isPlayerScav is a player scav being generated, forces choice returned to never be a pmc
|
||||||
|
*/
|
||||||
|
protected shouldBotBePmc(isPlayerScav: boolean, role: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get a randomised PMC side based on bot config value 'isUsec'
|
||||||
|
* @returns pmc side as string
|
||||||
|
*/
|
||||||
|
protected getRandomisedPmcSide(): string;
|
||||||
|
/**
|
||||||
|
* Get a clone of the database\bots\base.json file
|
||||||
|
* @returns IBotBase object
|
||||||
|
*/
|
||||||
|
protected getCloneOfBotBase(): IBotBase;
|
||||||
protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase;
|
protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase;
|
||||||
|
/**
|
||||||
|
* Log the number of PMCs generated to the debug console
|
||||||
|
*/
|
||||||
|
protected logPmcGeneratedCount(output: IBotBase[]): void;
|
||||||
protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult;
|
protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult;
|
||||||
/** Converts health object to the required format */
|
/**
|
||||||
|
* Converts health object to the required format
|
||||||
|
* @param healthObj health object from bot json
|
||||||
|
* @param playerScav Is a pscav bot being generated
|
||||||
|
* @returns PmcHealth object
|
||||||
|
*/
|
||||||
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
||||||
protected generateSkills(skillsObj: Skills): Skills;
|
protected generateSkills(skillsObj: Skills): Skills;
|
||||||
|
/**
|
||||||
|
* Convert from pmc side (usec/bear) to the side as defined in the bot config (usecType/bearType)
|
||||||
|
* @param pmcSide eft side (usec/bear)
|
||||||
|
* @returns pmc side as defined in config
|
||||||
|
*/
|
||||||
protected getPmcRole(pmcSide: string): string;
|
protected getPmcRole(pmcSide: string): string;
|
||||||
|
/**
|
||||||
|
* Iterate through bots inventory and loot to find and remove christmas items (as defined in GameEventHelper)
|
||||||
|
* @param nodeInventory Bots inventory to iterate over
|
||||||
|
*/
|
||||||
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
||||||
protected generateId(bot: IBotBase): IBotBase;
|
protected generateId(bot: IBotBase): IBotBase;
|
||||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||||
protected getPMCDifficulty(requestedDifficulty: string): string;
|
protected getPMCDifficulty(requestedDifficulty: string): string;
|
||||||
|
/**
|
||||||
|
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
||||||
|
* @param bot bot to add dogtag to
|
||||||
|
* @returns Bot with dogtag added
|
||||||
|
*/
|
||||||
protected generateDogtag(bot: IBotBase): IBotBase;
|
protected generateDogtag(bot: IBotBase): IBotBase;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -9,7 +9,9 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class BotWeaponGenerator {
|
export declare class BotWeaponGenerator {
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -18,7 +20,7 @@ export declare class BotWeaponGenerator {
|
|||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private readonly modMagazineSlotId;
|
private readonly modMagazineSlotId;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
||||||
generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
|
generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
|
||||||
/**
|
/**
|
||||||
* Get the mods necessary to kit out a weapon to its preset level
|
* Get the mods necessary to kit out a weapon to its preset level
|
||||||
|
@ -15,13 +15,37 @@ export declare class HealthHelper {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected healthConfig: IHealthConfig;
|
protected healthConfig: IHealthConfig;
|
||||||
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
|
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Resets the profiles vitality/healh and vitality/effects properties to their defaults
|
||||||
|
* @param sessionID Session Id
|
||||||
|
* @returns updated profile
|
||||||
|
*/
|
||||||
resetVitality(sessionID: string): IAkiProfile;
|
resetVitality(sessionID: string): IAkiProfile;
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
/**
|
||||||
|
* Update player profile with changes from request object
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param info Request object
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param addEffects Should effects be added or removed (default - add)
|
||||||
|
*/
|
||||||
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
||||||
protected saveHealth(pmcData: IPmcData, sessionID: string): void;
|
protected saveHealth(pmcData: IPmcData, sessionID: string): void;
|
||||||
protected saveEffects(pmcData: IPmcData, sessionID: string): void;
|
/**
|
||||||
protected addEffect(pmcData: IPmcData, sessionID: string, effect: {
|
* Save effects to profile
|
||||||
bodyPart: string;
|
* Works by removing all effects and adding them back from profile
|
||||||
effectType: string;
|
* Remoces empty 'Effects' objects if found
|
||||||
}): void;
|
* @param pmcData Player profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param addEffects Should effects be added back to profile
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void;
|
||||||
|
/**
|
||||||
|
* Add effect to body part in profile
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param effectBodyPart body part to edit
|
||||||
|
* @param effectType Effect to add to body part
|
||||||
|
*/
|
||||||
|
protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: string): void;
|
||||||
protected isEmpty(map: any): boolean;
|
protected isEmpty(map: any): boolean;
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,18 @@ export declare class InRaidHelper {
|
|||||||
markFoundItems(pmcData: IPmcData, profile: IPmcData, isPlayerScav: boolean): IPmcData;
|
markFoundItems(pmcData: IPmcData, profile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||||
removeFoundInRaidStatusFromItems(profile: IPmcData): IPmcData;
|
removeFoundInRaidStatusFromItems(profile: IPmcData): IPmcData;
|
||||||
setInventory(sessionID: string, pmcData: IPmcData, profile: IPmcData): IPmcData;
|
setInventory(sessionID: string, pmcData: IPmcData, profile: IPmcData): IPmcData;
|
||||||
|
/**
|
||||||
|
* Clear pmc inventory of all items except those that are exempt
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns Player profile with pmc inventory cleared
|
||||||
|
*/
|
||||||
deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData;
|
deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData;
|
||||||
|
/**
|
||||||
|
* Does the provided items slotId mean its kept on the player after death
|
||||||
|
* @param slotId slotid of item to check
|
||||||
|
* @returns true if item is kept after death
|
||||||
|
*/
|
||||||
|
isItemKeptAfterDeath(slotId: string): boolean;
|
||||||
getPlayerGear(items: Item[]): Item[];
|
getPlayerGear(items: Item[]): Item[];
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
|
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item, Repairable } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -18,7 +18,7 @@ declare class ItemHelper {
|
|||||||
*/
|
*/
|
||||||
isValidItem(tpl: string, invalidBaseTypes?: string[]): boolean;
|
isValidItem(tpl: string, invalidBaseTypes?: string[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Checks if a id is a valid item. Valid meaning that it's an item that may be a reward
|
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
|
||||||
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
||||||
* @param {*} tpl template id of item to check
|
* @param {*} tpl template id of item to check
|
||||||
* @returns boolean: true if item is valid reward
|
* @returns boolean: true if item is valid reward
|
||||||
@ -83,6 +83,11 @@ declare class ItemHelper {
|
|||||||
* @returns {array} The array of StackSlotItems
|
* @returns {array} The array of StackSlotItems
|
||||||
*/
|
*/
|
||||||
generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[];
|
generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[];
|
||||||
|
/**
|
||||||
|
* Gets item data from items.json
|
||||||
|
* @param tpl items template id to look up
|
||||||
|
* @returns bool - is valid + template item object as array
|
||||||
|
*/
|
||||||
getItem(tpl: string): [boolean, ITemplateItem];
|
getItem(tpl: string): [boolean, ITemplateItem];
|
||||||
/**
|
/**
|
||||||
* get normalized value (0-1) based on item condition
|
* get normalized value (0-1) based on item condition
|
||||||
@ -90,24 +95,64 @@ declare class ItemHelper {
|
|||||||
* @returns number between 0 and 1
|
* @returns number between 0 and 1
|
||||||
*/
|
*/
|
||||||
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
|
||||||
|
* @param itemDetails
|
||||||
|
* @param repairable repairable object
|
||||||
|
* @param item
|
||||||
|
* @returns a number between 0 and 1
|
||||||
|
*/
|
||||||
|
protected getRepairableItemQualityValue(itemDetails: ITemplateItem, repairable: Repairable, item: Item): number;
|
||||||
|
/**
|
||||||
|
* Recursive function that looks at every item from parameter and gets their childrens Ids
|
||||||
|
* @param items
|
||||||
|
* @param itemID
|
||||||
|
* @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 baseItemId
|
||||||
|
* @returns An array of Item objects
|
||||||
*/
|
*/
|
||||||
findAndReturnChildrenAsItems(items: Item[], baseItemId: string): Item[];
|
findAndReturnChildrenAsItems(items: Item[], baseItemId: string): Item[];
|
||||||
/**
|
/**
|
||||||
* find children of the item in a given assort (weapons parts for example, need recursive loop function)
|
* Find children of the item in a given assort (weapons parts for example, need recursive loop function)
|
||||||
|
* @param itemIdToFind Template id of item to check for
|
||||||
|
* @param assort Array of items to check in
|
||||||
|
* @returns Array of children of requested item
|
||||||
*/
|
*/
|
||||||
findAndReturnChildrenByAssort(itemIdToFind: string, assort: Item[]): Item[];
|
findAndReturnChildrenByAssort(itemIdToFind: string, assort: Item[]): Item[];
|
||||||
|
/**
|
||||||
|
* Check if the passed in item has buy count restrictions
|
||||||
|
* @param itemToCheck Item to check
|
||||||
|
* @returns true if it has buy restrictions
|
||||||
|
*/
|
||||||
hasBuyRestrictions(itemToCheck: Item): boolean;
|
hasBuyRestrictions(itemToCheck: Item): boolean;
|
||||||
/**
|
/**
|
||||||
* Is Dogtag
|
* is the passed in template id a dog tag
|
||||||
* Checks if an item is a dogtag. Used under profile_f.js to modify preparePrice based
|
* @param tpl Template id to check
|
||||||
* on the level of the 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;
|
isNotSellable(tpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Gets the identifier for a child using slotId, locationX and locationY.
|
||||||
|
* @param item
|
||||||
|
* @returns "slotId OR slotid,locationX,locationY"
|
||||||
|
*/
|
||||||
getChildId(item: Item): string;
|
getChildId(item: Item): string;
|
||||||
|
/**
|
||||||
|
* Can the pased in item be stacked
|
||||||
|
* @param tpl item to check
|
||||||
|
* @returns true if it can be stacked
|
||||||
|
*/
|
||||||
isItemTplStackable(tpl: string): boolean;
|
isItemTplStackable(tpl: string): boolean;
|
||||||
/**
|
/**
|
||||||
* split item stack if it exceeds StackMaxSize
|
* split item stack if it exceeds StackMaxSize
|
||||||
@ -122,10 +167,12 @@ declare class ItemHelper {
|
|||||||
*/
|
*/
|
||||||
findBarterItems(by: string, pmcData: IPmcData, barter_itemID: string): any[];
|
findBarterItems(by: string, pmcData: IPmcData, barter_itemID: string): any[];
|
||||||
/**
|
/**
|
||||||
* @param {Object} pmcData
|
*
|
||||||
* @param {Array} items
|
* @param pmcData
|
||||||
* @param {Object} fastPanel
|
* @param items
|
||||||
* @returns Array
|
* @param insuredItems insured items to not replace ids for
|
||||||
|
* @param fastPanel
|
||||||
|
* @returns
|
||||||
*/
|
*/
|
||||||
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
||||||
/**
|
/**
|
||||||
@ -141,6 +188,12 @@ declare class ItemHelper {
|
|||||||
* @returns boolean
|
* @returns boolean
|
||||||
*/
|
*/
|
||||||
isQuestItem(tpl: string): boolean;
|
isQuestItem(tpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get the inventory size of an item
|
||||||
|
* @param items
|
||||||
|
* @param rootItemId
|
||||||
|
* @returns ItemSize object (width and height)
|
||||||
|
*/
|
||||||
getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize;
|
getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize;
|
||||||
}
|
}
|
||||||
declare namespace ItemHelper {
|
declare namespace ItemHelper {
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class PresetHelper {
|
export declare class PresetHelper {
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected lookup: Record<string, string[]>;
|
protected lookup: Record<string, string[]>;
|
||||||
constructor(databaseServer: DatabaseServer);
|
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer);
|
||||||
hydratePresetStore(input: Record<string, string[]>): void;
|
hydratePresetStore(input: Record<string, string[]>): void;
|
||||||
isPreset(id: string): boolean;
|
isPreset(id: string): boolean;
|
||||||
hasPreset(templateId: string): boolean;
|
hasPreset(templateId: string): boolean;
|
||||||
|
@ -20,6 +20,12 @@ export declare class ProfileHelper {
|
|||||||
resetProfileQuestCondition(sessionID: string, conditionId: string): void;
|
resetProfileQuestCondition(sessionID: string, conditionId: string): void;
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
getCompleteProfile(sessionID: string): IPmcData[];
|
||||||
isNicknameTaken(info: IValidateNicknameRequestData, sessionID: string): boolean;
|
isNicknameTaken(info: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||||
|
/**
|
||||||
|
* Add experience to a PMC inside the players profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param experienceToAdd Experiecne to add to PMC character
|
||||||
|
*/
|
||||||
|
addExperienceToPmc(sessionID: string, experienceToAdd: number): void;
|
||||||
getProfileByPmcId(pmcId: string): IPmcData;
|
getProfileByPmcId(pmcId: string): IPmcData;
|
||||||
getExperience(level: number): number;
|
getExperience(level: number): number;
|
||||||
getMaxLevel(): number;
|
getMaxLevel(): number;
|
||||||
|
@ -75,8 +75,22 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
cleanQuestConditions(quest: IQuest): IQuest;
|
cleanQuestConditions(quest: IQuest): IQuest;
|
||||||
failQuest(pmcData: IPmcData, body: any, sessionID: string): any;
|
failQuest(pmcData: IPmcData, body: any, sessionID: string): any;
|
||||||
|
/**
|
||||||
|
* Get quest by id from database
|
||||||
|
* @param questId questid to look for
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @returns IQuest object
|
||||||
|
*/
|
||||||
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
||||||
getQuestLocaleIdFromDb(messageId: string): string;
|
getQuestLocaleIdFromDb(messageId: string): string;
|
||||||
|
/**
|
||||||
|
* Give player quest rewards - Skills/exp/trader standing/items/assort unlocks
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param body complete quest request
|
||||||
|
* @param state State of the quest now its complete
|
||||||
|
* @param sessionID Seession id
|
||||||
|
* @returns array of reward objects
|
||||||
|
*/
|
||||||
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[];
|
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[];
|
||||||
/**
|
/**
|
||||||
* Get the intel center bonus a player has
|
* Get the intel center bonus a player has
|
||||||
|
@ -35,7 +35,13 @@ 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;
|
||||||
changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void;
|
/**
|
||||||
|
* Alter a traders unlocked status
|
||||||
|
* @param traderID Trader to alter
|
||||||
|
* @param status New status to use
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
|
setTraderUnlockedState(traderID: string, status: boolean, sessionID: string): void;
|
||||||
/**
|
/**
|
||||||
* Get a list of items and their prices from player inventory that can be sold to a trader
|
* Get a list of items and their prices from player inventory that can be sold to a trader
|
||||||
* @param traderID trader id being traded with
|
* @param traderID trader id being traded with
|
||||||
@ -79,7 +85,14 @@ export declare class TraderHelper {
|
|||||||
protected getRawItemPrice(pmcData: IPmcData, item: Item): number;
|
protected getRawItemPrice(pmcData: IPmcData, item: Item): number;
|
||||||
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel, traderID: string): number;
|
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel, traderID: string): number;
|
||||||
/**
|
/**
|
||||||
* Calculate traders level based on exp amount and increment level if over threshold
|
* Add standing to a trader and level them up if exp goes over level threshold
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param traderId traders id
|
||||||
|
* @param standingToAdd Standing value to add to trader
|
||||||
|
*/
|
||||||
|
addStandingToTrader(sessionID: string, traderId: string, standingToAdd: number): void;
|
||||||
|
/**
|
||||||
|
* Calculate traders level based on exp amount and increments level if over threshold
|
||||||
* @param traderID trader to process
|
* @param traderID trader to process
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
*/
|
*/
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { QuestRewardType } from "../../../enums/QuestRewardType";
|
||||||
import { Item } from "./IItem";
|
import { Item } from "./IItem";
|
||||||
export interface IQuest {
|
export interface IQuest {
|
||||||
QuestName: string;
|
QuestName: string;
|
||||||
@ -99,9 +100,9 @@ export interface Rewards {
|
|||||||
Expired: Reward[];
|
Expired: Reward[];
|
||||||
}
|
}
|
||||||
export interface Reward {
|
export interface Reward {
|
||||||
value?: string;
|
value?: string | number;
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: QuestRewardType;
|
||||||
index: number;
|
index: number;
|
||||||
target?: string;
|
target?: string;
|
||||||
items?: Item[];
|
items?: Item[];
|
||||||
|
5
TypeScript/11BundleLoadingSample/types/models/eft/health/Effect.d.ts
vendored
Normal file
5
TypeScript/11BundleLoadingSample/types/models/eft/health/Effect.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export declare enum Effect {
|
||||||
|
Fracture = "Fracture",
|
||||||
|
LightBleeding = "LightBleeding",
|
||||||
|
HeavyBleeding = "HeavyBleeding"
|
||||||
|
}
|
6
TypeScript/11BundleLoadingSample/types/models/eft/match/ICreateGroupRequestData.d.ts
vendored
Normal file
6
TypeScript/11BundleLoadingSample/types/models/eft/match/ICreateGroupRequestData.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { RaidMode } from "../../enums/RaidMode";
|
||||||
|
export interface ICreateGroupRequestData {
|
||||||
|
location: string;
|
||||||
|
raidMode: RaidMode;
|
||||||
|
startInGroup: boolean;
|
||||||
|
}
|
@ -1,8 +1,9 @@
|
|||||||
|
import { RaidMode } from "../../enums/RaidMode";
|
||||||
export interface IGetGroupStatusRequestData {
|
export interface IGetGroupStatusRequestData {
|
||||||
location: string;
|
location: string;
|
||||||
savage: boolean;
|
savage: boolean;
|
||||||
dt: string;
|
dt: string;
|
||||||
keyId: string;
|
keyId: string;
|
||||||
raidMode: string;
|
raidMode: RaidMode;
|
||||||
startInGroup: boolean;
|
startInGroup: boolean;
|
||||||
}
|
}
|
||||||
|
10
TypeScript/11BundleLoadingSample/types/models/eft/match/IPutMetricsRequestData.d.ts
vendored
Normal file
10
TypeScript/11BundleLoadingSample/types/models/eft/match/IPutMetricsRequestData.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export interface IPutMetricsRequestData {
|
||||||
|
sid: string;
|
||||||
|
settings: any;
|
||||||
|
SharedSettings: any;
|
||||||
|
HardwareDescription: any;
|
||||||
|
Location: string;
|
||||||
|
Metrics: any;
|
||||||
|
ClientEvents: any;
|
||||||
|
SpikeSamples: any[];
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
import { BotAmount } from "../../enums/BotAmount";
|
||||||
|
import { BotDifficulty } from "../../enums/BotDifficulty";
|
||||||
export interface IStartOfflineRaidRequestData {
|
export interface IStartOfflineRaidRequestData {
|
||||||
locationName: string;
|
locationName: string;
|
||||||
startTime: number;
|
startTime: number;
|
||||||
@ -16,11 +18,11 @@ export interface TimeAndWeatherSettings {
|
|||||||
export interface BotsSettings {
|
export interface BotsSettings {
|
||||||
isEnabled: boolean;
|
isEnabled: boolean;
|
||||||
isScavWars: boolean;
|
isScavWars: boolean;
|
||||||
botAmount: string;
|
botAmount: BotAmount;
|
||||||
}
|
}
|
||||||
export interface WavesSettings {
|
export interface WavesSettings {
|
||||||
botDifficulty: string;
|
botDifficulty: BotDifficulty;
|
||||||
isBosses: boolean;
|
isBosses: boolean;
|
||||||
isTaggedAndCursed: boolean;
|
isTaggedAndCursed: boolean;
|
||||||
wavesBotAmount: string;
|
wavesBotAmount: BotAmount;
|
||||||
}
|
}
|
||||||
|
3
TypeScript/11BundleLoadingSample/types/models/eft/match/IUpdatePingRequestData.d.ts
vendored
Normal file
3
TypeScript/11BundleLoadingSample/types/models/eft/match/IUpdatePingRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface IUpdatePingRequestData {
|
||||||
|
servers: any[];
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
export interface ICompleteQuestRequestData {
|
export interface ICompleteQuestRequestData {
|
||||||
Action: string;
|
Action: string;
|
||||||
|
/** Quest Id */
|
||||||
qid: string;
|
qid: string;
|
||||||
removeExcessItems: boolean;
|
removeExcessItems: boolean;
|
||||||
}
|
}
|
||||||
|
3
TypeScript/11BundleLoadingSample/types/models/eft/ragfair/ISendRagfairReportRequestData.d.ts
vendored
Normal file
3
TypeScript/11BundleLoadingSample/types/models/eft/ragfair/ISendRagfairReportRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface ISendRagfairReportRequestData {
|
||||||
|
offerId: number;
|
||||||
|
}
|
7
TypeScript/11BundleLoadingSample/types/models/enums/BotAmount.d.ts
vendored
Normal file
7
TypeScript/11BundleLoadingSample/types/models/enums/BotAmount.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export declare enum BotAmount {
|
||||||
|
AsOnline = "AsOnline",
|
||||||
|
Low = "Low",
|
||||||
|
Medium = "Medium",
|
||||||
|
High = "High",
|
||||||
|
Horde = "Horde"
|
||||||
|
}
|
8
TypeScript/11BundleLoadingSample/types/models/enums/BotDifficulty.d.ts
vendored
Normal file
8
TypeScript/11BundleLoadingSample/types/models/enums/BotDifficulty.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export declare enum BotDifficulty {
|
||||||
|
AsOnline = "AsOnline",
|
||||||
|
Easy = "Easy",
|
||||||
|
Medium = "Medium",
|
||||||
|
Hard = "Hard",
|
||||||
|
Impossible = "Impossible",
|
||||||
|
Random = "Random"
|
||||||
|
}
|
8
TypeScript/11BundleLoadingSample/types/models/enums/QuestRewardType.d.ts
vendored
Normal file
8
TypeScript/11BundleLoadingSample/types/models/enums/QuestRewardType.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export declare enum QuestRewardType {
|
||||||
|
Skill = "Skill",
|
||||||
|
Experience = "Experience",
|
||||||
|
TraderStanding = "TraderStanding",
|
||||||
|
TraderUnlock = "TraderUnlock",
|
||||||
|
Item = "Item",
|
||||||
|
AssortmentUnlock = "AssortmentUnlock"
|
||||||
|
}
|
10
TypeScript/11BundleLoadingSample/types/models/enums/QuestStatus.d.ts
vendored
Normal file
10
TypeScript/11BundleLoadingSample/types/models/enums/QuestStatus.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export declare enum QuestStatus {
|
||||||
|
Locked = 0,
|
||||||
|
AvailableForStart = 1,
|
||||||
|
Started = 2,
|
||||||
|
AvailableForFinish = 3,
|
||||||
|
Success = 4,
|
||||||
|
Fail = 5,
|
||||||
|
FailRestartable = 6,
|
||||||
|
MarkedAsFailed = 7
|
||||||
|
}
|
5
TypeScript/11BundleLoadingSample/types/models/enums/RaidMode.d.ts
vendored
Normal file
5
TypeScript/11BundleLoadingSample/types/models/enums/RaidMode.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export declare enum RaidMode {
|
||||||
|
Online = "Online",
|
||||||
|
Local = "Local",
|
||||||
|
Coop = "Coop"
|
||||||
|
}
|
@ -14,6 +14,7 @@ export interface RaidMenuSettings {
|
|||||||
bossEnabled: boolean;
|
bossEnabled: boolean;
|
||||||
scavWars: boolean;
|
scavWars: boolean;
|
||||||
taggedAndCursed: boolean;
|
taggedAndCursed: boolean;
|
||||||
|
enablePve: boolean;
|
||||||
}
|
}
|
||||||
export interface Save {
|
export interface Save {
|
||||||
loot: boolean;
|
loot: boolean;
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class MatchLocationService {
|
export declare class MatchLocationService {
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected locations: {};
|
protected locations: {};
|
||||||
constructor(timeUtil: TimeUtil);
|
constructor(timeUtil: TimeUtil);
|
||||||
createGroup(sessionID: string, info: any): any;
|
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||||
deleteGroup(info: any): void;
|
deleteGroup(info: any): void;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
@ -43,4 +44,11 @@ export declare class RagfairPriceService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
|
getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
|
||||||
|
/**
|
||||||
|
* Attempt to get the default preset for a weapon, failing that get the first preset in the array
|
||||||
|
* (assumes default = has encyclopedia entry)
|
||||||
|
* @param presets weapon presets to choose from
|
||||||
|
* @returns Default preset object
|
||||||
|
*/
|
||||||
|
protected getDefaultWeaponPreset(presets: Preset[], weapon: Item): Preset;
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,15 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
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 { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||||
|
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -18,21 +21,21 @@ 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);
|
||||||
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
||||||
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
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;
|
||||||
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
putMetrics(url: string, info: any, sessionID: string): INullResponseData;
|
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
|
||||||
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<any> | IGetBodyResponseData<true>;
|
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
createGroup(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
|
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { PresetBuildController } from "../controllers/PresetBuildController";
|
import { PresetBuildController } from "../controllers/PresetBuildController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
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";
|
||||||
@ -9,7 +10,7 @@ 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: any, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric
|
|||||||
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
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 { 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 { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -36,5 +37,5 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
|||||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
sendReport(url: string, info: any, sessionID: string): INullResponseData;
|
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,29 @@ export declare class HealthController {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
/**
|
||||||
|
* stores in-raid player health
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param info Request data
|
||||||
|
* @param sessionID
|
||||||
|
* @param addEffects Should effects found be added or removed from profile
|
||||||
|
*/
|
||||||
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
||||||
|
/**
|
||||||
|
* When healing in menu
|
||||||
|
* @param pmcData
|
||||||
|
* @param body
|
||||||
|
* @param sessionID
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Occurs on post-raid healing page
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param info Request data from client
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ export declare class InventoryController {
|
|||||||
* @param body response request
|
* @param body response request
|
||||||
* @returns tplid
|
* @returns tplid
|
||||||
*/
|
*/
|
||||||
protected getItemTpl(body: IInventoryExamineRequestData): string;
|
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handles sorting of Inventory.
|
* Handles sorting of Inventory.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
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 { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
@ -23,7 +24,7 @@ export declare class MatchController {
|
|||||||
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||||
getEnabled(): boolean;
|
getEnabled(): boolean;
|
||||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||||
createGroup(sessionID: string, info: any): any;
|
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||||
deleteGroup(info: any): void;
|
deleteGroup(info: any): void;
|
||||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||||
protected getMatch(location: string): any;
|
protected getMatch(location: string): any;
|
||||||
|
@ -31,16 +31,54 @@ export declare class BotGenerator {
|
|||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||||
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
||||||
|
/**
|
||||||
|
* Choose if a bot should become a Pmc by checking if bot type is allowed to become a Pmc in bot config
|
||||||
|
* @param isPlayerScav is a player scav being generated, forces choice returned to never be a pmc
|
||||||
|
*/
|
||||||
|
protected shouldBotBePmc(isPlayerScav: boolean, role: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get a randomised PMC side based on bot config value 'isUsec'
|
||||||
|
* @returns pmc side as string
|
||||||
|
*/
|
||||||
|
protected getRandomisedPmcSide(): string;
|
||||||
|
/**
|
||||||
|
* Get a clone of the database\bots\base.json file
|
||||||
|
* @returns IBotBase object
|
||||||
|
*/
|
||||||
|
protected getCloneOfBotBase(): IBotBase;
|
||||||
protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase;
|
protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase;
|
||||||
|
/**
|
||||||
|
* Log the number of PMCs generated to the debug console
|
||||||
|
*/
|
||||||
|
protected logPmcGeneratedCount(output: IBotBase[]): void;
|
||||||
protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult;
|
protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult;
|
||||||
/** Converts health object to the required format */
|
/**
|
||||||
|
* Converts health object to the required format
|
||||||
|
* @param healthObj health object from bot json
|
||||||
|
* @param playerScav Is a pscav bot being generated
|
||||||
|
* @returns PmcHealth object
|
||||||
|
*/
|
||||||
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
||||||
protected generateSkills(skillsObj: Skills): Skills;
|
protected generateSkills(skillsObj: Skills): Skills;
|
||||||
|
/**
|
||||||
|
* Convert from pmc side (usec/bear) to the side as defined in the bot config (usecType/bearType)
|
||||||
|
* @param pmcSide eft side (usec/bear)
|
||||||
|
* @returns pmc side as defined in config
|
||||||
|
*/
|
||||||
protected getPmcRole(pmcSide: string): string;
|
protected getPmcRole(pmcSide: string): string;
|
||||||
|
/**
|
||||||
|
* Iterate through bots inventory and loot to find and remove christmas items (as defined in GameEventHelper)
|
||||||
|
* @param nodeInventory Bots inventory to iterate over
|
||||||
|
*/
|
||||||
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
||||||
protected generateId(bot: IBotBase): IBotBase;
|
protected generateId(bot: IBotBase): IBotBase;
|
||||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||||
protected getPMCDifficulty(requestedDifficulty: string): string;
|
protected getPMCDifficulty(requestedDifficulty: string): string;
|
||||||
|
/**
|
||||||
|
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
||||||
|
* @param bot bot to add dogtag to
|
||||||
|
* @returns Bot with dogtag added
|
||||||
|
*/
|
||||||
protected generateDogtag(bot: IBotBase): IBotBase;
|
protected generateDogtag(bot: IBotBase): IBotBase;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -9,7 +9,9 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class BotWeaponGenerator {
|
export declare class BotWeaponGenerator {
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -18,7 +20,7 @@ export declare class BotWeaponGenerator {
|
|||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private readonly modMagazineSlotId;
|
private readonly modMagazineSlotId;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
||||||
generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
|
generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
|
||||||
/**
|
/**
|
||||||
* Get the mods necessary to kit out a weapon to its preset level
|
* Get the mods necessary to kit out a weapon to its preset level
|
||||||
|
@ -15,13 +15,37 @@ export declare class HealthHelper {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected healthConfig: IHealthConfig;
|
protected healthConfig: IHealthConfig;
|
||||||
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
|
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Resets the profiles vitality/healh and vitality/effects properties to their defaults
|
||||||
|
* @param sessionID Session Id
|
||||||
|
* @returns updated profile
|
||||||
|
*/
|
||||||
resetVitality(sessionID: string): IAkiProfile;
|
resetVitality(sessionID: string): IAkiProfile;
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
/**
|
||||||
|
* Update player profile with changes from request object
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param info Request object
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param addEffects Should effects be added or removed (default - add)
|
||||||
|
*/
|
||||||
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
||||||
protected saveHealth(pmcData: IPmcData, sessionID: string): void;
|
protected saveHealth(pmcData: IPmcData, sessionID: string): void;
|
||||||
protected saveEffects(pmcData: IPmcData, sessionID: string): void;
|
/**
|
||||||
protected addEffect(pmcData: IPmcData, sessionID: string, effect: {
|
* Save effects to profile
|
||||||
bodyPart: string;
|
* Works by removing all effects and adding them back from profile
|
||||||
effectType: string;
|
* Remoces empty 'Effects' objects if found
|
||||||
}): void;
|
* @param pmcData Player profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param addEffects Should effects be added back to profile
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void;
|
||||||
|
/**
|
||||||
|
* Add effect to body part in profile
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param effectBodyPart body part to edit
|
||||||
|
* @param effectType Effect to add to body part
|
||||||
|
*/
|
||||||
|
protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: string): void;
|
||||||
protected isEmpty(map: any): boolean;
|
protected isEmpty(map: any): boolean;
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,18 @@ export declare class InRaidHelper {
|
|||||||
markFoundItems(pmcData: IPmcData, profile: IPmcData, isPlayerScav: boolean): IPmcData;
|
markFoundItems(pmcData: IPmcData, profile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||||
removeFoundInRaidStatusFromItems(profile: IPmcData): IPmcData;
|
removeFoundInRaidStatusFromItems(profile: IPmcData): IPmcData;
|
||||||
setInventory(sessionID: string, pmcData: IPmcData, profile: IPmcData): IPmcData;
|
setInventory(sessionID: string, pmcData: IPmcData, profile: IPmcData): IPmcData;
|
||||||
|
/**
|
||||||
|
* Clear pmc inventory of all items except those that are exempt
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns Player profile with pmc inventory cleared
|
||||||
|
*/
|
||||||
deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData;
|
deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData;
|
||||||
|
/**
|
||||||
|
* Does the provided items slotId mean its kept on the player after death
|
||||||
|
* @param slotId slotid of item to check
|
||||||
|
* @returns true if item is kept after death
|
||||||
|
*/
|
||||||
|
isItemKeptAfterDeath(slotId: string): boolean;
|
||||||
getPlayerGear(items: Item[]): Item[];
|
getPlayerGear(items: Item[]): Item[];
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
|
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item, Repairable } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -18,7 +18,7 @@ declare class ItemHelper {
|
|||||||
*/
|
*/
|
||||||
isValidItem(tpl: string, invalidBaseTypes?: string[]): boolean;
|
isValidItem(tpl: string, invalidBaseTypes?: string[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Checks if a id is a valid item. Valid meaning that it's an item that may be a reward
|
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
|
||||||
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
||||||
* @param {*} tpl template id of item to check
|
* @param {*} tpl template id of item to check
|
||||||
* @returns boolean: true if item is valid reward
|
* @returns boolean: true if item is valid reward
|
||||||
@ -83,6 +83,11 @@ declare class ItemHelper {
|
|||||||
* @returns {array} The array of StackSlotItems
|
* @returns {array} The array of StackSlotItems
|
||||||
*/
|
*/
|
||||||
generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[];
|
generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[];
|
||||||
|
/**
|
||||||
|
* Gets item data from items.json
|
||||||
|
* @param tpl items template id to look up
|
||||||
|
* @returns bool - is valid + template item object as array
|
||||||
|
*/
|
||||||
getItem(tpl: string): [boolean, ITemplateItem];
|
getItem(tpl: string): [boolean, ITemplateItem];
|
||||||
/**
|
/**
|
||||||
* get normalized value (0-1) based on item condition
|
* get normalized value (0-1) based on item condition
|
||||||
@ -90,24 +95,64 @@ declare class ItemHelper {
|
|||||||
* @returns number between 0 and 1
|
* @returns number between 0 and 1
|
||||||
*/
|
*/
|
||||||
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
|
||||||
|
* @param itemDetails
|
||||||
|
* @param repairable repairable object
|
||||||
|
* @param item
|
||||||
|
* @returns a number between 0 and 1
|
||||||
|
*/
|
||||||
|
protected getRepairableItemQualityValue(itemDetails: ITemplateItem, repairable: Repairable, item: Item): number;
|
||||||
|
/**
|
||||||
|
* Recursive function that looks at every item from parameter and gets their childrens Ids
|
||||||
|
* @param items
|
||||||
|
* @param itemID
|
||||||
|
* @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 baseItemId
|
||||||
|
* @returns An array of Item objects
|
||||||
*/
|
*/
|
||||||
findAndReturnChildrenAsItems(items: Item[], baseItemId: string): Item[];
|
findAndReturnChildrenAsItems(items: Item[], baseItemId: string): Item[];
|
||||||
/**
|
/**
|
||||||
* find children of the item in a given assort (weapons parts for example, need recursive loop function)
|
* Find children of the item in a given assort (weapons parts for example, need recursive loop function)
|
||||||
|
* @param itemIdToFind Template id of item to check for
|
||||||
|
* @param assort Array of items to check in
|
||||||
|
* @returns Array of children of requested item
|
||||||
*/
|
*/
|
||||||
findAndReturnChildrenByAssort(itemIdToFind: string, assort: Item[]): Item[];
|
findAndReturnChildrenByAssort(itemIdToFind: string, assort: Item[]): Item[];
|
||||||
|
/**
|
||||||
|
* Check if the passed in item has buy count restrictions
|
||||||
|
* @param itemToCheck Item to check
|
||||||
|
* @returns true if it has buy restrictions
|
||||||
|
*/
|
||||||
hasBuyRestrictions(itemToCheck: Item): boolean;
|
hasBuyRestrictions(itemToCheck: Item): boolean;
|
||||||
/**
|
/**
|
||||||
* Is Dogtag
|
* is the passed in template id a dog tag
|
||||||
* Checks if an item is a dogtag. Used under profile_f.js to modify preparePrice based
|
* @param tpl Template id to check
|
||||||
* on the level of the 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;
|
isNotSellable(tpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Gets the identifier for a child using slotId, locationX and locationY.
|
||||||
|
* @param item
|
||||||
|
* @returns "slotId OR slotid,locationX,locationY"
|
||||||
|
*/
|
||||||
getChildId(item: Item): string;
|
getChildId(item: Item): string;
|
||||||
|
/**
|
||||||
|
* Can the pased in item be stacked
|
||||||
|
* @param tpl item to check
|
||||||
|
* @returns true if it can be stacked
|
||||||
|
*/
|
||||||
isItemTplStackable(tpl: string): boolean;
|
isItemTplStackable(tpl: string): boolean;
|
||||||
/**
|
/**
|
||||||
* split item stack if it exceeds StackMaxSize
|
* split item stack if it exceeds StackMaxSize
|
||||||
@ -122,10 +167,12 @@ declare class ItemHelper {
|
|||||||
*/
|
*/
|
||||||
findBarterItems(by: string, pmcData: IPmcData, barter_itemID: string): any[];
|
findBarterItems(by: string, pmcData: IPmcData, barter_itemID: string): any[];
|
||||||
/**
|
/**
|
||||||
* @param {Object} pmcData
|
*
|
||||||
* @param {Array} items
|
* @param pmcData
|
||||||
* @param {Object} fastPanel
|
* @param items
|
||||||
* @returns Array
|
* @param insuredItems insured items to not replace ids for
|
||||||
|
* @param fastPanel
|
||||||
|
* @returns
|
||||||
*/
|
*/
|
||||||
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
||||||
/**
|
/**
|
||||||
@ -141,6 +188,12 @@ declare class ItemHelper {
|
|||||||
* @returns boolean
|
* @returns boolean
|
||||||
*/
|
*/
|
||||||
isQuestItem(tpl: string): boolean;
|
isQuestItem(tpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get the inventory size of an item
|
||||||
|
* @param items
|
||||||
|
* @param rootItemId
|
||||||
|
* @returns ItemSize object (width and height)
|
||||||
|
*/
|
||||||
getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize;
|
getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize;
|
||||||
}
|
}
|
||||||
declare namespace ItemHelper {
|
declare namespace ItemHelper {
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class PresetHelper {
|
export declare class PresetHelper {
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected lookup: Record<string, string[]>;
|
protected lookup: Record<string, string[]>;
|
||||||
constructor(databaseServer: DatabaseServer);
|
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer);
|
||||||
hydratePresetStore(input: Record<string, string[]>): void;
|
hydratePresetStore(input: Record<string, string[]>): void;
|
||||||
isPreset(id: string): boolean;
|
isPreset(id: string): boolean;
|
||||||
hasPreset(templateId: string): boolean;
|
hasPreset(templateId: string): boolean;
|
||||||
|
@ -20,6 +20,12 @@ export declare class ProfileHelper {
|
|||||||
resetProfileQuestCondition(sessionID: string, conditionId: string): void;
|
resetProfileQuestCondition(sessionID: string, conditionId: string): void;
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
getCompleteProfile(sessionID: string): IPmcData[];
|
||||||
isNicknameTaken(info: IValidateNicknameRequestData, sessionID: string): boolean;
|
isNicknameTaken(info: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||||
|
/**
|
||||||
|
* Add experience to a PMC inside the players profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param experienceToAdd Experiecne to add to PMC character
|
||||||
|
*/
|
||||||
|
addExperienceToPmc(sessionID: string, experienceToAdd: number): void;
|
||||||
getProfileByPmcId(pmcId: string): IPmcData;
|
getProfileByPmcId(pmcId: string): IPmcData;
|
||||||
getExperience(level: number): number;
|
getExperience(level: number): number;
|
||||||
getMaxLevel(): number;
|
getMaxLevel(): number;
|
||||||
|
@ -75,8 +75,22 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
cleanQuestConditions(quest: IQuest): IQuest;
|
cleanQuestConditions(quest: IQuest): IQuest;
|
||||||
failQuest(pmcData: IPmcData, body: any, sessionID: string): any;
|
failQuest(pmcData: IPmcData, body: any, sessionID: string): any;
|
||||||
|
/**
|
||||||
|
* Get quest by id from database
|
||||||
|
* @param questId questid to look for
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @returns IQuest object
|
||||||
|
*/
|
||||||
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
||||||
getQuestLocaleIdFromDb(messageId: string): string;
|
getQuestLocaleIdFromDb(messageId: string): string;
|
||||||
|
/**
|
||||||
|
* Give player quest rewards - Skills/exp/trader standing/items/assort unlocks
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param body complete quest request
|
||||||
|
* @param state State of the quest now its complete
|
||||||
|
* @param sessionID Seession id
|
||||||
|
* @returns array of reward objects
|
||||||
|
*/
|
||||||
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[];
|
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[];
|
||||||
/**
|
/**
|
||||||
* Get the intel center bonus a player has
|
* Get the intel center bonus a player has
|
||||||
|
@ -35,7 +35,13 @@ 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;
|
||||||
changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void;
|
/**
|
||||||
|
* Alter a traders unlocked status
|
||||||
|
* @param traderID Trader to alter
|
||||||
|
* @param status New status to use
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
|
setTraderUnlockedState(traderID: string, status: boolean, sessionID: string): void;
|
||||||
/**
|
/**
|
||||||
* Get a list of items and their prices from player inventory that can be sold to a trader
|
* Get a list of items and their prices from player inventory that can be sold to a trader
|
||||||
* @param traderID trader id being traded with
|
* @param traderID trader id being traded with
|
||||||
@ -79,7 +85,14 @@ export declare class TraderHelper {
|
|||||||
protected getRawItemPrice(pmcData: IPmcData, item: Item): number;
|
protected getRawItemPrice(pmcData: IPmcData, item: Item): number;
|
||||||
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel, traderID: string): number;
|
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel, traderID: string): number;
|
||||||
/**
|
/**
|
||||||
* Calculate traders level based on exp amount and increment level if over threshold
|
* Add standing to a trader and level them up if exp goes over level threshold
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param traderId traders id
|
||||||
|
* @param standingToAdd Standing value to add to trader
|
||||||
|
*/
|
||||||
|
addStandingToTrader(sessionID: string, traderId: string, standingToAdd: number): void;
|
||||||
|
/**
|
||||||
|
* Calculate traders level based on exp amount and increments level if over threshold
|
||||||
* @param traderID trader to process
|
* @param traderID trader to process
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
*/
|
*/
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { QuestRewardType } from "../../../enums/QuestRewardType";
|
||||||
import { Item } from "./IItem";
|
import { Item } from "./IItem";
|
||||||
export interface IQuest {
|
export interface IQuest {
|
||||||
QuestName: string;
|
QuestName: string;
|
||||||
@ -99,9 +100,9 @@ export interface Rewards {
|
|||||||
Expired: Reward[];
|
Expired: Reward[];
|
||||||
}
|
}
|
||||||
export interface Reward {
|
export interface Reward {
|
||||||
value?: string;
|
value?: string | number;
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: QuestRewardType;
|
||||||
index: number;
|
index: number;
|
||||||
target?: string;
|
target?: string;
|
||||||
items?: Item[];
|
items?: Item[];
|
||||||
|
5
TypeScript/12ClassExtensionOverride/types/models/eft/health/Effect.d.ts
vendored
Normal file
5
TypeScript/12ClassExtensionOverride/types/models/eft/health/Effect.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export declare enum Effect {
|
||||||
|
Fracture = "Fracture",
|
||||||
|
LightBleeding = "LightBleeding",
|
||||||
|
HeavyBleeding = "HeavyBleeding"
|
||||||
|
}
|
6
TypeScript/12ClassExtensionOverride/types/models/eft/match/ICreateGroupRequestData.d.ts
vendored
Normal file
6
TypeScript/12ClassExtensionOverride/types/models/eft/match/ICreateGroupRequestData.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { RaidMode } from "../../enums/RaidMode";
|
||||||
|
export interface ICreateGroupRequestData {
|
||||||
|
location: string;
|
||||||
|
raidMode: RaidMode;
|
||||||
|
startInGroup: boolean;
|
||||||
|
}
|
@ -1,8 +1,9 @@
|
|||||||
|
import { RaidMode } from "../../enums/RaidMode";
|
||||||
export interface IGetGroupStatusRequestData {
|
export interface IGetGroupStatusRequestData {
|
||||||
location: string;
|
location: string;
|
||||||
savage: boolean;
|
savage: boolean;
|
||||||
dt: string;
|
dt: string;
|
||||||
keyId: string;
|
keyId: string;
|
||||||
raidMode: string;
|
raidMode: RaidMode;
|
||||||
startInGroup: boolean;
|
startInGroup: boolean;
|
||||||
}
|
}
|
||||||
|
10
TypeScript/12ClassExtensionOverride/types/models/eft/match/IPutMetricsRequestData.d.ts
vendored
Normal file
10
TypeScript/12ClassExtensionOverride/types/models/eft/match/IPutMetricsRequestData.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export interface IPutMetricsRequestData {
|
||||||
|
sid: string;
|
||||||
|
settings: any;
|
||||||
|
SharedSettings: any;
|
||||||
|
HardwareDescription: any;
|
||||||
|
Location: string;
|
||||||
|
Metrics: any;
|
||||||
|
ClientEvents: any;
|
||||||
|
SpikeSamples: any[];
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
import { BotAmount } from "../../enums/BotAmount";
|
||||||
|
import { BotDifficulty } from "../../enums/BotDifficulty";
|
||||||
export interface IStartOfflineRaidRequestData {
|
export interface IStartOfflineRaidRequestData {
|
||||||
locationName: string;
|
locationName: string;
|
||||||
startTime: number;
|
startTime: number;
|
||||||
@ -16,11 +18,11 @@ export interface TimeAndWeatherSettings {
|
|||||||
export interface BotsSettings {
|
export interface BotsSettings {
|
||||||
isEnabled: boolean;
|
isEnabled: boolean;
|
||||||
isScavWars: boolean;
|
isScavWars: boolean;
|
||||||
botAmount: string;
|
botAmount: BotAmount;
|
||||||
}
|
}
|
||||||
export interface WavesSettings {
|
export interface WavesSettings {
|
||||||
botDifficulty: string;
|
botDifficulty: BotDifficulty;
|
||||||
isBosses: boolean;
|
isBosses: boolean;
|
||||||
isTaggedAndCursed: boolean;
|
isTaggedAndCursed: boolean;
|
||||||
wavesBotAmount: string;
|
wavesBotAmount: BotAmount;
|
||||||
}
|
}
|
||||||
|
3
TypeScript/12ClassExtensionOverride/types/models/eft/match/IUpdatePingRequestData.d.ts
vendored
Normal file
3
TypeScript/12ClassExtensionOverride/types/models/eft/match/IUpdatePingRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface IUpdatePingRequestData {
|
||||||
|
servers: any[];
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
export interface ICompleteQuestRequestData {
|
export interface ICompleteQuestRequestData {
|
||||||
Action: string;
|
Action: string;
|
||||||
|
/** Quest Id */
|
||||||
qid: string;
|
qid: string;
|
||||||
removeExcessItems: boolean;
|
removeExcessItems: boolean;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
export interface ISendRagfairReportRequestData {
|
||||||
|
offerId: number;
|
||||||
|
}
|
7
TypeScript/12ClassExtensionOverride/types/models/enums/BotAmount.d.ts
vendored
Normal file
7
TypeScript/12ClassExtensionOverride/types/models/enums/BotAmount.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export declare enum BotAmount {
|
||||||
|
AsOnline = "AsOnline",
|
||||||
|
Low = "Low",
|
||||||
|
Medium = "Medium",
|
||||||
|
High = "High",
|
||||||
|
Horde = "Horde"
|
||||||
|
}
|
8
TypeScript/12ClassExtensionOverride/types/models/enums/BotDifficulty.d.ts
vendored
Normal file
8
TypeScript/12ClassExtensionOverride/types/models/enums/BotDifficulty.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export declare enum BotDifficulty {
|
||||||
|
AsOnline = "AsOnline",
|
||||||
|
Easy = "Easy",
|
||||||
|
Medium = "Medium",
|
||||||
|
Hard = "Hard",
|
||||||
|
Impossible = "Impossible",
|
||||||
|
Random = "Random"
|
||||||
|
}
|
8
TypeScript/12ClassExtensionOverride/types/models/enums/QuestRewardType.d.ts
vendored
Normal file
8
TypeScript/12ClassExtensionOverride/types/models/enums/QuestRewardType.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export declare enum QuestRewardType {
|
||||||
|
Skill = "Skill",
|
||||||
|
Experience = "Experience",
|
||||||
|
TraderStanding = "TraderStanding",
|
||||||
|
TraderUnlock = "TraderUnlock",
|
||||||
|
Item = "Item",
|
||||||
|
AssortmentUnlock = "AssortmentUnlock"
|
||||||
|
}
|
10
TypeScript/12ClassExtensionOverride/types/models/enums/QuestStatus.d.ts
vendored
Normal file
10
TypeScript/12ClassExtensionOverride/types/models/enums/QuestStatus.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export declare enum QuestStatus {
|
||||||
|
Locked = 0,
|
||||||
|
AvailableForStart = 1,
|
||||||
|
Started = 2,
|
||||||
|
AvailableForFinish = 3,
|
||||||
|
Success = 4,
|
||||||
|
Fail = 5,
|
||||||
|
FailRestartable = 6,
|
||||||
|
MarkedAsFailed = 7
|
||||||
|
}
|
5
TypeScript/12ClassExtensionOverride/types/models/enums/RaidMode.d.ts
vendored
Normal file
5
TypeScript/12ClassExtensionOverride/types/models/enums/RaidMode.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export declare enum RaidMode {
|
||||||
|
Online = "Online",
|
||||||
|
Local = "Local",
|
||||||
|
Coop = "Coop"
|
||||||
|
}
|
@ -14,6 +14,7 @@ export interface RaidMenuSettings {
|
|||||||
bossEnabled: boolean;
|
bossEnabled: boolean;
|
||||||
scavWars: boolean;
|
scavWars: boolean;
|
||||||
taggedAndCursed: boolean;
|
taggedAndCursed: boolean;
|
||||||
|
enablePve: boolean;
|
||||||
}
|
}
|
||||||
export interface Save {
|
export interface Save {
|
||||||
loot: boolean;
|
loot: boolean;
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class MatchLocationService {
|
export declare class MatchLocationService {
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected locations: {};
|
protected locations: {};
|
||||||
constructor(timeUtil: TimeUtil);
|
constructor(timeUtil: TimeUtil);
|
||||||
createGroup(sessionID: string, info: any): any;
|
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||||
deleteGroup(info: any): void;
|
deleteGroup(info: any): void;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
@ -43,4 +44,11 @@ export declare class RagfairPriceService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
|
getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
|
||||||
|
/**
|
||||||
|
* Attempt to get the default preset for a weapon, failing that get the first preset in the array
|
||||||
|
* (assumes default = has encyclopedia entry)
|
||||||
|
* @param presets weapon presets to choose from
|
||||||
|
* @returns Default preset object
|
||||||
|
*/
|
||||||
|
protected getDefaultWeaponPreset(presets: Preset[], weapon: Item): Preset;
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,15 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
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 { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||||
|
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -18,21 +21,21 @@ 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);
|
||||||
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
||||||
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
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;
|
||||||
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
putMetrics(url: string, info: any, sessionID: string): INullResponseData;
|
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
|
||||||
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<any> | IGetBodyResponseData<true>;
|
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
createGroup(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
|
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { PresetBuildController } from "../controllers/PresetBuildController";
|
import { PresetBuildController } from "../controllers/PresetBuildController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
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";
|
||||||
@ -9,7 +10,7 @@ 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: any, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric
|
|||||||
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
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 { 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 { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -36,5 +37,5 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
|||||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
sendReport(url: string, info: any, sessionID: string): INullResponseData;
|
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,29 @@ export declare class HealthController {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
/**
|
||||||
|
* stores in-raid player health
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param info Request data
|
||||||
|
* @param sessionID
|
||||||
|
* @param addEffects Should effects found be added or removed from profile
|
||||||
|
*/
|
||||||
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
||||||
|
/**
|
||||||
|
* When healing in menu
|
||||||
|
* @param pmcData
|
||||||
|
* @param body
|
||||||
|
* @param sessionID
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Occurs on post-raid healing page
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param info Request data from client
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
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