master #3
@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "Faupi-HideoutArchitect",
|
||||
"author": "Faupi",
|
||||
"version": "1.5.0",
|
||||
"version": "1.5.1",
|
||||
"license": "NCSA Open Source",
|
||||
"main": "./src/hideoutarchitect.js",
|
||||
"akiVersion": "3.0.0",
|
||||
"akiVersion": "3.1.0",
|
||||
"devDependencies": {
|
||||
"@types/node": "^17.0.35"
|
||||
}
|
||||
"@types/node": "^17.0.35"
|
||||
}
|
||||
"updated by": "CWX, Valens"
|
||||
}
|
||||
|
Binary file not shown.
@ -1,27 +0,0 @@
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||
import { IHealthConfig } from "../models/spt/config/IHealthConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class HealthHelper {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected logger: ILogger;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected saveServer: SaveServer;
|
||||
protected configServer: ConfigServer;
|
||||
protected healthConfig: IHealthConfig;
|
||||
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
|
||||
resetVitality(sessionID: string): IAkiProfile;
|
||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): 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;
|
||||
protected isEmpty(map: any): boolean;
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader";
|
||||
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { PlayerService } from "../services/PlayerService";
|
||||
import { HandbookHelper } from "./HandbookHelper";
|
||||
import { ItemHelper } from "./ItemHelper";
|
||||
import { PaymentHelper } from "./PaymentHelper";
|
||||
import { ProfileHelper } from "./ProfileHelper";
|
||||
export declare class TraderHelper {
|
||||
protected logger: ILogger;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected saveServer: SaveServer;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected handbookHelper: HandbookHelper;
|
||||
protected playerService: PlayerService;
|
||||
protected fenceService: FenceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected traderConfig: ITraderConfig;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer);
|
||||
getTrader(traderID: string, sessionID: string): ITraderBase;
|
||||
getTraderAssortsById(traderId: string): ITraderAssort;
|
||||
/**
|
||||
* Reset a trader back to its initial state as seen by a level 1 player
|
||||
* Does NOT take into account different profile levels
|
||||
* @param sessionID session id
|
||||
* @param traderID trader id to reset
|
||||
*/
|
||||
resetTrader(sessionID: string, traderID: string): void;
|
||||
changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void;
|
||||
getPurchasesData(traderID: string, sessionID: string): Record<string, IBarterScheme[][]>;
|
||||
/**
|
||||
* Calculate traders level based on exp amount and increment level if over threshold
|
||||
* @param traderID trader to process
|
||||
* @param sessionID session id
|
||||
*/
|
||||
lvlUp(traderID: string, sessionID: string): void;
|
||||
getTraderUpdateSeconds(traderId: string): number;
|
||||
/**
|
||||
* check if an item is allowed to be sold to a trader
|
||||
* @param traderFilters array of allowed categories
|
||||
* @param tplToCheck itemTpl of inventory
|
||||
* @returns boolean
|
||||
*/
|
||||
traderFilter(traderFilters: string[], tplToCheck: string): boolean;
|
||||
getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel;
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||
export declare class RagfairCategoriesService {
|
||||
updateCategories(offers: IRagfairOffer[]): void;
|
||||
protected categories: Record<string, number>;
|
||||
getCategories(): Record<string, number>;
|
||||
getCategoryByItemId(itemId: string): number;
|
||||
resetCategories(): void;
|
||||
setCategoryValue(itemId: string, newValue: number): void;
|
||||
incrementCategory(itemId: string): void;
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { IDatabaseTables } from "../models/spt/server/IDatabaseTables";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ImageRouter } from "../routers/ImageRouter";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { CustomHandbookItemService } from "../services/CustomHandbookItemService";
|
||||
import { CustomItemService } from "../services/CustomItemService";
|
||||
import { CustomPresetService } from "../services/customPresetService";
|
||||
import { CustomTraderAssortService } from "../services/CustomTraderAssortService";
|
||||
import { JsonUtil } from "./JsonUtil";
|
||||
import { VFS } from "./VFS";
|
||||
export declare class DatabaseImporter extends OnLoad {
|
||||
protected logger: ILogger;
|
||||
protected vfs: VFS;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected customItemService: CustomItemService;
|
||||
protected customTraderAssortService: CustomTraderAssortService;
|
||||
protected customHandbookItemService: CustomHandbookItemService;
|
||||
protected customPresetService: CustomPresetService;
|
||||
protected imageRouter: ImageRouter;
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter);
|
||||
onLoad(): void;
|
||||
/**
|
||||
* Read all json files in database folder and map into a json object
|
||||
* @param filepath path to database folder
|
||||
*/
|
||||
protected hydrateDatabase(filepath: string): void;
|
||||
/**
|
||||
* Get all items added through CustomItemService and add to database.templates.items
|
||||
* @param dataToImport db data to amend
|
||||
*/
|
||||
protected addCustomItemsToDb(dataToImport: IDatabaseTables): void;
|
||||
/**
|
||||
* Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort
|
||||
* @param dataToImport db data to amend
|
||||
*/
|
||||
protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void;
|
||||
/**
|
||||
* Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items
|
||||
* @param dataToImport db data to amend
|
||||
*/
|
||||
protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void;
|
||||
/**
|
||||
* Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets
|
||||
* @param dataToImport
|
||||
*/
|
||||
protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void;
|
||||
getRoute(): string;
|
||||
loadRecursive(filepath: string): IDatabaseTables;
|
||||
loadImages(filepath: string): void;
|
||||
}
|
Binary file not shown.
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "SeeItemValue",
|
||||
"author": "KcY",
|
||||
"version": "1.3.5",
|
||||
"version": "1.3.6",
|
||||
"license": "NCSA Open Source",
|
||||
"main": "src/mod.js",
|
||||
"akiVersion": "3.0.0",
|
||||
"UpdatedBy": "CWX",
|
||||
"akiVersion": "3.1.0",
|
||||
"UpdatedBy": "CWX, Valens",
|
||||
"scripts": {
|
||||
"setup:environment": "npm i",
|
||||
"build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" ./**/*.* ./dist",
|
@ -30,7 +30,7 @@ class SeeItemValue implements IMod
|
||||
private tradersArr;
|
||||
private cfg;
|
||||
|
||||
public load(container: DependencyContainer)
|
||||
public preAkiLoad(container: DependencyContainer)
|
||||
{
|
||||
this.pkg = require("../package.json");
|
||||
this.router = container.resolve<DynamicRouterModService>("DynamicRouterModService");
|
||||
@ -41,7 +41,7 @@ class SeeItemValue implements IMod
|
||||
this.addRoute()
|
||||
}
|
||||
|
||||
public delayedLoad(container: DependencyContainer)
|
||||
public postAkiLoad(container: DependencyContainer)
|
||||
{
|
||||
this.database = container.resolve<DatabaseServer>("DatabaseServer");
|
||||
this.table = this.database.getTables();
|
||||
@ -91,18 +91,6 @@ class SeeItemValue implements IMod
|
||||
let parentId = "";
|
||||
let origiMax = 1;
|
||||
|
||||
if (!this.items[id])
|
||||
{
|
||||
const result = {
|
||||
multiplier: 1,
|
||||
price: 1,
|
||||
originalMax: 1
|
||||
}
|
||||
|
||||
this.debugMode("Item was not in Item's Json - returning 1 as price", "yellow");
|
||||
return result;
|
||||
}
|
||||
|
||||
if (id === "5449016a4bdc2d6f028b456f")
|
||||
{
|
||||
const result = {
|
||||
@ -119,12 +107,12 @@ class SeeItemValue implements IMod
|
||||
const result = {
|
||||
multiplier: 1,
|
||||
price: this.livePrice[id],
|
||||
originalMax: this.getOrigiDura(id)
|
||||
originalMax: 1
|
||||
};
|
||||
if (typeof result != "undefined")
|
||||
{
|
||||
this.debugMode("Config setting false for traders - returning livePrice AVG", "yellow");
|
||||
return result;
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ import { GameController } from "../controllers/GameController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
||||
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
|
||||
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
@ -20,5 +21,6 @@ declare class GameCallbacks {
|
||||
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
||||
}
|
||||
export { GameCallbacks };
|
@ -13,6 +13,13 @@ export declare class HealthCallbacks {
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected healthController: HealthController;
|
||||
constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController);
|
||||
/**
|
||||
* Custom aki server request found in modules/HealthSynchronizer.cs
|
||||
* @param url
|
||||
* @param info HealthListener.Instance.CurrentHealth class
|
||||
* @param sessionID session id
|
||||
* @returns empty response, no data sent back to client
|
||||
*/
|
||||
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
@ -3,6 +3,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
||||
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||
@ -17,7 +18,7 @@ export declare class InsuranceCallbacks extends OnLoadOnUpdate {
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||
onLoad(): void;
|
||||
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
|
||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
onUpdate(secondsSinceLastRun: number): boolean;
|
||||
getRoute(): string;
|
@ -1,10 +1,17 @@
|
||||
import { MatchController } from "../controllers/MatchController";
|
||||
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";
|
||||
@ -14,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;
|
||||
exitToMenu(url: string, info: any, sessionID: string): INullResponseData;
|
||||
startGroupSearch(url: string, info: any, sessionID: string): INullResponseData;
|
||||
stopGroupSearch(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: any, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||
joinMatch(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
|
||||
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: any, sessionID: string): IGetBodyResponseData<any>;
|
||||
createGroup(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
|
||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, 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,5 +1,5 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { DelayedModLoader } from "../loaders/DelayedModLoader";
|
||||
import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -9,10 +9,10 @@ declare class ModCallbacks extends OnLoad {
|
||||
protected logger: ILogger;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected httpServer: IHttpServer;
|
||||
protected modLoader: DelayedModLoader;
|
||||
protected postAkiModLoader: PostAkiModLoader;
|
||||
protected configServer: ConfigServer;
|
||||
protected httpConfig: IHttpConfig;
|
||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, postAkiModLoader: PostAkiModLoader, configServer: ConfigServer);
|
||||
onLoad(): void;
|
||||
getRoute(): string;
|
||||
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
@ -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;
|
||||
}
|
@ -3,6 +3,7 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
||||
import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData";
|
||||
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
|
||||
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
|
||||
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
|
||||
@ -23,7 +24,14 @@ export declare class ProfileCallbacks {
|
||||
changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
/**
|
||||
* Called when creating a character, when you choose a character face/voice
|
||||
* @param url
|
||||
* @param info response (empty)
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
|
||||
searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData<ISearchFriendResponse[]>;
|
||||
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
|
||||
getAllMiniProfiles(url: string, info: any, sessionID: string): string;
|
@ -9,8 +9,10 @@ import { IAddOfferRequestData } from "../models/eft/ragfair/IAddOfferRequestData
|
||||
import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData";
|
||||
import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
|
||||
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
|
||||
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";
|
||||
@ -28,12 +30,12 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
||||
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
||||
onLoad(): void;
|
||||
getRoute(): string;
|
||||
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
||||
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
||||
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
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;
|
||||
}
|
@ -1,33 +1,28 @@
|
||||
import { GameHelper } from "../helpers/GameHelper";
|
||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { LocaleService } from "../services/LocaleService";
|
||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||
import { Watermark } from "../utils/Watermark";
|
||||
export declare class GameController {
|
||||
protected logger: ILogger;
|
||||
protected watermark: Watermark;
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
protected localeService: LocaleService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected gameHelper: GameHelper;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected configServer: ConfigServer;
|
||||
protected httpConfig: IHttpConfig;
|
||||
constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer);
|
||||
protected coreConfig: ICoreConfig;
|
||||
constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, localeService: LocaleService, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void;
|
||||
protected addMissingBonusesProperty(pmcProfile: IPmcData): void;
|
||||
protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void;
|
||||
protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void;
|
||||
protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void;
|
||||
protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void;
|
||||
protected fixNullTraderSalesSums(pmcProfile: IPmcData): void;
|
||||
protected removeDanglingBackendCounters(pmcProfile: IPmcData): void;
|
||||
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
||||
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||
getServer(): any[];
|
||||
protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[];
|
||||
}
|
@ -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;
|
||||
}
|
@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
||||
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||
@ -33,6 +34,12 @@ export declare class InsuranceController {
|
||||
insuranceService: InsuranceService, configServer: ConfigServer);
|
||||
processReturn(): void;
|
||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): any;
|
||||
/**
|
||||
* Calculate insurance cost
|
||||
* @param info request object
|
||||
* @param sessionID session id
|
||||
* @returns response object to send to client
|
||||
*/
|
||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||
doAbsolutelyNothing(): void;
|
||||
}
|
@ -24,6 +24,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class InventoryController {
|
||||
@ -31,12 +33,14 @@ export declare class InventoryController {
|
||||
protected hashUtil: HashUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected fenceService: FenceService;
|
||||
protected presetHelper: PresetHelper;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected ragfairOfferService: RagfairOfferService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter);
|
||||
/**
|
||||
* Move Item
|
||||
* change location of item with parentId and slotId
|
||||
@ -93,9 +97,19 @@ export declare class InventoryController {
|
||||
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles examining of the item *
|
||||
* Handles examining an item
|
||||
* @param pmcData player profile
|
||||
* @param body request object
|
||||
* @param sessionID session id
|
||||
* @returns response
|
||||
*/
|
||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get the tplid of an item from the examine request object
|
||||
* @param body response request
|
||||
* @returns tplid
|
||||
*/
|
||||
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles sorting of Inventory.
|
@ -1,30 +1,36 @@
|
||||
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";
|
||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { MatchLocationService } from "../services/MatchLocationService";
|
||||
export declare class MatchController {
|
||||
protected saveServer: SaveServer;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected matchLocationService: MatchLocationService;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected configServer: ConfigServer;
|
||||
protected matchConfig: IMatchConfig;
|
||||
protected inraidConfig: IInRaidConfig;
|
||||
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer);
|
||||
getEnabled(): boolean;
|
||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||
protected getMatch(location: any): any;
|
||||
createGroup(sessionID: string, info: any): any;
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
deleteGroup(info: any): void;
|
||||
joinMatch(info: any, sessionID: string): any[];
|
||||
getGroupStatus(info: any): any;
|
||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||
protected getMatch(location: string): any;
|
||||
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
||||
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||
}
|
@ -11,6 +11,7 @@ import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendRespon
|
||||
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class ProfileController {
|
||||
@ -19,13 +20,20 @@ export declare class ProfileController {
|
||||
protected saveServer: SaveServer;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected extendedProfileHelper: ExtendedProfileHelper;
|
||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper);
|
||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper);
|
||||
getMiniProfiles(): IMiniProfile[];
|
||||
getMiniProfile(sessionID: string): any;
|
||||
getCompleteProfile(sessionID: string): IPmcData[];
|
||||
createProfile(info: IProfileCreateRequestData, sessionID: string): void;
|
||||
/**
|
||||
* Generate a player scav object
|
||||
* pmc profile MUST exist first before pscav can be generated
|
||||
* @param sessionID
|
||||
* @returns IPmcData object
|
||||
*/
|
||||
generatePlayerScav(sessionID: string): IPmcData;
|
||||
validateNickname(info: IValidateNicknameRequestData, sessionID: string): string;
|
||||
changeNickname(info: IProfileChangeNicknameRequestData, sessionID: string): string;
|
@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocaleService } from "../services/LocaleService";
|
||||
import { PlayerService } from "../services/PlayerService";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class QuestController {
|
||||
@ -27,9 +28,10 @@ export declare class QuestController {
|
||||
protected questHelper: QuestHelper;
|
||||
protected questConditionHelper: QuestConditionHelper;
|
||||
protected playerService: PlayerService;
|
||||
protected localeService: LocaleService;
|
||||
protected configServer: ConfigServer;
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, configServer: ConfigServer);
|
||||
/**
|
||||
* Get all quests visible to player
|
||||
* Exclude quests with incomplete preconditions (level/loyalty)
|
@ -60,6 +60,8 @@ export declare class RagfairController {
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer);
|
||||
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
|
||||
protected isLinkedSearch(info: ISearchRequestData): boolean;
|
||||
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
||||
update(): void;
|
||||
getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
@ -1,4 +1,3 @@
|
||||
import { GameHelper } from "../helpers/GameHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
@ -16,6 +15,7 @@ import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { PaymentService } from "../services/PaymentService";
|
||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { MathUtil } from "../utils/MathUtil";
|
||||
import { ObjectId } from "../utils/ObjectId";
|
||||
@ -58,14 +58,14 @@ export declare class RepeatableQuestController {
|
||||
protected itemHelper: ItemHelper;
|
||||
protected presetHelper: PresetHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected gameHelper: GameHelper;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected ragfairServerHelper: RagfairServerHelper;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected paymentService: PaymentService;
|
||||
protected objectId: ObjectId;
|
||||
protected configServer: ConfigServer;
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer);
|
||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer);
|
||||
/**
|
||||
* This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint
|
||||
* Returns an array of objects in the format of repeatable quests to the client.
|
@ -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 {};
|
@ -1,29 +1,27 @@
|
||||
import { PMCLootGenerator } from "../generators/PMCLootGenerator";
|
||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||
import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
export declare class BotLootGenerator {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected handbookHelper: HandbookHelper;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected pmcLootGenerator: PMCLootGenerator;
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer);
|
||||
generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer);
|
||||
generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, botRole: string, inventory: PmcInventory): void;
|
||||
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
||||
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void;
|
||||
/** Compares two item templates by their price to spawn chance ratio */
|
||||
protected compareByValue(a: ITemplateItem, b: ITemplateItem): number;
|
||||
}
|
@ -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
|
||||
@ -41,6 +43,13 @@ export declare class BotWeaponGenerator {
|
||||
* @returns
|
||||
*/
|
||||
protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void;
|
||||
/**
|
||||
* Get a randomised number of bullets for a specific magazine
|
||||
* @param magCounts min and max count of magazines
|
||||
* @param magTemplate magazine to generate bullet count for
|
||||
* @returns bullet count number
|
||||
*/
|
||||
protected getRandomisedBulletCount(magCounts: MinMax, magTemplate: ITemplateItem): number;
|
||||
/**
|
||||
* Get a randomised count of magazines
|
||||
* @param magCounts min and max value returned value can be between
|
@ -11,6 +11,7 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
|
||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
@ -31,11 +32,12 @@ export declare class RagfairOfferGenerator {
|
||||
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
||||
protected ragfairOfferService: RagfairOfferService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
||||
protected fenceService: FenceService;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
||||
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||
protected getTraderId(userID: string): string;
|
||||
protected getRating(userID: string): number;
|
@ -29,6 +29,12 @@ export declare class BotGeneratorHelper {
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer);
|
||||
generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[];
|
||||
/**
|
||||
* Is this magazine cylinder related (revolvers and grenade launchers)
|
||||
* @param magazineParentName the name of the magazines parent
|
||||
* @returns true if it is cylinder related
|
||||
*/
|
||||
magazineIsCylinderRelated(magazineParentName: string): boolean;
|
||||
/**
|
||||
* Get a list of non black-listed cartridges from the PMC bot config
|
||||
* @param modSlot mod item slot
|
||||
@ -69,6 +75,12 @@ export declare class BotGeneratorHelper {
|
||||
* @param {object} parentTemplate The CylinderMagazine's template
|
||||
*/
|
||||
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
|
||||
/**
|
||||
* Take a record of camoras and merge the compatable shells into one array
|
||||
* @param camorasWithShells camoras we want to merge into one array
|
||||
* @returns string array of shells fro luitple camora sources
|
||||
*/
|
||||
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
|
||||
upd?: Upd;
|
||||
};
|
@ -2,15 +2,20 @@ import { BotGenerator } from "../generators/BotGenerator";
|
||||
import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
import { Watermark } from "../utils/Watermark";
|
||||
import { ItemHelper } from "./ItemHelper";
|
||||
import { ProfileHelper } from "./ProfileHelper";
|
||||
/**
|
||||
* This class needs to exist outside of ProfileHelper to ensure cyclic deps don't cause the server to fail on load
|
||||
*/
|
||||
export declare class ExtendedProfileHelper extends ProfileHelper {
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected botGenerator: BotGenerator;
|
||||
constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator);
|
||||
constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, botLootCacheService: BotLootCacheService, fenceService: FenceService, botGenerator: BotGenerator);
|
||||
generatePlayerScav(sessionID: string): IPmcData;
|
||||
protected getScavSkills(sessionID: string): Skills;
|
||||
protected removeSecureContainer(profile: IPmcData): IPmcData;
|
@ -0,0 +1,51 @@
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||
import { IHealthConfig } from "../models/spt/config/IHealthConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class HealthHelper {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected logger: ILogger;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected saveServer: SaveServer;
|
||||
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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* 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[];
|
||||
}
|
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