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 { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
@ -18,21 +21,21 @@ export declare class MatchCallbacks {
|
||||
protected matchController: MatchController;
|
||||
protected databaseServer: DatabaseServer;
|
||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
||||
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
||||
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
||||
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
||||
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||
acceptGroupInvite(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[]>;
|
||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||
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;
|
||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { PresetBuildController } from "../controllers/PresetBuildController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
@ -9,7 +10,7 @@ export declare class PresetBuildCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected 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;
|
||||
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 { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -36,5 +37,5 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
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 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;
|
||||
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;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ export declare class InventoryController {
|
||||
* @param body response request
|
||||
* @returns tplid
|
||||
*/
|
||||
protected getItemTpl(body: IInventoryExamineRequestData): string;
|
||||
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles sorting of Inventory.
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
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);
|
||||
getEnabled(): boolean;
|
||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||
createGroup(sessionID: string, info: any): any;
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
deleteGroup(info: any): void;
|
||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||
protected getMatch(location: string): any;
|
||||
|
@ -31,16 +31,54 @@ export declare class BotGenerator {
|
||||
protected botConfig: IBotConfig;
|
||||
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[];
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Log the number of PMCs generated to the debug console
|
||||
*/
|
||||
protected logPmcGeneratedCount(output: IBotBase[]): void;
|
||||
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 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;
|
||||
/**
|
||||
* 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 generateId(bot: IBotBase): IBotBase;
|
||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||
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;
|
||||
}
|
||||
export {};
|
||||
|
@ -9,7 +9,9 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class BotWeaponGenerator {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
@ -18,7 +20,7 @@ export declare class BotWeaponGenerator {
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected randomUtil: RandomUtil;
|
||||
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;
|
||||
/**
|
||||
* 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 healthConfig: IHealthConfig;
|
||||
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;
|
||||
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 saveEffects(pmcData: IPmcData, sessionID: string): void;
|
||||
protected addEffect(pmcData: IPmcData, sessionID: string, effect: {
|
||||
bodyPart: string;
|
||||
effectType: string;
|
||||
}): void;
|
||||
/**
|
||||
* Save effects to profile
|
||||
* Works by removing all effects and adding them back from profile
|
||||
* Remoces empty 'Effects' objects if found
|
||||
* @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;
|
||||
}
|
||||
|
@ -28,6 +28,18 @@ export declare class InRaidHelper {
|
||||
markFoundItems(pmcData: IPmcData, profile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||
removeFoundInRaidStatusFromItems(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;
|
||||
/**
|
||||
* 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[];
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
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 { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
@ -18,7 +18,7 @@ declare class ItemHelper {
|
||||
*/
|
||||
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.
|
||||
* @param {*} tpl template id of item to check
|
||||
* @returns boolean: true if item is valid reward
|
||||
@ -83,6 +83,11 @@ declare class ItemHelper {
|
||||
* @returns {array} The array of StackSlotItems
|
||||
*/
|
||||
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];
|
||||
/**
|
||||
* get normalized value (0-1) based on item condition
|
||||
@ -90,24 +95,64 @@ declare class ItemHelper {
|
||||
* @returns number between 0 and 1
|
||||
*/
|
||||
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[];
|
||||
/**
|
||||
* 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[];
|
||||
/**
|
||||
* 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[];
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Is Dogtag
|
||||
* Checks if an item is a dogtag. Used under profile_f.js to modify preparePrice based
|
||||
* on the level of the dogtag
|
||||
* is the passed in template id a dog tag
|
||||
* @param tpl Template id to check
|
||||
* @returns true if it is a dogtag
|
||||
*/
|
||||
isDogtag(tpl: string): boolean;
|
||||
/**
|
||||
* Can the item passed in be sold to a trader because it is raw money
|
||||
* @param tpl Item template id to check
|
||||
* @returns true if unsellable
|
||||
*/
|
||||
isNotSellable(tpl: string): boolean;
|
||||
/**
|
||||
* Gets the identifier for a child using slotId, locationX and locationY.
|
||||
* @param item
|
||||
* @returns "slotId OR slotid,locationX,locationY"
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* split item stack if it exceeds StackMaxSize
|
||||
@ -122,10 +167,12 @@ declare class ItemHelper {
|
||||
*/
|
||||
findBarterItems(by: string, pmcData: IPmcData, barter_itemID: string): any[];
|
||||
/**
|
||||
* @param {Object} pmcData
|
||||
* @param {Array} items
|
||||
* @param {Object} fastPanel
|
||||
* @returns Array
|
||||
*
|
||||
* @param pmcData
|
||||
* @param items
|
||||
* @param insuredItems insured items to not replace ids for
|
||||
* @param fastPanel
|
||||
* @returns
|
||||
*/
|
||||
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
||||
/**
|
||||
@ -141,6 +188,12 @@ declare class ItemHelper {
|
||||
* @returns 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;
|
||||
}
|
||||
declare namespace ItemHelper {
|
||||
|
@ -1,9 +1,11 @@
|
||||
import { Preset } from "../models/eft/common/IGlobals";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class PresetHelper {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected lookup: Record<string, string[]>;
|
||||
constructor(databaseServer: DatabaseServer);
|
||||
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer);
|
||||
hydratePresetStore(input: Record<string, string[]>): void;
|
||||
isPreset(id: string): boolean;
|
||||
hasPreset(templateId: string): boolean;
|
||||
|
@ -20,6 +20,12 @@ export declare class ProfileHelper {
|
||||
resetProfileQuestCondition(sessionID: string, conditionId: string): void;
|
||||
getCompleteProfile(sessionID: string): IPmcData[];
|
||||
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;
|
||||
getExperience(level: number): number;
|
||||
getMaxLevel(): number;
|
||||
|
@ -75,8 +75,22 @@ export declare class QuestHelper {
|
||||
*/
|
||||
cleanQuestConditions(quest: IQuest): IQuest;
|
||||
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;
|
||||
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[];
|
||||
/**
|
||||
* Get the intel center bonus a player has
|
||||
|
@ -35,7 +35,13 @@ export declare class TraderHelper {
|
||||
* @param traderID trader id to reset
|
||||
*/
|
||||
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
|
||||
* @param traderID trader id being traded with
|
||||
@ -79,7 +85,14 @@ export declare class TraderHelper {
|
||||
protected getRawItemPrice(pmcData: IPmcData, item: Item): 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 sessionID session id
|
||||
*/
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { QuestRewardType } from "../../../enums/QuestRewardType";
|
||||
import { Item } from "./IItem";
|
||||
export interface IQuest {
|
||||
QuestName: string;
|
||||
@ -99,9 +100,9 @@ export interface Rewards {
|
||||
Expired: Reward[];
|
||||
}
|
||||
export interface Reward {
|
||||
value?: string;
|
||||
value?: string | number;
|
||||
id: string;
|
||||
type: string;
|
||||
type: QuestRewardType;
|
||||
index: number;
|
||||
target?: string;
|
||||
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 {
|
||||
location: string;
|
||||
savage: boolean;
|
||||
dt: string;
|
||||
keyId: string;
|
||||
raidMode: string;
|
||||
raidMode: RaidMode;
|
||||
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 {
|
||||
locationName: string;
|
||||
startTime: number;
|
||||
@ -16,11 +18,11 @@ export interface TimeAndWeatherSettings {
|
||||
export interface BotsSettings {
|
||||
isEnabled: boolean;
|
||||
isScavWars: boolean;
|
||||
botAmount: string;
|
||||
botAmount: BotAmount;
|
||||
}
|
||||
export interface WavesSettings {
|
||||
botDifficulty: string;
|
||||
botDifficulty: BotDifficulty;
|
||||
isBosses: 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 {
|
||||
Action: string;
|
||||
/** Quest Id */
|
||||
qid: string;
|
||||
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;
|
||||
scavWars: boolean;
|
||||
taggedAndCursed: boolean;
|
||||
enablePve: boolean;
|
||||
}
|
||||
export interface Save {
|
||||
loot: boolean;
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class MatchLocationService {
|
||||
protected timeUtil: TimeUtil;
|
||||
protected locations: {};
|
||||
constructor(timeUtil: TimeUtil);
|
||||
createGroup(sessionID: string, info: any): any;
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
deleteGroup(info: any): void;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { Preset } from "../models/eft/common/IGlobals";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
@ -43,4 +44,11 @@ export declare class RagfairPriceService {
|
||||
* @returns
|
||||
*/
|
||||
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 { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
@ -18,21 +21,21 @@ export declare class MatchCallbacks {
|
||||
protected matchController: MatchController;
|
||||
protected databaseServer: DatabaseServer;
|
||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
||||
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
||||
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
||||
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
||||
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||
acceptGroupInvite(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[]>;
|
||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||
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;
|
||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { PresetBuildController } from "../controllers/PresetBuildController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
@ -9,7 +10,7 @@ export declare class PresetBuildCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected 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;
|
||||
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 { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -36,5 +37,5 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
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 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;
|
||||
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;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ export declare class InventoryController {
|
||||
* @param body response request
|
||||
* @returns tplid
|
||||
*/
|
||||
protected getItemTpl(body: IInventoryExamineRequestData): string;
|
||||
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles sorting of Inventory.
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
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);
|
||||
getEnabled(): boolean;
|
||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||
createGroup(sessionID: string, info: any): any;
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
deleteGroup(info: any): void;
|
||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||
protected getMatch(location: string): any;
|
||||
|
@ -31,16 +31,54 @@ export declare class BotGenerator {
|
||||
protected botConfig: IBotConfig;
|
||||
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[];
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Log the number of PMCs generated to the debug console
|
||||
*/
|
||||
protected logPmcGeneratedCount(output: IBotBase[]): void;
|
||||
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 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;
|
||||
/**
|
||||
* 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 generateId(bot: IBotBase): IBotBase;
|
||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||
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;
|
||||
}
|
||||
export {};
|
||||
|
@ -9,7 +9,9 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class BotWeaponGenerator {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
@ -18,7 +20,7 @@ export declare class BotWeaponGenerator {
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected randomUtil: RandomUtil;
|
||||
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;
|
||||
/**
|
||||
* 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 healthConfig: IHealthConfig;
|
||||
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;
|
||||
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 saveEffects(pmcData: IPmcData, sessionID: string): void;
|
||||
protected addEffect(pmcData: IPmcData, sessionID: string, effect: {
|
||||
bodyPart: string;
|
||||
effectType: string;
|
||||
}): void;
|
||||
/**
|
||||
* Save effects to profile
|
||||
* Works by removing all effects and adding them back from profile
|
||||
* Remoces empty 'Effects' objects if found
|
||||
* @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;
|
||||
}
|
||||
|
@ -28,6 +28,18 @@ export declare class InRaidHelper {
|
||||
markFoundItems(pmcData: IPmcData, profile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||
removeFoundInRaidStatusFromItems(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;
|
||||
/**
|
||||
* 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[];
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
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 { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
@ -18,7 +18,7 @@ declare class ItemHelper {
|
||||
*/
|
||||
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.
|
||||
* @param {*} tpl template id of item to check
|
||||
* @returns boolean: true if item is valid reward
|
||||
@ -83,6 +83,11 @@ declare class ItemHelper {
|
||||
* @returns {array} The array of StackSlotItems
|
||||
*/
|
||||
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];
|
||||
/**
|
||||
* get normalized value (0-1) based on item condition
|
||||
@ -90,24 +95,64 @@ declare class ItemHelper {
|
||||
* @returns number between 0 and 1
|
||||
*/
|
||||
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[];
|
||||
/**
|
||||
* 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[];
|
||||
/**
|
||||
* 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[];
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Is Dogtag
|
||||
* Checks if an item is a dogtag. Used under profile_f.js to modify preparePrice based
|
||||
* on the level of the dogtag
|
||||
* is the passed in template id a dog tag
|
||||
* @param tpl Template id to check
|
||||
* @returns true if it is a dogtag
|
||||
*/
|
||||
isDogtag(tpl: string): boolean;
|
||||
/**
|
||||
* Can the item passed in be sold to a trader because it is raw money
|
||||
* @param tpl Item template id to check
|
||||
* @returns true if unsellable
|
||||
*/
|
||||
isNotSellable(tpl: string): boolean;
|
||||
/**
|
||||
* Gets the identifier for a child using slotId, locationX and locationY.
|
||||
* @param item
|
||||
* @returns "slotId OR slotid,locationX,locationY"
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* split item stack if it exceeds StackMaxSize
|
||||
@ -122,10 +167,12 @@ declare class ItemHelper {
|
||||
*/
|
||||
findBarterItems(by: string, pmcData: IPmcData, barter_itemID: string): any[];
|
||||
/**
|
||||
* @param {Object} pmcData
|
||||
* @param {Array} items
|
||||
* @param {Object} fastPanel
|
||||
* @returns Array
|
||||
*
|
||||
* @param pmcData
|
||||
* @param items
|
||||
* @param insuredItems insured items to not replace ids for
|
||||
* @param fastPanel
|
||||
* @returns
|
||||
*/
|
||||
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
||||
/**
|
||||
@ -141,6 +188,12 @@ declare class ItemHelper {
|
||||
* @returns 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;
|
||||
}
|
||||
declare namespace ItemHelper {
|
||||
|
@ -1,9 +1,11 @@
|
||||
import { Preset } from "../models/eft/common/IGlobals";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class PresetHelper {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected lookup: Record<string, string[]>;
|
||||
constructor(databaseServer: DatabaseServer);
|
||||
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer);
|
||||
hydratePresetStore(input: Record<string, string[]>): void;
|
||||
isPreset(id: string): boolean;
|
||||
hasPreset(templateId: string): boolean;
|
||||
|
@ -20,6 +20,12 @@ export declare class ProfileHelper {
|
||||
resetProfileQuestCondition(sessionID: string, conditionId: string): void;
|
||||
getCompleteProfile(sessionID: string): IPmcData[];
|
||||
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;
|
||||
getExperience(level: number): number;
|
||||
getMaxLevel(): number;
|
||||
|
@ -75,8 +75,22 @@ export declare class QuestHelper {
|
||||
*/
|
||||
cleanQuestConditions(quest: IQuest): IQuest;
|
||||
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;
|
||||
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[];
|
||||
/**
|
||||
* Get the intel center bonus a player has
|
||||
|
@ -35,7 +35,13 @@ export declare class TraderHelper {
|
||||
* @param traderID trader id to reset
|
||||
*/
|
||||
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
|
||||
* @param traderID trader id being traded with
|
||||
@ -79,7 +85,14 @@ export declare class TraderHelper {
|
||||
protected getRawItemPrice(pmcData: IPmcData, item: Item): 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 sessionID session id
|
||||
*/
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { QuestRewardType } from "../../../enums/QuestRewardType";
|
||||
import { Item } from "./IItem";
|
||||
export interface IQuest {
|
||||
QuestName: string;
|
||||
@ -99,9 +100,9 @@ export interface Rewards {
|
||||
Expired: Reward[];
|
||||
}
|
||||
export interface Reward {
|
||||
value?: string;
|
||||
value?: string | number;
|
||||
id: string;
|
||||
type: string;
|
||||
type: QuestRewardType;
|
||||
index: number;
|
||||
target?: string;
|
||||
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 {
|
||||
location: string;
|
||||
savage: boolean;
|
||||
dt: string;
|
||||
keyId: string;
|
||||
raidMode: string;
|
||||
raidMode: RaidMode;
|
||||
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 {
|
||||
locationName: string;
|
||||
startTime: number;
|
||||
@ -16,11 +18,11 @@ export interface TimeAndWeatherSettings {
|
||||
export interface BotsSettings {
|
||||
isEnabled: boolean;
|
||||
isScavWars: boolean;
|
||||
botAmount: string;
|
||||
botAmount: BotAmount;
|
||||
}
|
||||
export interface WavesSettings {
|
||||
botDifficulty: string;
|
||||
botDifficulty: BotDifficulty;
|
||||
isBosses: 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 {
|
||||
Action: string;
|
||||
/** Quest Id */
|
||||
qid: string;
|
||||
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;
|
||||
scavWars: boolean;
|
||||
taggedAndCursed: boolean;
|
||||
enablePve: boolean;
|
||||
}
|
||||
export interface Save {
|
||||
loot: boolean;
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class MatchLocationService {
|
||||
protected timeUtil: TimeUtil;
|
||||
protected locations: {};
|
||||
constructor(timeUtil: TimeUtil);
|
||||
createGroup(sessionID: string, info: any): any;
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
deleteGroup(info: any): void;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { Preset } from "../models/eft/common/IGlobals";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
@ -43,4 +44,11 @@ export declare class RagfairPriceService {
|
||||
* @returns
|
||||
*/
|
||||
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 { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
@ -18,21 +21,21 @@ export declare class MatchCallbacks {
|
||||
protected matchController: MatchController;
|
||||
protected databaseServer: DatabaseServer;
|
||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
||||
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
||||
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
||||
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
||||
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||
acceptGroupInvite(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[]>;
|
||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||
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;
|
||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { PresetBuildController } from "../controllers/PresetBuildController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
@ -9,7 +10,7 @@ export declare class PresetBuildCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected 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;
|
||||
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 { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -36,5 +37,5 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
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 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;
|
||||
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;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ export declare class InventoryController {
|
||||
* @param body response request
|
||||
* @returns tplid
|
||||
*/
|
||||
protected getItemTpl(body: IInventoryExamineRequestData): string;
|
||||
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles sorting of Inventory.
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
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);
|
||||
getEnabled(): boolean;
|
||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||
createGroup(sessionID: string, info: any): any;
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
deleteGroup(info: any): void;
|
||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||
protected getMatch(location: string): any;
|
||||
|
@ -31,16 +31,54 @@ export declare class BotGenerator {
|
||||
protected botConfig: IBotConfig;
|
||||
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[];
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Log the number of PMCs generated to the debug console
|
||||
*/
|
||||
protected logPmcGeneratedCount(output: IBotBase[]): void;
|
||||
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 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;
|
||||
/**
|
||||
* 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 generateId(bot: IBotBase): IBotBase;
|
||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||
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;
|
||||
}
|
||||
export {};
|
||||
|
@ -9,7 +9,9 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class BotWeaponGenerator {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
@ -18,7 +20,7 @@ export declare class BotWeaponGenerator {
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected randomUtil: RandomUtil;
|
||||
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;
|
||||
/**
|
||||
* 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 healthConfig: IHealthConfig;
|
||||
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;
|
||||
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 saveEffects(pmcData: IPmcData, sessionID: string): void;
|
||||
protected addEffect(pmcData: IPmcData, sessionID: string, effect: {
|
||||
bodyPart: string;
|
||||
effectType: string;
|
||||
}): void;
|
||||
/**
|
||||
* Save effects to profile
|
||||
* Works by removing all effects and adding them back from profile
|
||||
* Remoces empty 'Effects' objects if found
|
||||
* @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;
|
||||
}
|
||||
|
@ -28,6 +28,18 @@ export declare class InRaidHelper {
|
||||
markFoundItems(pmcData: IPmcData, profile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||
removeFoundInRaidStatusFromItems(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;
|
||||
/**
|
||||
* 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[];
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
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 { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
@ -18,7 +18,7 @@ declare class ItemHelper {
|
||||
*/
|
||||
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.
|
||||
* @param {*} tpl template id of item to check
|
||||
* @returns boolean: true if item is valid reward
|
||||
@ -83,6 +83,11 @@ declare class ItemHelper {
|
||||
* @returns {array} The array of StackSlotItems
|
||||
*/
|
||||
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];
|
||||
/**
|
||||
* get normalized value (0-1) based on item condition
|
||||
@ -90,24 +95,64 @@ declare class ItemHelper {
|
||||
* @returns number between 0 and 1
|
||||
*/
|
||||
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[];
|
||||
/**
|
||||
* 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[];
|
||||
/**
|
||||
* 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[];
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Is Dogtag
|
||||
* Checks if an item is a dogtag. Used under profile_f.js to modify preparePrice based
|
||||
* on the level of the dogtag
|
||||
* is the passed in template id a dog tag
|
||||
* @param tpl Template id to check
|
||||
* @returns true if it is a dogtag
|
||||
*/
|
||||
isDogtag(tpl: string): boolean;
|
||||
/**
|
||||
* Can the item passed in be sold to a trader because it is raw money
|
||||
* @param tpl Item template id to check
|
||||
* @returns true if unsellable
|
||||
*/
|
||||
isNotSellable(tpl: string): boolean;
|
||||
/**
|
||||
* Gets the identifier for a child using slotId, locationX and locationY.
|
||||
* @param item
|
||||
* @returns "slotId OR slotid,locationX,locationY"
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* split item stack if it exceeds StackMaxSize
|
||||
@ -122,10 +167,12 @@ declare class ItemHelper {
|
||||
*/
|
||||
findBarterItems(by: string, pmcData: IPmcData, barter_itemID: string): any[];
|
||||
/**
|
||||
* @param {Object} pmcData
|
||||
* @param {Array} items
|
||||
* @param {Object} fastPanel
|
||||
* @returns Array
|
||||
*
|
||||
* @param pmcData
|
||||
* @param items
|
||||
* @param insuredItems insured items to not replace ids for
|
||||
* @param fastPanel
|
||||
* @returns
|
||||
*/
|
||||
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
||||
/**
|
||||
@ -141,6 +188,12 @@ declare class ItemHelper {
|
||||
* @returns 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;
|
||||
}
|
||||
declare namespace ItemHelper {
|
||||
|
@ -1,9 +1,11 @@
|
||||
import { Preset } from "../models/eft/common/IGlobals";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class PresetHelper {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected lookup: Record<string, string[]>;
|
||||
constructor(databaseServer: DatabaseServer);
|
||||
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer);
|
||||
hydratePresetStore(input: Record<string, string[]>): void;
|
||||
isPreset(id: string): boolean;
|
||||
hasPreset(templateId: string): boolean;
|
||||
|
@ -20,6 +20,12 @@ export declare class ProfileHelper {
|
||||
resetProfileQuestCondition(sessionID: string, conditionId: string): void;
|
||||
getCompleteProfile(sessionID: string): IPmcData[];
|
||||
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;
|
||||
getExperience(level: number): number;
|
||||
getMaxLevel(): number;
|
||||
|
@ -75,8 +75,22 @@ export declare class QuestHelper {
|
||||
*/
|
||||
cleanQuestConditions(quest: IQuest): IQuest;
|
||||
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;
|
||||
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[];
|
||||
/**
|
||||
* Get the intel center bonus a player has
|
||||
|
@ -35,7 +35,13 @@ export declare class TraderHelper {
|
||||
* @param traderID trader id to reset
|
||||
*/
|
||||
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
|
||||
* @param traderID trader id being traded with
|
||||
@ -79,7 +85,14 @@ export declare class TraderHelper {
|
||||
protected getRawItemPrice(pmcData: IPmcData, item: Item): 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 sessionID session id
|
||||
*/
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { QuestRewardType } from "../../../enums/QuestRewardType";
|
||||
import { Item } from "./IItem";
|
||||
export interface IQuest {
|
||||
QuestName: string;
|
||||
@ -99,9 +100,9 @@ export interface Rewards {
|
||||
Expired: Reward[];
|
||||
}
|
||||
export interface Reward {
|
||||
value?: string;
|
||||
value?: string | number;
|
||||
id: string;
|
||||
type: string;
|
||||
type: QuestRewardType;
|
||||
index: number;
|
||||
target?: string;
|
||||
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 {
|
||||
location: string;
|
||||
savage: boolean;
|
||||
dt: string;
|
||||
keyId: string;
|
||||
raidMode: string;
|
||||
raidMode: RaidMode;
|
||||
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 {
|
||||
locationName: string;
|
||||
startTime: number;
|
||||
@ -16,11 +18,11 @@ export interface TimeAndWeatherSettings {
|
||||
export interface BotsSettings {
|
||||
isEnabled: boolean;
|
||||
isScavWars: boolean;
|
||||
botAmount: string;
|
||||
botAmount: BotAmount;
|
||||
}
|
||||
export interface WavesSettings {
|
||||
botDifficulty: string;
|
||||
botDifficulty: BotDifficulty;
|
||||
isBosses: 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 {
|
||||
Action: string;
|
||||
/** Quest Id */
|
||||
qid: string;
|
||||
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;
|
||||
scavWars: boolean;
|
||||
taggedAndCursed: boolean;
|
||||
enablePve: boolean;
|
||||
}
|
||||
export interface Save {
|
||||
loot: boolean;
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class MatchLocationService {
|
||||
protected timeUtil: TimeUtil;
|
||||
protected locations: {};
|
||||
constructor(timeUtil: TimeUtil);
|
||||
createGroup(sessionID: string, info: any): any;
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
deleteGroup(info: any): void;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { Preset } from "../models/eft/common/IGlobals";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
@ -43,4 +44,11 @@ export declare class RagfairPriceService {
|
||||
* @returns
|
||||
*/
|
||||
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 { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
@ -18,21 +21,21 @@ export declare class MatchCallbacks {
|
||||
protected matchController: MatchController;
|
||||
protected databaseServer: DatabaseServer;
|
||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
||||
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
||||
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
||||
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
||||
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||
acceptGroupInvite(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[]>;
|
||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||
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;
|
||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { PresetBuildController } from "../controllers/PresetBuildController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
@ -9,7 +10,7 @@ export declare class PresetBuildCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected 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;
|
||||
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 { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -36,5 +37,5 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
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 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;
|
||||
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;
|
||||
}
|
||||
|
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