Add example 7
This commit is contained in:
parent
c15fcecd0a
commit
ef3da47ec2
@ -1,15 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
class Mod {
|
|
||||||
// Code added here will load BEFORE the server has started loading
|
|
||||||
load(container) {
|
|
||||||
// get the logger from the server container
|
|
||||||
const logger = container.resolve("WinstonLogger");
|
|
||||||
logger.info("I am logging info!");
|
|
||||||
logger.warning("I am logging a warning!");
|
|
||||||
logger.error("I am logging an error!");
|
|
||||||
}
|
|
||||||
// Code added here will be run AFTER the server has started
|
|
||||||
delayedLoad(container) { return; }
|
|
||||||
}
|
|
||||||
module.exports = { mod: new Mod() };
|
|
@ -1,20 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
class Mod {
|
|
||||||
// not used for this example
|
|
||||||
load(container) { return; }
|
|
||||||
delayedLoad(container) {
|
|
||||||
// get database from server
|
|
||||||
const databaseServer = container.resolve("DatabaseServer");
|
|
||||||
// Get all the in-memory json found in /assets/database
|
|
||||||
const tables = databaseServer.getTables();
|
|
||||||
// find the ledx item by its Id
|
|
||||||
const ledx = tables.templates.items["5c0530ee86f774697952d952"];
|
|
||||||
// update one of its properties to be true
|
|
||||||
ledx._props.CanSellOnRagfair = true;
|
|
||||||
// example #2
|
|
||||||
// get globals settings and set flea market min level to be 1
|
|
||||||
tables.globals.config.RagFair.minUserLevel = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
module.exports = { mod: new Mod() };
|
|
@ -1,22 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
class Mod {
|
|
||||||
// not used for this example
|
|
||||||
load(container) { return; }
|
|
||||||
delayedLoad(container) {
|
|
||||||
// get logger
|
|
||||||
const logger = container.resolve("WinstonLogger");
|
|
||||||
// get the config server
|
|
||||||
const configServer = container.resolve("ConfigServer");
|
|
||||||
// Request bot config
|
|
||||||
// Required - ConfigTypes.BOT is the enum of the config we want, others include ConfigTypes.Airdrop
|
|
||||||
const botConfig = configServer.getConfig("aki-bot" /* BOT */);
|
|
||||||
// log the original pmc difficulty
|
|
||||||
logger.info(`here is the original bot pmc difficulty: ${botConfig.pmc.difficulty}`);
|
|
||||||
// adjust the difficulty
|
|
||||||
botConfig.pmc.difficulty = "easy";
|
|
||||||
// log the new pmc difficulty
|
|
||||||
logger.info(`here is the altered bot pmc difficulty: ${botConfig.pmc.difficulty}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
module.exports = { mod: new Mod() };
|
|
@ -1,16 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
class Mod {
|
|
||||||
constructor() {
|
|
||||||
this.modConfig = require("../config/config.json");
|
|
||||||
}
|
|
||||||
// not used for this example
|
|
||||||
load(container) { return; }
|
|
||||||
delayedLoad(container) {
|
|
||||||
// get logger
|
|
||||||
const logger = container.resolve("WinstonLogger");
|
|
||||||
// log the 'myProperty' value to the console
|
|
||||||
logger.info(`here is the value from my config: ${this.modConfig.myProperty}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
module.exports = { mod: new Mod() };
|
|
@ -1,25 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
class Mod {
|
|
||||||
// Perform these actions before server fully loads
|
|
||||||
load(container) {
|
|
||||||
// get watermarkLocale class from server
|
|
||||||
const watermarkLocale = container.resolve("WatermarkLocale");
|
|
||||||
// Approach #1
|
|
||||||
// Replace the getDescription() function with the one below called 'replacementFunction()'
|
|
||||||
watermarkLocale.getDescription = this.replacementFunction;
|
|
||||||
// Approach #2
|
|
||||||
// Wait until WatermarkLocale gets resolved by the server and run code afterwards to replace
|
|
||||||
// the getDescription() function with the one below called 'replacementFunction()
|
|
||||||
container.afterResolution("WatermarkLocale", (_t, result) => {
|
|
||||||
result.getDescription = this.replacementFunction;
|
|
||||||
}, { frequency: "Always" });
|
|
||||||
}
|
|
||||||
// not used for this example
|
|
||||||
delayedLoad(container) { return; }
|
|
||||||
// our new replacement function, ready to be used
|
|
||||||
replacementFunction() {
|
|
||||||
return ["SPT AKI, WOW VERY COOL"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
module.exports = { mod: new Mod() };
|
|
@ -1,9 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.MoreCode = void 0;
|
|
||||||
class MoreCode {
|
|
||||||
getTheWordFlub() {
|
|
||||||
return "flub";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.MoreCode = MoreCode;
|
|
@ -1,18 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
const MoreCode_1 = require("./MoreCode");
|
|
||||||
class Mod {
|
|
||||||
// not used for this example
|
|
||||||
load(container) { return; }
|
|
||||||
delayedLoad(container) {
|
|
||||||
// get logger
|
|
||||||
const logger = container.resolve("WinstonLogger");
|
|
||||||
// Make a new instance of the 'MoreCode' class
|
|
||||||
const moreCode = new MoreCode_1.MoreCode();
|
|
||||||
// call the function 'getTheWordFlub()' and assign the result to 'result'
|
|
||||||
const result = moreCode.getTheWordFlub();
|
|
||||||
// log the 'myProperty' property to the console
|
|
||||||
logger.info(`Here is the value from my second class: ${result}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
module.exports = { mod: new Mod() };
|
|
17
TypeScript/7OnUpdateOnLoadHooks/package.json
Normal file
17
TypeScript/7OnUpdateOnLoadHooks/package.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"name": "ReplaceFunction",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "src/mod.js",
|
||||||
|
"license": "MIT",
|
||||||
|
"author": "Chomp",
|
||||||
|
"akiVersion": "3.0.0",
|
||||||
|
"scripts": {
|
||||||
|
"install": "npx handpick --target=devDependencies",
|
||||||
|
"build": "tsc"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^17.0.31",
|
||||||
|
"tsyringe": "^4.6.0",
|
||||||
|
"typescript": "^4.6.4"
|
||||||
|
}
|
||||||
|
}
|
21
TypeScript/7OnUpdateOnLoadHooks/src/MyOnLoadMod.ts
Normal file
21
TypeScript/7OnUpdateOnLoadHooks/src/MyOnLoadMod.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { ILogger } from "../types/models/spt/utils/ILogger";
|
||||||
|
import { inject, injectable } from "tsyringe";
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class MyOnLoadMod
|
||||||
|
{
|
||||||
|
constructor(
|
||||||
|
@inject("WinstonLogger") private logger: ILogger)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public onLoad(): void
|
||||||
|
{
|
||||||
|
this.logger.info("My mod MyOnLoadMod.onLoad was triggered");
|
||||||
|
}
|
||||||
|
|
||||||
|
public getRoute(): string
|
||||||
|
{
|
||||||
|
return "my-mod";
|
||||||
|
}
|
||||||
|
}
|
27
TypeScript/7OnUpdateOnLoadHooks/src/MyOnLoadOnUpdateMod.ts
Normal file
27
TypeScript/7OnUpdateOnLoadHooks/src/MyOnLoadOnUpdateMod.ts
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import { ILogger } from "../types/models/spt/utils/ILogger";
|
||||||
|
import { inject, injectable } from "tsyringe";
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class MyOnLoadOnUpdateMod
|
||||||
|
{
|
||||||
|
constructor(
|
||||||
|
@inject("WinstonLogger") private logger: ILogger)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public onLoad(): void
|
||||||
|
{
|
||||||
|
this.logger.info("My mod MyOnLoadOnUpdateMod.onLoad was triggered");
|
||||||
|
}
|
||||||
|
|
||||||
|
public onUpdate(timeSinceLastRun: number): boolean
|
||||||
|
{
|
||||||
|
this.logger.info("My mod MyOnLoadOnUpdateMod.onUpdate was triggered");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getRoute(): string
|
||||||
|
{
|
||||||
|
return "my-mod";
|
||||||
|
}
|
||||||
|
}
|
22
TypeScript/7OnUpdateOnLoadHooks/src/MyOnUpdateMod.ts
Normal file
22
TypeScript/7OnUpdateOnLoadHooks/src/MyOnUpdateMod.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { ILogger } from "../types/models/spt/utils/ILogger";
|
||||||
|
import { inject, injectable } from "tsyringe";
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class MyOnUpdateMod
|
||||||
|
{
|
||||||
|
constructor(
|
||||||
|
@inject("WinstonLogger") private logger: ILogger)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public onUpdate(timeSinceLastRun: number): boolean
|
||||||
|
{
|
||||||
|
this.logger.info("My mod MyOnUpdateMod.onUpdate was triggered");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getRoute(): string
|
||||||
|
{
|
||||||
|
return "my-mod";
|
||||||
|
}
|
||||||
|
}
|
27
TypeScript/7OnUpdateOnLoadHooks/src/mod.ts
Normal file
27
TypeScript/7OnUpdateOnLoadHooks/src/mod.ts
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import { DependencyContainer, Lifecycle } from "tsyringe";
|
||||||
|
|
||||||
|
import { IMod } from "../types/models/external/mod";
|
||||||
|
import { MyOnLoadMod } from "./MyOnLoadMod";
|
||||||
|
import { MyOnLoadOnUpdateMod } from "./MyOnLoadOnUpdateMod";
|
||||||
|
import { MyOnUpdateMod } from "./MyOnUpdateMod";
|
||||||
|
|
||||||
|
class Mod implements IMod
|
||||||
|
{
|
||||||
|
public load(container: DependencyContainer): void
|
||||||
|
{
|
||||||
|
container.register<MyOnLoadMod>("MyOnLoadMod", MyOnLoadMod, {lifecycle: Lifecycle.Singleton});
|
||||||
|
container.register<MyOnUpdateMod>("MyOnUpdateMod", MyOnUpdateMod, {lifecycle: Lifecycle.Singleton});
|
||||||
|
container.register<MyOnLoadOnUpdateMod>("MyOnLoadOnUpdateMod", MyOnLoadOnUpdateMod, {lifecycle: Lifecycle.Singleton});
|
||||||
|
container.registerType("OnLoad", "MyOnLoadMod");
|
||||||
|
container.registerType("OnLoad", "MyOnLoadOnUpdateMod");
|
||||||
|
container.registerType("OnUpdate", "MyOnUpdateMod");
|
||||||
|
container.registerType("OnUpdate", "MyOnLoadOnUpdateMod");
|
||||||
|
}
|
||||||
|
|
||||||
|
public delayedLoad(container: DependencyContainer): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { mod: new Mod() }
|
21
TypeScript/7OnUpdateOnLoadHooks/tsconfig.json
Normal file
21
TypeScript/7OnUpdateOnLoadHooks/tsconfig.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowJs": true,
|
||||||
|
"module": "CommonJS",
|
||||||
|
"target": "es2020",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"downlevelIteration": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"outDir": "out"
|
||||||
|
},
|
||||||
|
"lib": [
|
||||||
|
"es2020"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"src/*",
|
||||||
|
"src/**/*"
|
||||||
|
]
|
||||||
|
}
|
1
TypeScript/7OnUpdateOnLoadHooks/types/Config.d.ts
vendored
Normal file
1
TypeScript/7OnUpdateOnLoadHooks/types/Config.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export {};
|
4
TypeScript/7OnUpdateOnLoadHooks/types/Program.d.ts
vendored
Normal file
4
TypeScript/7OnUpdateOnLoadHooks/types/Program.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare class Program {
|
||||||
|
constructor();
|
||||||
|
start(): void;
|
||||||
|
}
|
3
TypeScript/7OnUpdateOnLoadHooks/types/TYPES.d.ts
vendored
Normal file
3
TypeScript/7OnUpdateOnLoadHooks/types/TYPES.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export declare const TYPES: {
|
||||||
|
[name: string]: symbol;
|
||||||
|
};
|
0
TypeScript/7OnUpdateOnLoadHooks/types/Utils.d.ts
vendored
Normal file
0
TypeScript/7OnUpdateOnLoadHooks/types/Utils.d.ts
vendored
Normal file
15
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/BotCallbacks.d.ts
vendored
Normal file
15
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/BotCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { BotController } from "../controllers/BotController";
|
||||||
|
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class BotCallbacks {
|
||||||
|
private botController;
|
||||||
|
private httpResponse;
|
||||||
|
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
||||||
|
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
|
getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
|
generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData<IBotBase[]>;
|
||||||
|
getBotCap(): string;
|
||||||
|
}
|
17
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/BundleCallbacks.d.ts
vendored
Normal file
17
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/BundleCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import { BundleLoader } from "../loaders/BundleLoader";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
|
export declare class BundleCallbacks {
|
||||||
|
private logger;
|
||||||
|
private httpResponse;
|
||||||
|
private httpServer;
|
||||||
|
private bundleLoader;
|
||||||
|
private configServer;
|
||||||
|
private httpConfig;
|
||||||
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||||
|
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
||||||
|
getBundles(url: string, info: any, sessionID: string): string;
|
||||||
|
getBundle(url: string, info: any, sessionID: string): string;
|
||||||
|
}
|
22
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/CustomizationCallbacks.d.ts
vendored
Normal file
22
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/CustomizationCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { CustomizationController } from "../controllers/CustomizationController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||||
|
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { ISuit } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class CustomizationCallbacks {
|
||||||
|
private customizationController;
|
||||||
|
private saveServer;
|
||||||
|
private httpResponse;
|
||||||
|
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
||||||
|
getSuits(url: string, info: any, sessionID: string): IGetBodyResponseData<{
|
||||||
|
_id: string;
|
||||||
|
suites: string[];
|
||||||
|
}>;
|
||||||
|
getTraderSuits(url: string, info: any, sessionID: string): IGetBodyResponseData<ISuit[]>;
|
||||||
|
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
32
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/DataCallbacks.d.ts
vendored
Normal file
32
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/DataCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGlobals } from "../models/eft/common/IGlobals";
|
||||||
|
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
|
||||||
|
import { IQuest } from "../models/eft/common/tables/IQuest";
|
||||||
|
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
|
||||||
|
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||||
|
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||||
|
import { IHideoutSettingsBase } from "../models/eft/hideout/IHideoutSettingsBase";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { ILanguageBase } from "../models/spt/server/ILocaleBase";
|
||||||
|
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class DataCallbacks {
|
||||||
|
private httpResponse;
|
||||||
|
private databaseServer;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer);
|
||||||
|
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
||||||
|
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
||||||
|
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
|
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
|
||||||
|
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
|
||||||
|
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
||||||
|
getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutSettingsBase>;
|
||||||
|
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
||||||
|
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
||||||
|
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
||||||
|
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILanguageBase[]>;
|
||||||
|
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
|
}
|
45
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/DialogueCallbacks.d.ts
vendored
Normal file
45
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/DialogueCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { DialogueController } from "../controllers/DialogueController";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { DialogueInfo } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { IGetMailDialogViewRequestData } from "../models/eft/dialog/IGetMailDialogViewRequestData";
|
||||||
|
import { IGetMailDialogInfoRequestData } from "../models/eft/dialog/IGetMailDialogInfoRequestData";
|
||||||
|
import { IRemoveDialogRequestData } from "../models/eft/dialog/IRemoveDialogRequestData";
|
||||||
|
import { IGetMailDialogListRequestData } from "../models/eft/dialog/IGetMailDialogListRequestData";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IFriendRequestData } from "../models/eft/dialog/IFriendRequestData";
|
||||||
|
import { IPinDialogRequestData } from "../models/eft/dialog/IPinDialogRequestData";
|
||||||
|
import { ISetDialogReadRequestData } from "../models/eft/dialog/ISetDialogReadRequestData";
|
||||||
|
import { IGetAllAttachmentsRequestData } from "../models/eft/dialog/IGetAllAttachmentsRequestData";
|
||||||
|
import { IGetChatServerListRequestData } from "../models/eft/dialog/IGetChatServerListRequestData";
|
||||||
|
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
||||||
|
import { ISendMessageRequest } from "../models/eft/dialog/ISendMessageRequest";
|
||||||
|
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
||||||
|
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
||||||
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
|
export declare class DialogueCallbacks extends OnUpdate {
|
||||||
|
private hashUtil;
|
||||||
|
private timeUtil;
|
||||||
|
private httpResponse;
|
||||||
|
private dialogueController;
|
||||||
|
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
|
||||||
|
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
|
||||||
|
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
||||||
|
getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData<IGetMailDialogViewResponseData>;
|
||||||
|
getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>;
|
||||||
|
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
friendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData;
|
||||||
|
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
|
||||||
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
24
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/GameCallbacks.d.ts
vendored
Normal file
24
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/GameCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { GameController } from "../controllers/GameController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
||||||
|
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { IWatermark } from "../models/spt/utils/IWatermark";
|
||||||
|
declare class GameCallbacks {
|
||||||
|
private httpResponse;
|
||||||
|
private watermark;
|
||||||
|
private gameController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, watermark: IWatermark, gameController: GameController);
|
||||||
|
versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData;
|
||||||
|
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
|
||||||
|
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
export { GameCallbacks };
|
8
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/HandbookCallbacks.d.ts
vendored
Normal file
8
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/HandbookCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { HandbookController } from "../controllers/HandbookController";
|
||||||
|
import { OnLoad } from "../di/OnLoad";
|
||||||
|
export declare class HandbookCallbacks extends OnLoad {
|
||||||
|
private handbookController;
|
||||||
|
constructor(handbookController: HandbookController);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
20
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/HealthCallbacks.d.ts
vendored
Normal file
20
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/HealthCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { HealthController } from "../controllers/HealthController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||||
|
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
||||||
|
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
||||||
|
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
export declare class HealthCallbacks {
|
||||||
|
private httpResponse;
|
||||||
|
private profileHelper;
|
||||||
|
private healthController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController);
|
||||||
|
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;
|
||||||
|
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
31
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/HideoutCallbacks.d.ts
vendored
Normal file
31
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/HideoutCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import { HideoutController } from "../controllers/HideoutController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||||
|
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
|
||||||
|
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||||
|
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||||
|
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
|
||||||
|
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||||
|
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
|
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||||
|
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
|
export declare class HideoutCallbacks extends OnUpdate {
|
||||||
|
private hideoutController;
|
||||||
|
private configServer;
|
||||||
|
private hideoutConfig;
|
||||||
|
constructor(hideoutController: HideoutController, configServer: ConfigServer);
|
||||||
|
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
9
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/HttpCallbacks.d.ts
vendored
Normal file
9
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/HttpCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
|
import { OnLoad } from "../di/OnLoad";
|
||||||
|
export declare class HttpCallbacks extends OnLoad {
|
||||||
|
private httpServer;
|
||||||
|
constructor(httpServer: IHttpServer);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
getImage(): string;
|
||||||
|
}
|
21
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/InraidCallbacks.d.ts
vendored
Normal file
21
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/InraidCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { InraidController } from "../controllers/InraidController";
|
||||||
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class InraidCallbacks {
|
||||||
|
private inraidController;
|
||||||
|
private httpResponse;
|
||||||
|
private configServer;
|
||||||
|
private airdropConfig;
|
||||||
|
private inraidConfig;
|
||||||
|
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||||
|
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
|
||||||
|
saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData;
|
||||||
|
getRaidEndState(): string;
|
||||||
|
getRaidMenuSettings(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
|
getWeaponDurability(url: string, info: any, sessionID: string): string;
|
||||||
|
getAirdropConfig(url: string, info: any, sessionID: string): string;
|
||||||
|
}
|
23
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/InsuranceCallbacks.d.ts
vendored
Normal file
23
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/InsuranceCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { InsuranceController } from "../controllers/InsuranceController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
|
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
export declare class InsuranceCallbacks extends OnLoadOnUpdate {
|
||||||
|
private insuranceController;
|
||||||
|
private insuranceService;
|
||||||
|
private httpResponse;
|
||||||
|
private configServer;
|
||||||
|
private insuranceConfig;
|
||||||
|
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||||
|
onLoad(): void;
|
||||||
|
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
onUpdate(secondsSinceLastRun: number): boolean;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
39
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/InventoryCallbacks.d.ts
vendored
Normal file
39
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/InventoryCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import { InventoryController } from "../controllers/InventoryController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IInventoryFoldRequestData } from "../models/eft/inventory/IInventoryFoldRequestData";
|
||||||
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
|
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||||
|
import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwapRequestData";
|
||||||
|
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||||
|
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
||||||
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
|
import { IInventoryExamineRequestData } from "../models/eft/inventory/IInventoryExamineRequestData";
|
||||||
|
import { IInventoryReadEncyclopediaRequestData } from "../models/eft/inventory/IInventoryReadEncyclopediaRequestData";
|
||||||
|
import { IInventorySortRequestData } from "../models/eft/inventory/IInventorySortRequestData";
|
||||||
|
import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData";
|
||||||
|
import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData";
|
||||||
|
import { IInventoryEditMarkerRequestData } from "../models/eft/inventory/IInventoryEditMarkerRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
export declare class InventoryCallbacks {
|
||||||
|
private inventoryController;
|
||||||
|
constructor(inventoryController: InventoryController);
|
||||||
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
11
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/ItemEventCallbacks.d.ts
vendored
Normal file
11
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/ItemEventCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class ItemEventCallbacks {
|
||||||
|
private httpResponse;
|
||||||
|
private itemEventRouter;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
||||||
|
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
||||||
|
}
|
27
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/LauncherCallbacks.d.ts
vendored
Normal file
27
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/LauncherCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { LauncherController } from "../controllers/LauncherController";
|
||||||
|
import { IRegisterData } from "../models/eft/launcher/IRegisterData";
|
||||||
|
import { IRemoveProfileData } from "../models/eft/launcher/IRemoveProfileData";
|
||||||
|
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
|
||||||
|
import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
|
||||||
|
import { IWatermark } from "../models/spt/utils/IWatermark";
|
||||||
|
declare class LauncherCallbacks {
|
||||||
|
private httpResponse;
|
||||||
|
private launcherController;
|
||||||
|
private saveServer;
|
||||||
|
private watermark;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: IWatermark);
|
||||||
|
connect(): string;
|
||||||
|
login(url: string, info: ILoginRequestData, sessionID: string): string;
|
||||||
|
register(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK";
|
||||||
|
get(url: string, info: ILoginRequestData, sessionID: string): string;
|
||||||
|
changeUsername(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK";
|
||||||
|
changePassword(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK";
|
||||||
|
wipe(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK";
|
||||||
|
getServerVersion(): string;
|
||||||
|
ping(url: string, info: any, sessionID: string): string;
|
||||||
|
removeProfile(url: string, info: IRemoveProfileData, sessionID: string): string;
|
||||||
|
getCompatibleTarkovVersion(): string;
|
||||||
|
}
|
||||||
|
export { LauncherCallbacks };
|
13
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/LocationCallbacks.d.ts
vendored
Normal file
13
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/LocationCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { LocationController } from "../controllers/LocationController";
|
||||||
|
import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
|
||||||
|
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class LocationCallbacks {
|
||||||
|
private httpResponse;
|
||||||
|
private locationController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
|
||||||
|
getLocationData(url: string, info: any, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
|
||||||
|
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;
|
||||||
|
}
|
34
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/MatchCallbacks.d.ts
vendored
Normal file
34
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/MatchCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { MatchController } from "../controllers/MatchController";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||||
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
export declare class MatchCallbacks {
|
||||||
|
private httpResponse;
|
||||||
|
private jsonUtil;
|
||||||
|
private matchController;
|
||||||
|
private 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;
|
||||||
|
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;
|
||||||
|
getProfile(url: string, info: any, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
||||||
|
serverAvailable(url: string, info: any, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||||
|
joinMatch(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
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>;
|
||||||
|
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
|
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
|
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
|
}
|
21
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/ModCallbacks.d.ts
vendored
Normal file
21
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/ModCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { OnLoad } from "../di/OnLoad";
|
||||||
|
import { DelayedModLoader } from "../loaders/DelayedModLoader";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { ILogger } from '../models/spt/utils/ILogger';
|
||||||
|
import { IHttpServer } from '../models/spt/server/IHttpServer';
|
||||||
|
declare class ModCallbacks extends OnLoad {
|
||||||
|
private logger;
|
||||||
|
private httpResponse;
|
||||||
|
private httpServer;
|
||||||
|
private modLoader;
|
||||||
|
private configServer;
|
||||||
|
private httpConfig;
|
||||||
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||||
|
getBundles(url: string, info: any, sessionID: string): string;
|
||||||
|
getBundle(url: string, info: any, sessionID: string): string;
|
||||||
|
}
|
||||||
|
export { ModCallbacks };
|
11
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/NoteCallbacks.d.ts
vendored
Normal file
11
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/NoteCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { NoteController } from "../controllers/NoteController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
export declare class NoteCallbacks {
|
||||||
|
private noteController;
|
||||||
|
constructor(noteController: NoteController);
|
||||||
|
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
24
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/NotifierCallbacks.d.ts
vendored
Normal file
24
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/NotifierCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
||||||
|
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
|
||||||
|
import { NotifierController } from "../controllers/NotifierController";
|
||||||
|
export declare class NotifierCallbacks {
|
||||||
|
private httpServerHelper;
|
||||||
|
private httpResponse;
|
||||||
|
private notifierController;
|
||||||
|
constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController);
|
||||||
|
/**
|
||||||
|
* If we don't have anything to send, it's ok to not send anything back
|
||||||
|
* because notification requests can be long-polling. In fact, we SHOULD wait
|
||||||
|
* until we actually have something to send because otherwise we'd spam the client
|
||||||
|
* and the client would abort the connection due to spam.
|
||||||
|
*/
|
||||||
|
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
||||||
|
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
||||||
|
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
|
}
|
15
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/PresetBuildCallbacks.d.ts
vendored
Normal file
15
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/PresetBuildCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { PresetBuildController } from "../controllers/PresetBuildController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class PresetBuildCallbacks {
|
||||||
|
private httpResponse;
|
||||||
|
private presetBuildController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController);
|
||||||
|
getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
||||||
|
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
8
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/PresetCallbacks.d.ts
vendored
Normal file
8
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/PresetCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { PresetController } from "../controllers/PresetController";
|
||||||
|
import { OnLoad } from "../di/OnLoad";
|
||||||
|
export declare class PresetCallbacks extends OnLoad {
|
||||||
|
private presetController;
|
||||||
|
constructor(presetController: PresetController);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
30
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/ProfileCallbacks.d.ts
vendored
Normal file
30
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/ProfileCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { ProfileController } from "../controllers/ProfileController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
|
||||||
|
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
|
||||||
|
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
|
||||||
|
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
|
||||||
|
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
|
||||||
|
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
||||||
|
export declare class ProfileCallbacks {
|
||||||
|
private httpResponse;
|
||||||
|
private timeUtil;
|
||||||
|
private profileController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController);
|
||||||
|
createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
changeVoice(url: string, info: IProfileChangeVoiceRequestData, sessionID: string): INullResponseData;
|
||||||
|
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>;
|
||||||
|
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;
|
||||||
|
}
|
26
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/QuestCallbacks.d.ts
vendored
Normal file
26
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/QuestCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import { QuestController } from "../controllers/QuestController";
|
||||||
|
import { RepeatableQuestController } from "../controllers/RepeatableQuestController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestData";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||||
|
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IQuest } from "../models/eft/common/tables/IQuest";
|
||||||
|
import { IPmcDataRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
|
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class QuestCallbacks {
|
||||||
|
private httpResponse;
|
||||||
|
private questController;
|
||||||
|
private repeatableQuestController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController);
|
||||||
|
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
||||||
|
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
|
||||||
|
}
|
36
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/RagfairCallbacks.d.ts
vendored
Normal file
36
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/RagfairCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
|
import { RagfairController } from "../controllers/RagfairController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
|
||||||
|
import { IAddOfferRequestData } from "../models/eft/ragfair/IAddOfferRequestData";
|
||||||
|
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
||||||
|
import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
||||||
|
private httpResponse;
|
||||||
|
private logger;
|
||||||
|
private jsonUtil;
|
||||||
|
private ragfairServer;
|
||||||
|
private ragfairController;
|
||||||
|
private configServer;
|
||||||
|
private ragfairConfig;
|
||||||
|
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>;
|
||||||
|
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;
|
||||||
|
}
|
11
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/RepairCallbacks.d.ts
vendored
Normal file
11
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/RepairCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { RepairController } from "../controllers/RepairController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
|
||||||
|
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
export declare class RepairCallbacks {
|
||||||
|
private repairController;
|
||||||
|
constructor(repairController: RepairController);
|
||||||
|
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
9
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/SaveCallbacks.d.ts
vendored
Normal file
9
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/SaveCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
|
export declare class SaveCallbacks extends OnLoadOnUpdate {
|
||||||
|
private saveServer;
|
||||||
|
constructor(saveServer: SaveServer);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
onUpdate(secondsSinceLastRun: number): boolean;
|
||||||
|
}
|
11
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/TradeCallbacks.d.ts
vendored
Normal file
11
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/TradeCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { TradeController } from "../controllers/TradeController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
||||||
|
export declare class TradeCallbacks {
|
||||||
|
private tradeController;
|
||||||
|
constructor(tradeController: TradeController);
|
||||||
|
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
18
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/TraderCallbacks.d.ts
vendored
Normal file
18
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/TraderCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { TraderController } from "../controllers/TraderController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
|
export declare class TraderCallbacks extends OnLoadOnUpdate {
|
||||||
|
private httpResponse;
|
||||||
|
private traderController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
||||||
|
getProfilePurchases(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, IBarterScheme[][]>>;
|
||||||
|
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
||||||
|
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
||||||
|
onUpdate(): boolean;
|
||||||
|
}
|
10
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/WeatherCallbacks.d.ts
vendored
Normal file
10
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/WeatherCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { WeatherController } from "../controllers/WeatherController";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class WeatherCallbacks {
|
||||||
|
private httpResponse;
|
||||||
|
private weatherController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);
|
||||||
|
getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
}
|
10
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/WishlistCallbacks.d.ts
vendored
Normal file
10
TypeScript/7OnUpdateOnLoadHooks/types/callbacks/WishlistCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { WishlistController } from "../controllers/WishlistController";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
export declare class WishlistCallbacks {
|
||||||
|
private wishlistController;
|
||||||
|
constructor(wishlistController: WishlistController);
|
||||||
|
addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
20
TypeScript/7OnUpdateOnLoadHooks/types/controllers/BotController.d.ts
vendored
Normal file
20
TypeScript/7OnUpdateOnLoadHooks/types/controllers/BotController.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||||
|
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { BotGenerator } from "../generators/BotGenerator";
|
||||||
|
export declare class BotController {
|
||||||
|
private databaseServer;
|
||||||
|
private botGenerator;
|
||||||
|
private botHelper;
|
||||||
|
private configServer;
|
||||||
|
private botConfig;
|
||||||
|
constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer);
|
||||||
|
getBotLimit(type: string): number;
|
||||||
|
getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty;
|
||||||
|
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
||||||
|
getBotCap(): number;
|
||||||
|
}
|
22
TypeScript/7OnUpdateOnLoadHooks/types/controllers/CustomizationController.d.ts
vendored
Normal file
22
TypeScript/7OnUpdateOnLoadHooks/types/controllers/CustomizationController.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||||
|
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||||
|
import { ISuit } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class CustomizationController {
|
||||||
|
private logger;
|
||||||
|
private itemEventRouter;
|
||||||
|
private databaseServer;
|
||||||
|
private saveServer;
|
||||||
|
private profileHelper;
|
||||||
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper);
|
||||||
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
|
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
private getAllTraderSuits;
|
||||||
|
}
|
24
TypeScript/7OnUpdateOnLoadHooks/types/controllers/DialogueController.d.ts
vendored
Normal file
24
TypeScript/7OnUpdateOnLoadHooks/types/controllers/DialogueController.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
|
import { DialogueInfo } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
||||||
|
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
||||||
|
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class DialogueController {
|
||||||
|
private httpResponse;
|
||||||
|
private saveServer;
|
||||||
|
private dialogueHelper;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper);
|
||||||
|
getFriendList(sessionID: string): IGetFriendListDataResponse;
|
||||||
|
generateDialogueList(sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
||||||
|
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
|
||||||
|
generateDialogueView(dialogueID: string, sessionID: string): IGetMailDialogViewResponseData;
|
||||||
|
removeDialogue(dialogueID: string, sessionID: string): void;
|
||||||
|
setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void;
|
||||||
|
setRead(dialogueIDs: string[], sessionID: string): void;
|
||||||
|
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
|
||||||
|
private removeExpiredItems;
|
||||||
|
update(): void;
|
||||||
|
}
|
20
TypeScript/7OnUpdateOnLoadHooks/types/controllers/GameController.d.ts
vendored
Normal file
20
TypeScript/7OnUpdateOnLoadHooks/types/controllers/GameController.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { IWatermark } from "../models/spt/utils/IWatermark";
|
||||||
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
|
export declare class GameController {
|
||||||
|
private logger;
|
||||||
|
private watermark;
|
||||||
|
private httpServerHelper;
|
||||||
|
private profileHelper;
|
||||||
|
private configServer;
|
||||||
|
private httpConfig;
|
||||||
|
constructor(logger: ILogger, watermark: IWatermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
|
gameStart(url: string, info: IEmptyRequestData, sessionID: string): void;
|
||||||
|
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||||
|
getServer(): any[];
|
||||||
|
private getActiveRepeatableQuests;
|
||||||
|
}
|
8
TypeScript/7OnUpdateOnLoadHooks/types/controllers/HandbookController.d.ts
vendored
Normal file
8
TypeScript/7OnUpdateOnLoadHooks/types/controllers/HandbookController.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
export declare class HandbookController {
|
||||||
|
private databaseServer;
|
||||||
|
private handbookHelper;
|
||||||
|
constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper);
|
||||||
|
load(): void;
|
||||||
|
}
|
25
TypeScript/7OnUpdateOnLoadHooks/types/controllers/HealthController.d.ts
vendored
Normal file
25
TypeScript/7OnUpdateOnLoadHooks/types/controllers/HealthController.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
||||||
|
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
||||||
|
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
||||||
|
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class HealthController {
|
||||||
|
private logger;
|
||||||
|
private itemEventRouter;
|
||||||
|
private itemHelper;
|
||||||
|
private paymentService;
|
||||||
|
private inventoryHelper;
|
||||||
|
private healthHelper;
|
||||||
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
||||||
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
||||||
|
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
56
TypeScript/7OnUpdateOnLoadHooks/types/controllers/HideoutController.d.ts
vendored
Normal file
56
TypeScript/7OnUpdateOnLoadHooks/types/controllers/HideoutController.d.ts
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { PlayerService } from "../services/PlayerService";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { HideoutHelper } from "../helpers/HideoutHelper";
|
||||||
|
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
||||||
|
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||||
|
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
|
||||||
|
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||||
|
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
|
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||||
|
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||||
|
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class HideoutController {
|
||||||
|
private logger;
|
||||||
|
private hashUtil;
|
||||||
|
private timeUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private randomUtil;
|
||||||
|
private inventoryHelper;
|
||||||
|
private saveServer;
|
||||||
|
private playerService;
|
||||||
|
private presetHelper;
|
||||||
|
private paymentHelper;
|
||||||
|
private itemEventRouter;
|
||||||
|
private httpResponse;
|
||||||
|
private profileHelper;
|
||||||
|
private hideoutHelper;
|
||||||
|
private configServer;
|
||||||
|
private hideoutConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer);
|
||||||
|
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
update(): void;
|
||||||
|
}
|
30
TypeScript/7OnUpdateOnLoadHooks/types/controllers/InraidController.d.ts
vendored
Normal file
30
TypeScript/7OnUpdateOnLoadHooks/types/controllers/InraidController.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
|
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
|
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||||
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
|
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
|
||||||
|
export declare class InraidController {
|
||||||
|
private saveServer;
|
||||||
|
private jsonUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private questHelper;
|
||||||
|
private itemHelper;
|
||||||
|
private extendedProfileHelper;
|
||||||
|
private healthHelper;
|
||||||
|
private traderHelper;
|
||||||
|
private insuranceService;
|
||||||
|
private inRaidHelper;
|
||||||
|
private configServer;
|
||||||
|
private inraidConfig;
|
||||||
|
constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
|
||||||
|
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
||||||
|
saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||||
|
}
|
36
TypeScript/7OnUpdateOnLoadHooks/types/controllers/InsuranceController.d.ts
vendored
Normal file
36
TypeScript/7OnUpdateOnLoadHooks/types/controllers/InsuranceController.d.ts
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
|
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class InsuranceController {
|
||||||
|
private logger;
|
||||||
|
private randomUtil;
|
||||||
|
private itemEventRouter;
|
||||||
|
private timeUtil;
|
||||||
|
private saveServer;
|
||||||
|
private databaseServer;
|
||||||
|
private itemHelper;
|
||||||
|
private profileHelper;
|
||||||
|
private dialogueHelper;
|
||||||
|
private paymentService;
|
||||||
|
private insuranceService;
|
||||||
|
private configServer;
|
||||||
|
private insuranceConfig;
|
||||||
|
constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, insuranceService: InsuranceService, configServer: ConfigServer);
|
||||||
|
processReturn(): void;
|
||||||
|
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): any;
|
||||||
|
doAbsolutelyNothing(): void;
|
||||||
|
}
|
106
TypeScript/7OnUpdateOnLoadHooks/types/controllers/InventoryController.d.ts
vendored
Normal file
106
TypeScript/7OnUpdateOnLoadHooks/types/controllers/InventoryController.d.ts
vendored
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
|
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwapRequestData";
|
||||||
|
import { IInventoryFoldRequestData } from "../models/eft/inventory/IInventoryFoldRequestData";
|
||||||
|
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||||
|
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
||||||
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
|
import { IInventoryExamineRequestData } from "../models/eft/inventory/IInventoryExamineRequestData";
|
||||||
|
import { IInventoryReadEncyclopediaRequestData } from "../models/eft/inventory/IInventoryReadEncyclopediaRequestData";
|
||||||
|
import { IInventorySortRequestData } from "../models/eft/inventory/IInventorySortRequestData";
|
||||||
|
import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData";
|
||||||
|
import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData";
|
||||||
|
import { IInventoryEditMarkerRequestData } from "../models/eft/inventory/IInventoryEditMarkerRequestData";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class InventoryController {
|
||||||
|
private logger;
|
||||||
|
private hashUtil;
|
||||||
|
private jsonUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private presetHelper;
|
||||||
|
private inventoryHelper;
|
||||||
|
private profileHelper;
|
||||||
|
private paymentHelper;
|
||||||
|
private itemEventRouter;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter);
|
||||||
|
/**
|
||||||
|
* Move Item
|
||||||
|
* change location of item with parentId and slotId
|
||||||
|
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||||
|
* otherwise, move is contained within the same profile_f.
|
||||||
|
*/
|
||||||
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Remove Item from Profile
|
||||||
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
|
*/
|
||||||
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
|
* Removes item from PMC Profile
|
||||||
|
*/
|
||||||
|
discardItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Split Item
|
||||||
|
* spliting 1 item-stack into 2 separate items ...
|
||||||
|
*/
|
||||||
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Merge Item
|
||||||
|
* merges 2 items into one, deletes item from `body.item` and adding number of stacks into `body.with`
|
||||||
|
*/
|
||||||
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Transfer item
|
||||||
|
* Used to take items from scav inventory into stash or to insert ammo into mags (shotgun ones) and reloading weapon by clicking "Reload"
|
||||||
|
*/
|
||||||
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Swap Item
|
||||||
|
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||||
|
*/
|
||||||
|
swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Give Item
|
||||||
|
* its used for "add" item like gifts etc.
|
||||||
|
*/
|
||||||
|
addItem(pmcData: IPmcData, body: any, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handles folding of Weapons
|
||||||
|
*/
|
||||||
|
foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Toggles "Toggleable" items like night vision goggles and face shields.
|
||||||
|
*/
|
||||||
|
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handles Tagging of items (primary Containers).
|
||||||
|
*/
|
||||||
|
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handles examining of the item *
|
||||||
|
*/
|
||||||
|
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handles sorting of Inventory.
|
||||||
|
*/
|
||||||
|
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
27
TypeScript/7OnUpdateOnLoadHooks/types/controllers/LauncherController.d.ts
vendored
Normal file
27
TypeScript/7OnUpdateOnLoadHooks/types/controllers/LauncherController.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { IRegisterData } from "../models/eft/launcher/IRegisterData";
|
||||||
|
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
|
||||||
|
import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
|
||||||
|
import { Info } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
|
export declare class LauncherController {
|
||||||
|
private hashUtil;
|
||||||
|
private saveServer;
|
||||||
|
private httpServerHelper;
|
||||||
|
private databaseServer;
|
||||||
|
private configServer;
|
||||||
|
private coreConfig;
|
||||||
|
constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
|
connect(): any;
|
||||||
|
find(sessionIdKey: string): Info;
|
||||||
|
login(info: ILoginRequestData): string;
|
||||||
|
register(info: IRegisterData): string;
|
||||||
|
private createAccount;
|
||||||
|
changeUsername(info: IChangeRequestData): string;
|
||||||
|
changePassword(info: IChangeRequestData): string;
|
||||||
|
wipe(info: IRegisterData): string;
|
||||||
|
getCompatibleTarkovVersion(): string;
|
||||||
|
}
|
18
TypeScript/7OnUpdateOnLoadHooks/types/controllers/LocationController.d.ts
vendored
Normal file
18
TypeScript/7OnUpdateOnLoadHooks/types/controllers/LocationController.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { LocationGenerator } from "../generators/LocationGenerator";
|
||||||
|
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
||||||
|
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class LocationController {
|
||||||
|
private jsonUtil;
|
||||||
|
private logger;
|
||||||
|
private locationGenerator;
|
||||||
|
private databaseServer;
|
||||||
|
private timeUtil;
|
||||||
|
constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil);
|
||||||
|
get(location: string): ILocationBase;
|
||||||
|
generate(name: string): ILocationBase;
|
||||||
|
generateAll(): ILocationsGenerateAllResponse;
|
||||||
|
}
|
27
TypeScript/7OnUpdateOnLoadHooks/types/controllers/MatchController.d.ts
vendored
Normal file
27
TypeScript/7OnUpdateOnLoadHooks/types/controllers/MatchController.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
|
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { MatchLocationService } from "../services/MatchLocationService";
|
||||||
|
export declare class MatchController {
|
||||||
|
private saveServer;
|
||||||
|
private profileHelper;
|
||||||
|
private matchLocationService;
|
||||||
|
private traderHelper;
|
||||||
|
private configServer;
|
||||||
|
private matchConfig;
|
||||||
|
private inraidConfig;
|
||||||
|
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||||
|
getEnabled(): boolean;
|
||||||
|
getProfile(info: any): IPmcData[];
|
||||||
|
private getMatch;
|
||||||
|
createGroup(sessionID: string, info: any): any;
|
||||||
|
deleteGroup(info: any): void;
|
||||||
|
joinMatch(info: any, sessionID: string): any[];
|
||||||
|
getGroupStatus(info: any): any;
|
||||||
|
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void;
|
||||||
|
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||||
|
}
|
12
TypeScript/7OnUpdateOnLoadHooks/types/controllers/NoteController.d.ts
vendored
Normal file
12
TypeScript/7OnUpdateOnLoadHooks/types/controllers/NoteController.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
declare class NoteController {
|
||||||
|
private itemEventRouter;
|
||||||
|
constructor(itemEventRouter: ItemEventRouter);
|
||||||
|
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
||||||
|
export { NoteController };
|
22
TypeScript/7OnUpdateOnLoadHooks/types/controllers/NotifierController.d.ts
vendored
Normal file
22
TypeScript/7OnUpdateOnLoadHooks/types/controllers/NotifierController.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { NotifierHelper } from "../helpers/NotifierHelper";
|
||||||
|
import { NotificationService } from "../services/NotificationService";
|
||||||
|
import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
||||||
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
|
export declare class NotifierController {
|
||||||
|
private notifierHelper;
|
||||||
|
private httpServerHelper;
|
||||||
|
private notificationService;
|
||||||
|
private pollInterval;
|
||||||
|
private timeout;
|
||||||
|
constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService);
|
||||||
|
/**
|
||||||
|
* Resolve an array of session notifications.
|
||||||
|
*
|
||||||
|
* If no notifications are currently queued then intermittently check for new notifications until either
|
||||||
|
* one or more appear or when a timeout expires.
|
||||||
|
* If no notifications are available after the timeout, use a default message.
|
||||||
|
*/
|
||||||
|
notifyAsync(sessionID: string): Promise<unknown>;
|
||||||
|
getServer(sessionID: string): string;
|
||||||
|
getChannel(sessionID: string): INotifierChannel;
|
||||||
|
}
|
18
TypeScript/7OnUpdateOnLoadHooks/types/controllers/PresetBuildController.d.ts
vendored
Normal file
18
TypeScript/7OnUpdateOnLoadHooks/types/controllers/PresetBuildController.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
export declare class PresetBuildController {
|
||||||
|
private hashUtil;
|
||||||
|
private itemEventRouter;
|
||||||
|
private itemHelper;
|
||||||
|
private saveServer;
|
||||||
|
constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer);
|
||||||
|
getUserBuilds(sessionID: string): WeaponBuild[];
|
||||||
|
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
8
TypeScript/7OnUpdateOnLoadHooks/types/controllers/PresetController.d.ts
vendored
Normal file
8
TypeScript/7OnUpdateOnLoadHooks/types/controllers/PresetController.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
export declare class PresetController {
|
||||||
|
private presetHelper;
|
||||||
|
private databaseServer;
|
||||||
|
constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer);
|
||||||
|
initialize(): void;
|
||||||
|
}
|
34
TypeScript/7OnUpdateOnLoadHooks/types/controllers/ProfileController.d.ts
vendored
Normal file
34
TypeScript/7OnUpdateOnLoadHooks/types/controllers/ProfileController.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
|
||||||
|
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
|
||||||
|
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
|
||||||
|
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
|
||||||
|
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
|
||||||
|
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
|
||||||
|
export declare class ProfileController {
|
||||||
|
private hashUtil;
|
||||||
|
private timeUtil;
|
||||||
|
private saveServer;
|
||||||
|
private databaseServer;
|
||||||
|
private itemHelper;
|
||||||
|
private traderHelper;
|
||||||
|
private extendedProfileHelper;
|
||||||
|
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper);
|
||||||
|
getMiniProfiles(): IMiniProfile[];
|
||||||
|
getMiniProfile(sessionID: string): any;
|
||||||
|
getCompleteProfile(sessionID: string): IPmcData[];
|
||||||
|
createProfile(info: IProfileCreateRequestData, sessionID: string): void;
|
||||||
|
generatePlayerScav(sessionID: string): IPmcData;
|
||||||
|
validateNickname(info: IValidateNicknameRequestData, sessionID: string): string;
|
||||||
|
changeNickname(info: IProfileChangeNicknameRequestData, sessionID: string): string;
|
||||||
|
changeVoice(info: IProfileChangeVoiceRequestData, sessionID: string): void;
|
||||||
|
getFriends(info: ISearchFriendRequestData, sessionID: string): ISearchFriendResponse[];
|
||||||
|
}
|
37
TypeScript/7OnUpdateOnLoadHooks/types/controllers/QuestController.d.ts
vendored
Normal file
37
TypeScript/7OnUpdateOnLoadHooks/types/controllers/QuestController.d.ts
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { PlayerService } from "../services/PlayerService";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IQuest } from "../models/eft/common/tables/IQuest";
|
||||||
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
|
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||||
|
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class QuestController {
|
||||||
|
private logger;
|
||||||
|
private timeUtil;
|
||||||
|
private itemEventRouter;
|
||||||
|
private databaseServer;
|
||||||
|
private itemHelper;
|
||||||
|
private dialogueHelper;
|
||||||
|
private profileHelper;
|
||||||
|
private questHelper;
|
||||||
|
private questConditionHelper;
|
||||||
|
private playerService;
|
||||||
|
private configServer;
|
||||||
|
private questConfig;
|
||||||
|
constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer);
|
||||||
|
getClientQuests(sessionID: string): IQuest[];
|
||||||
|
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
69
TypeScript/7OnUpdateOnLoadHooks/types/controllers/RagfairController.d.ts
vendored
Normal file
69
TypeScript/7OnUpdateOnLoadHooks/types/controllers/RagfairController.d.ts
vendored
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||||
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { RagfairHelper } from "../helpers/RagfairHelper";
|
||||||
|
import { RagfairSellHelper } from "../helpers/RagfairSellHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IAddOfferRequestData, Requirement } from "../models/eft/ragfair/IAddOfferRequestData";
|
||||||
|
import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData";
|
||||||
|
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
|
||||||
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
|
||||||
|
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator";
|
||||||
|
import { RagfairSortHelper } from "../helpers/RagfairSortHelper";
|
||||||
|
import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper";
|
||||||
|
import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper";
|
||||||
|
import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class RagfairController {
|
||||||
|
private logger;
|
||||||
|
private timeUtil;
|
||||||
|
private httpResponse;
|
||||||
|
private itemEventRouter;
|
||||||
|
private ragfairServer;
|
||||||
|
private ragfairPriceService;
|
||||||
|
private databaseServer;
|
||||||
|
private itemHelper;
|
||||||
|
private saveServer;
|
||||||
|
private ragfairSellHelper;
|
||||||
|
private ragfairTaxHelper;
|
||||||
|
private ragfairSortHelper;
|
||||||
|
private ragfairOfferHelper;
|
||||||
|
private profileHelper;
|
||||||
|
private paymentService;
|
||||||
|
private handbookHelper;
|
||||||
|
private paymentHelper;
|
||||||
|
private inventoryHelper;
|
||||||
|
private ragfairHelper;
|
||||||
|
private ragfairOfferService;
|
||||||
|
private ragfairRequiredItemsService;
|
||||||
|
private ragfairOfferGenerator;
|
||||||
|
private configServer;
|
||||||
|
private ragfairConfig;
|
||||||
|
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;
|
||||||
|
update(): void;
|
||||||
|
getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||||
|
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||||
|
getAllFleaPrices(): Record<string, number>;
|
||||||
|
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
|
||||||
|
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
40
TypeScript/7OnUpdateOnLoadHooks/types/controllers/RepairController.d.ts
vendored
Normal file
40
TypeScript/7OnUpdateOnLoadHooks/types/controllers/RepairController.d.ts
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { RepairHelper } from "../helpers/RepairHelper";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class RepairController {
|
||||||
|
private logger;
|
||||||
|
private itemEventRouter;
|
||||||
|
private databaseServer;
|
||||||
|
private questHelper;
|
||||||
|
private traderHelper;
|
||||||
|
private paymentService;
|
||||||
|
private repairHelper;
|
||||||
|
private configServer;
|
||||||
|
private repairConfig;
|
||||||
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Repair with trader
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param body endpoint request data
|
||||||
|
* @param sessionID session id
|
||||||
|
* @returns item event router action
|
||||||
|
*/
|
||||||
|
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Repair with repair kit
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param body endpoint request data
|
||||||
|
* @param sessionID session id
|
||||||
|
* @returns item event router action
|
||||||
|
*/
|
||||||
|
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
216
TypeScript/7OnUpdateOnLoadHooks/types/controllers/RepeatableQuestController.d.ts
vendored
Normal file
216
TypeScript/7OnUpdateOnLoadHooks/types/controllers/RepeatableQuestController.d.ts
vendored
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
|
import { RandomUtil, ProbabilityObjectArray, ProbabilityObject } from "../utils/RandomUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IPmcData, TraderInfo } from "../models/eft/common/IPmcData";
|
||||||
|
import { IRepeatableQuestConfig, ELocationName } from "../models/spt/config/IQuestConfig";
|
||||||
|
import { IExploration, IRepeatableQuest, IReward, IRewards, IExplorationCondition, ICompletionAvailableFor, IEliminationCondition, ICompletion, IElimination, IPmcDataRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
|
import { Exit } from "../models/eft/common/ILocationBase";
|
||||||
|
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export interface IQuestTypePool {
|
||||||
|
types: string[];
|
||||||
|
pool: IQuestPool;
|
||||||
|
}
|
||||||
|
export interface IQuestPool {
|
||||||
|
Exploration: IExplorationPool;
|
||||||
|
Elimination: IEliminationPool;
|
||||||
|
}
|
||||||
|
export interface IExplorationPool {
|
||||||
|
locations: Partial<Record<ELocationName, string[]>>;
|
||||||
|
}
|
||||||
|
export interface IEliminationPool {
|
||||||
|
targets: IEliminationTargetPool;
|
||||||
|
}
|
||||||
|
export interface IEliminationTargetPool {
|
||||||
|
Savage?: ITargetLocation;
|
||||||
|
AnyPmc?: ITargetLocation;
|
||||||
|
bossBully?: ITargetLocation;
|
||||||
|
bossGluhar?: ITargetLocation;
|
||||||
|
bossKilla?: ITargetLocation;
|
||||||
|
bossSanitar?: ITargetLocation;
|
||||||
|
bossTagilla?: ITargetLocation;
|
||||||
|
bossKojaniy?: ITargetLocation;
|
||||||
|
}
|
||||||
|
export interface ITargetLocation {
|
||||||
|
locations: string[];
|
||||||
|
}
|
||||||
|
export declare class RepeatableQuestController {
|
||||||
|
private timeUtil;
|
||||||
|
private logger;
|
||||||
|
private randomUtil;
|
||||||
|
private mathUtil;
|
||||||
|
private jsonUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private itemHelper;
|
||||||
|
private presetHelper;
|
||||||
|
private profileHelper;
|
||||||
|
private ragfairServerHelper;
|
||||||
|
private itemEventRouter;
|
||||||
|
private paymentService;
|
||||||
|
private objectId;
|
||||||
|
private configServer;
|
||||||
|
private questConfig;
|
||||||
|
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, 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.
|
||||||
|
* repeatableQuestObject = {
|
||||||
|
* id: Unique Id,
|
||||||
|
* name: "Daily",
|
||||||
|
* endTime: the time when the quests expire
|
||||||
|
* activeQuests: currently available quests in an array. Each element of quest type format (see assets/database/templates/repeatableQuests.json).
|
||||||
|
* inactiveQuests: the quests which were previously active (required by client to fail them if they are not completed)
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* The method checks if the player level requirement for repeatable quests (e.g. daily lvl5, weekly lvl15) is met and if the previously active quests
|
||||||
|
* are still valid. This ischecked by endTime persisted in profile accordning to the resetTime configured for each repeatable kind (daily, weekly)
|
||||||
|
* in QuestCondig.js
|
||||||
|
*
|
||||||
|
* If the condition is met, new repeatableQuests are created, old quests (which are persisted in the profile.RepeatableQuests[i].activeQuests) are
|
||||||
|
* moved to profile.RepeatableQuests[i].inactiveQuests. This memory is required to get rid of old repeatable quest data in the profile, otherwise
|
||||||
|
* they'll litter the profile's Quests field.
|
||||||
|
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
||||||
|
* The new quests generated are again persisted in profile.RepeatableQuests
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param {string} sessionId Player's session id
|
||||||
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
|
*/
|
||||||
|
getClientRepeatableQuests(info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
||||||
|
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
||||||
|
*/
|
||||||
|
generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record<string, TraderInfo>, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
||||||
|
/**
|
||||||
|
* Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps
|
||||||
|
*/
|
||||||
|
generateDebugDailies(dailiesPool: any, factory: any, number: any): any;
|
||||||
|
/**
|
||||||
|
* Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json
|
||||||
|
* The templates include Elimination, Completion and Extraction quest types
|
||||||
|
*
|
||||||
|
* @param {string} type quest type: "Elimination", "Completion" or "Extraction"
|
||||||
|
* @param {string} traderId trader from which the quest will be provided
|
||||||
|
* @returns {object} a object which contains the base elements for repeatable quests of the requests type
|
||||||
|
* (needs to be filled with reward and conditions by called to make a valid quest)
|
||||||
|
*/
|
||||||
|
generateRepeatableTemplate(type: string, traderId: string): IRepeatableQuest;
|
||||||
|
/**
|
||||||
|
* Generates a valid Exploration quest
|
||||||
|
*
|
||||||
|
* @param {integer} pmcLevel player's level for reward generation
|
||||||
|
* @param {string} traderId trader from which the quest will be provided
|
||||||
|
* @param {object} questTypePool Pools for quests (used to avoid redundant quests)
|
||||||
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
|
* @returns {object} object of quest type format for "Exploration" (see assets/database/templates/repeatableQuests.json)
|
||||||
|
*/
|
||||||
|
generateExplorationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IExploration;
|
||||||
|
/**
|
||||||
|
* Generates a valid Completion quest
|
||||||
|
*
|
||||||
|
* @param {integer} pmcLevel player's level for requested items and reward generation
|
||||||
|
* @param {string} traderId trader from which the quest will be provided
|
||||||
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
|
* @returns {object} object of quest type format for "Completion" (see assets/database/templates/repeatableQuests.json)
|
||||||
|
*/
|
||||||
|
generateCompletionQuest(pmcLevel: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): ICompletion;
|
||||||
|
/**
|
||||||
|
* Generates a valid Elimination quest
|
||||||
|
*
|
||||||
|
* @param {integer} pmcLevel player's level for requested items and reward generation
|
||||||
|
* @param {string} traderId trader from which the quest will be provided
|
||||||
|
* @param {object} questTypePool Pools for quests (used to avoid redundant quests)
|
||||||
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
|
* @returns {object} object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json)
|
||||||
|
*/
|
||||||
|
generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
|
||||||
|
/**
|
||||||
|
* Exploration repeatable quests can specify a required extraction point.
|
||||||
|
* This method creates the according object which will be appended to the conditions array
|
||||||
|
*
|
||||||
|
* @param {string} exit The exit name to generate the condition for
|
||||||
|
* @returns {object} Exit condition
|
||||||
|
*/
|
||||||
|
generateExplorationExitCondition(exit: Exit): IExplorationCondition;
|
||||||
|
/**
|
||||||
|
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
||||||
|
* This is a helper method for GenerateCompletionQuest to create a completion condition (of which a completion quest theoretically can have many)
|
||||||
|
*
|
||||||
|
* @param {string} targetItemId id of the item to request
|
||||||
|
* @param {integer} value amount of items of this specific type to request
|
||||||
|
* @returns {object} object of "Completion"-condition
|
||||||
|
*/
|
||||||
|
generateCompletionAvailableForFinish(targetItemId: string, value: number): ICompletionAvailableFor;
|
||||||
|
/**
|
||||||
|
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
||||||
|
* This is a helper method for GenerateEliminationQuest to create a location condition.
|
||||||
|
*
|
||||||
|
* @param {string} location the location on which to fulfill the elimination quest
|
||||||
|
* @returns {object} object of "Elimination"-location-subcondition
|
||||||
|
*/
|
||||||
|
generateEliminationLocation(location: string[]): IEliminationCondition;
|
||||||
|
/**
|
||||||
|
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
||||||
|
* This is a helper method for GenerateEliminationQuest to create a kill condition.
|
||||||
|
*
|
||||||
|
* @param {string} target array of target npcs e.g. "AnyPmc", "Savage"
|
||||||
|
* @param {array} bodyParts array of body parts with which to kill e.g. ["stomach", "thorax"]
|
||||||
|
* @param {number} distance distance from which to kill (currently only >= supported)
|
||||||
|
* @returns {object} object of "Elimination"-kill-subcondition
|
||||||
|
*/
|
||||||
|
generateEliminationCondition(target: string, bodyPart: string[], distance: number): IEliminationCondition;
|
||||||
|
/**
|
||||||
|
* Used to create a quest pool during each cycle of repeatable quest generation. The pool will be subsequently
|
||||||
|
* narrowed down during quest generation to avoid duplicate quests. Like duplicate extractions or elimination quests
|
||||||
|
* where you have to e.g. kill scavs in same locations.
|
||||||
|
*
|
||||||
|
* @returns {object} the quest pool
|
||||||
|
*/
|
||||||
|
generateQuestPool(repeatableConfig: IRepeatableQuestConfig): IQuestTypePool;
|
||||||
|
/**
|
||||||
|
* Generate the reward for a mission. A reward can consist of
|
||||||
|
* - Experience
|
||||||
|
* - Money
|
||||||
|
* - Items
|
||||||
|
* - Trader Reputation
|
||||||
|
*
|
||||||
|
* The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to
|
||||||
|
* experience / money / items / trader reputation can be defined in QuestConfig.js
|
||||||
|
*
|
||||||
|
* There's also a random variation of the reward the spread of which can be also defined in the config.
|
||||||
|
*
|
||||||
|
* Additonaly, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used
|
||||||
|
*
|
||||||
|
* @param {integer} pmcLevel player's level
|
||||||
|
* @param {number} difficulty a reward scaling factor goint from 0.2 to 1
|
||||||
|
* @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader)
|
||||||
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
|
*/
|
||||||
|
generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRewards;
|
||||||
|
/**
|
||||||
|
* Helper to create a reward item structured as required by the client
|
||||||
|
*
|
||||||
|
* @param {string} tpl itemId of the rewarded item
|
||||||
|
* @param {integer} value amount of items to give
|
||||||
|
* @param {integer} index all rewards will be appended to a list, for unkown reasons the client wants the index
|
||||||
|
* @returns {object} object of "Reward"-item-type
|
||||||
|
*/
|
||||||
|
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
||||||
|
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
||||||
|
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
|
||||||
|
changeRepeatableQuest(pmcDataIn: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
21
TypeScript/7OnUpdateOnLoadHooks/types/controllers/TradeController.d.ts
vendored
Normal file
21
TypeScript/7OnUpdateOnLoadHooks/types/controllers/TradeController.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { TradeHelper } from "../helpers/TradeHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { Upd } from "../models/eft/common/tables/IItem";
|
||||||
|
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
declare class TradeController {
|
||||||
|
private logger;
|
||||||
|
private itemEventRouter;
|
||||||
|
private tradeHelper;
|
||||||
|
private profileHelper;
|
||||||
|
private ragfairServer;
|
||||||
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer);
|
||||||
|
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
||||||
|
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
||||||
|
export { TradeController };
|
29
TypeScript/7OnUpdateOnLoadHooks/types/controllers/TraderController.d.ts
vendored
Normal file
29
TypeScript/7OnUpdateOnLoadHooks/types/controllers/TraderController.d.ts
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { TraderAssortService } from "../services/TraderAssortService";
|
||||||
|
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
|
||||||
|
export declare class TraderController {
|
||||||
|
private logger;
|
||||||
|
private databaseServer;
|
||||||
|
private traderAssortHelper;
|
||||||
|
private profileHelper;
|
||||||
|
private traderHelper;
|
||||||
|
private timeUtil;
|
||||||
|
private traderAssortService;
|
||||||
|
private jsonUtil;
|
||||||
|
private configServer;
|
||||||
|
private traderConfig;
|
||||||
|
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil, configServer: ConfigServer);
|
||||||
|
load(): void;
|
||||||
|
getTrader(traderID: string, sessionID: string): ITraderBase;
|
||||||
|
getAllTraders(sessionID: string): ITraderBase[];
|
||||||
|
updateTraders(): boolean;
|
||||||
|
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
||||||
|
getPurchasesData(traderID: string, sessionID: string): Record<string, IBarterScheme[][]>;
|
||||||
|
}
|
10
TypeScript/7OnUpdateOnLoadHooks/types/controllers/WeatherController.d.ts
vendored
Normal file
10
TypeScript/7OnUpdateOnLoadHooks/types/controllers/WeatherController.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
||||||
|
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||||
|
export declare class WeatherController {
|
||||||
|
private weatherGenerator;
|
||||||
|
private configServer;
|
||||||
|
private weatherConfig;
|
||||||
|
constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer);
|
||||||
|
generate(): IWeatherData;
|
||||||
|
}
|
10
TypeScript/7OnUpdateOnLoadHooks/types/controllers/WishlistController.d.ts
vendored
Normal file
10
TypeScript/7OnUpdateOnLoadHooks/types/controllers/WishlistController.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
export declare class WishlistController {
|
||||||
|
private itemEvenRouter;
|
||||||
|
constructor(itemEvenRouter: ItemEventRouter);
|
||||||
|
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
13
TypeScript/7OnUpdateOnLoadHooks/types/di/Container.d.ts
vendored
Normal file
13
TypeScript/7OnUpdateOnLoadHooks/types/di/Container.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
export declare class Container {
|
||||||
|
static registerTypes(depContainer: DependencyContainer): void;
|
||||||
|
private static registerUtils;
|
||||||
|
private static registerRouters;
|
||||||
|
private static registerGenerators;
|
||||||
|
private static registerHelpers;
|
||||||
|
private static registerLoaders;
|
||||||
|
private static registerCallbacks;
|
||||||
|
private static registerServices;
|
||||||
|
private static registerServers;
|
||||||
|
private static registerControllers;
|
||||||
|
}
|
4
TypeScript/7OnUpdateOnLoadHooks/types/di/OnLoad.d.ts
vendored
Normal file
4
TypeScript/7OnUpdateOnLoadHooks/types/di/OnLoad.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare class OnLoad {
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
7
TypeScript/7OnUpdateOnLoadHooks/types/di/OnLoadOnUpdate.d.ts
vendored
Normal file
7
TypeScript/7OnUpdateOnLoadHooks/types/di/OnLoadOnUpdate.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { OnLoad } from "./OnLoad";
|
||||||
|
import { OnUpdate } from "./OnUpdate";
|
||||||
|
export declare class OnLoadOnUpdate implements OnLoad, OnUpdate {
|
||||||
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
4
TypeScript/7OnUpdateOnLoadHooks/types/di/OnUpdate.d.ts
vendored
Normal file
4
TypeScript/7OnUpdateOnLoadHooks/types/di/OnUpdate.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare class OnUpdate {
|
||||||
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
31
TypeScript/7OnUpdateOnLoadHooks/types/di/Router.d.ts
vendored
Normal file
31
TypeScript/7OnUpdateOnLoadHooks/types/di/Router.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
|
export declare class Router {
|
||||||
|
private handledRoutes;
|
||||||
|
constructor();
|
||||||
|
getTopLevelRoute(): string;
|
||||||
|
protected getHandledRoutes(): HandledRoute[];
|
||||||
|
canHandle(url: string, partialMatch?: boolean): boolean;
|
||||||
|
}
|
||||||
|
export declare class StaticRouter extends Router {
|
||||||
|
constructor();
|
||||||
|
handleStatic(url: string, info: any, sessionID: string, output: string): any;
|
||||||
|
}
|
||||||
|
export declare class DynamicRouter extends Router {
|
||||||
|
constructor();
|
||||||
|
handleDynamic(url: string, info: any, sessionID: string, output: string): any;
|
||||||
|
}
|
||||||
|
export declare class ItemEventRouterDefinition extends Router {
|
||||||
|
constructor();
|
||||||
|
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
||||||
|
export declare class SaveLoadRouter extends Router {
|
||||||
|
constructor();
|
||||||
|
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||||
|
}
|
||||||
|
export declare class HandledRoute {
|
||||||
|
route: string;
|
||||||
|
dynamic: boolean;
|
||||||
|
constructor(route: string, dynamic: boolean);
|
||||||
|
}
|
5
TypeScript/7OnUpdateOnLoadHooks/types/di/Serializer.d.ts
vendored
Normal file
5
TypeScript/7OnUpdateOnLoadHooks/types/di/Serializer.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
|
export declare class Serializer {
|
||||||
|
serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void;
|
||||||
|
canHandle(something: string): boolean;
|
||||||
|
}
|
36
TypeScript/7OnUpdateOnLoadHooks/types/generators/BotGenerator.d.ts
vendored
Normal file
36
TypeScript/7OnUpdateOnLoadHooks/types/generators/BotGenerator.d.ts
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||||
|
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||||
|
import { BotInventoryGenerator } from "./BotInventoryGenerator";
|
||||||
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
export declare class BotGenerator {
|
||||||
|
private logger;
|
||||||
|
private hashUtil;
|
||||||
|
private randomUtil;
|
||||||
|
private jsonUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private botInventoryGenerator;
|
||||||
|
private botHelper;
|
||||||
|
private gameEventHelper;
|
||||||
|
private configServer;
|
||||||
|
private botConfig;
|
||||||
|
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[];
|
||||||
|
private generateBot;
|
||||||
|
private generateRandomLevel;
|
||||||
|
/** Converts health object to the required format */
|
||||||
|
private generateHealth;
|
||||||
|
private generateSkills;
|
||||||
|
private getPmcRole;
|
||||||
|
private removeChristmasItemsFromBotInventory;
|
||||||
|
private generateId;
|
||||||
|
private generateInventoryID;
|
||||||
|
private getPMCDifficulty;
|
||||||
|
private generateDogtag;
|
||||||
|
}
|
25
TypeScript/7OnUpdateOnLoadHooks/types/generators/BotInventoryGenerator.d.ts
vendored
Normal file
25
TypeScript/7OnUpdateOnLoadHooks/types/generators/BotInventoryGenerator.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||||
|
import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
|
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
||||||
|
import { BotLootGenerator } from "./BotLootGenerator";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
|
export declare class BotInventoryGenerator {
|
||||||
|
private logger;
|
||||||
|
private hashUtil;
|
||||||
|
private randomUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private botWeaponGenerator;
|
||||||
|
private botLootGenerator;
|
||||||
|
private botGeneratorHelper;
|
||||||
|
private weightedRandomHelper;
|
||||||
|
private botConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper);
|
||||||
|
generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory;
|
||||||
|
private generateEquipment;
|
||||||
|
private generateInventoryBase;
|
||||||
|
}
|
27
TypeScript/7OnUpdateOnLoadHooks/types/generators/BotLootGenerator.d.ts
vendored
Normal file
27
TypeScript/7OnUpdateOnLoadHooks/types/generators/BotLootGenerator.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { PMCLootGenerator } from "../generators/PMCLootGenerator";
|
||||||
|
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||||
|
import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
|
export declare class BotLootGenerator {
|
||||||
|
private jsonUtil;
|
||||||
|
private hashUtil;
|
||||||
|
private randomUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private handbookHelper;
|
||||||
|
private botGeneratorHelper;
|
||||||
|
private pmcLootGenerator;
|
||||||
|
private configServer;
|
||||||
|
private botConfig;
|
||||||
|
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;
|
||||||
|
private getRandomisedCount;
|
||||||
|
private addLootFromPool;
|
||||||
|
/** Compares two item templates by their price to spawn chance ratio */
|
||||||
|
private compareByValue;
|
||||||
|
}
|
44
TypeScript/7OnUpdateOnLoadHooks/types/generators/BotWeaponGenerator.d.ts
vendored
Normal file
44
TypeScript/7OnUpdateOnLoadHooks/types/generators/BotWeaponGenerator.d.ts
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||||
|
import { MinMax, ModsChances, Mods } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
export declare class BotWeaponGenerator {
|
||||||
|
private logger;
|
||||||
|
private hashUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private itemHelper;
|
||||||
|
private weightedRandomHelper;
|
||||||
|
private botGeneratorHelper;
|
||||||
|
private randomUtil;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
||||||
|
generateWeapon(equipmentSlot: string, weaponPool: Record<string, number>, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
|
||||||
|
/** Checks if all required slots are occupied on a weapon and all it's mods */
|
||||||
|
private isWeaponValid;
|
||||||
|
/**
|
||||||
|
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
|
||||||
|
* Additionally, adds extra bullets to SecuredContainer
|
||||||
|
*
|
||||||
|
* @param {*} weaponMods
|
||||||
|
* @param {*} weaponTemplate
|
||||||
|
* @param {*} magCounts
|
||||||
|
* @param {*} ammoTpl
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
private generateExtraMagazines;
|
||||||
|
private addBullets;
|
||||||
|
/**
|
||||||
|
* Finds and returns tpl of ammo that should be used, while making sure it's compatible
|
||||||
|
*
|
||||||
|
* @param {*} weaponMods
|
||||||
|
* @param {*} weaponTemplate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
private getCompatibleAmmo;
|
||||||
|
/** Fill existing magazines to full, while replacing their contents with specified ammo */
|
||||||
|
private fillExistingMagazines;
|
||||||
|
}
|
44
TypeScript/7OnUpdateOnLoadHooks/types/generators/LocationGenerator.d.ts
vendored
Normal file
44
TypeScript/7OnUpdateOnLoadHooks/types/generators/LocationGenerator.d.ts
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { IStaticContainerProps, IStaticLootDetails, IStaticAmmoDetails, IStaticForcedProps } from "../models/eft/common/tables/ILootBase";
|
||||||
|
import { ILooseLoot, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||||
|
import { ContainerHelper } from "../helpers/ContainerHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export interface IContainerItem {
|
||||||
|
items: Item[];
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
}
|
||||||
|
export declare class LocationGenerator {
|
||||||
|
private logger;
|
||||||
|
private jsonUtil;
|
||||||
|
private objectId;
|
||||||
|
private randomUtil;
|
||||||
|
private ragfairServerHelper;
|
||||||
|
private itemHelper;
|
||||||
|
private mathUtil;
|
||||||
|
private gameEventHelper;
|
||||||
|
private containerHelper;
|
||||||
|
private presetHelper;
|
||||||
|
private configServer;
|
||||||
|
private locationConfig;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer);
|
||||||
|
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
|
private getLooseLootMultiplerForLocation;
|
||||||
|
private getStaticLootMultiplerForLocation;
|
||||||
|
generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): SpawnpointTemplate[];
|
||||||
|
private createItem;
|
||||||
|
private getRandomCompatibleCaliberTemplateId;
|
||||||
|
private getRandomValidCaliber;
|
||||||
|
private drawAmmoTpl;
|
||||||
|
private createRandomMagCartridges;
|
||||||
|
private createCartidges;
|
||||||
|
}
|
14
TypeScript/7OnUpdateOnLoadHooks/types/generators/PMCLootGenerator.d.ts
vendored
Normal file
14
TypeScript/7OnUpdateOnLoadHooks/types/generators/PMCLootGenerator.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
export declare class PMCLootGenerator {
|
||||||
|
private itemHelper;
|
||||||
|
private databaseServer;
|
||||||
|
private configServer;
|
||||||
|
private pocketLootPool;
|
||||||
|
private backpackLootPool;
|
||||||
|
private botConfig;
|
||||||
|
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
|
generatePMCPocketLootPool(): string[];
|
||||||
|
generatePMCBackpackLootPool(): string[];
|
||||||
|
}
|
17
TypeScript/7OnUpdateOnLoadHooks/types/generators/RagfairAssortGenerator.d.ts
vendored
Normal file
17
TypeScript/7OnUpdateOnLoadHooks/types/generators/RagfairAssortGenerator.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
export declare class RagfairAssortGenerator {
|
||||||
|
private jsonUtil;
|
||||||
|
private hashUtil;
|
||||||
|
private itemHelper;
|
||||||
|
private databaseServer;
|
||||||
|
private generatedAssortItems;
|
||||||
|
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer);
|
||||||
|
getAssortItems(): Item[];
|
||||||
|
private assortsAreGenerated;
|
||||||
|
private generateRagfairAssortItems;
|
||||||
|
private createRagfairAssortItem;
|
||||||
|
}
|
51
TypeScript/7OnUpdateOnLoadHooks/types/generators/RagfairOfferGenerator.d.ts
vendored
Normal file
51
TypeScript/7OnUpdateOnLoadHooks/types/generators/RagfairOfferGenerator.d.ts
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
|
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { RagfairAssortGenerator } from "./RagfairAssortGenerator";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
|
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||||
|
import { FenceService } from "../services/FenceService";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class RagfairOfferGenerator {
|
||||||
|
private logger;
|
||||||
|
private jsonUtil;
|
||||||
|
private hashUtil;
|
||||||
|
private randomUtil;
|
||||||
|
private timeUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private ragfairServerHelper;
|
||||||
|
private saveServer;
|
||||||
|
private presetHelper;
|
||||||
|
private ragfairAssortGenerator;
|
||||||
|
private ragfairOfferService;
|
||||||
|
private ragfairPriceService;
|
||||||
|
private fenceService;
|
||||||
|
private itemHelper;
|
||||||
|
private configServer;
|
||||||
|
private ragfairConfig;
|
||||||
|
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);
|
||||||
|
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||||
|
private getTraderId;
|
||||||
|
private getRating;
|
||||||
|
private getRatingGrowing;
|
||||||
|
private getOfferEndTime;
|
||||||
|
generateDynamicOffers(expiredOffers?: Item[]): void;
|
||||||
|
generateTraderOffers(traderID: string): void;
|
||||||
|
private getItemCondition;
|
||||||
|
private addMissingCondition;
|
||||||
|
private getOfferRequirements;
|
||||||
|
/**
|
||||||
|
* Create a flea offer and store it in the Ragfair server offers array
|
||||||
|
*/
|
||||||
|
createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||||
|
}
|
19
TypeScript/7OnUpdateOnLoadHooks/types/generators/WeatherGenerator.d.ts
vendored
Normal file
19
TypeScript/7OnUpdateOnLoadHooks/types/generators/WeatherGenerator.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class WeatherGenerator {
|
||||||
|
private weightedRandomHelper;
|
||||||
|
private randomUtil;
|
||||||
|
private timeUtil;
|
||||||
|
private configServer;
|
||||||
|
private weatherConfig;
|
||||||
|
constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||||
|
calculateTime(data: IWeatherData): IWeatherData;
|
||||||
|
generateWeather(data: IWeatherData): IWeatherData;
|
||||||
|
private getWeightedFog;
|
||||||
|
private getWeightedRain;
|
||||||
|
private getRandomFloat;
|
||||||
|
private getRandomInt;
|
||||||
|
}
|
16
TypeScript/7OnUpdateOnLoadHooks/types/helpers/AssortHelper.d.ts
vendored
Normal file
16
TypeScript/7OnUpdateOnLoadHooks/types/helpers/AssortHelper.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ItemHelper } from "./ItemHelper";
|
||||||
|
import { QuestHelper } from "./QuestHelper";
|
||||||
|
export declare class AssortHelper {
|
||||||
|
private logger;
|
||||||
|
private itemHelper;
|
||||||
|
private databaseServer;
|
||||||
|
private questHelper;
|
||||||
|
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper);
|
||||||
|
removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort;
|
||||||
|
stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort;
|
||||||
|
stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort;
|
||||||
|
}
|
79
TypeScript/7OnUpdateOnLoadHooks/types/helpers/BotGeneratorHelper.d.ts
vendored
Normal file
79
TypeScript/7OnUpdateOnLoadHooks/types/helpers/BotGeneratorHelper.d.ts
vendored
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||||
|
import { ModsChances, Mods } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { Item, Upd } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { InventoryHelper } from "./InventoryHelper";
|
||||||
|
import { ContainerHelper } from "./ContainerHelper";
|
||||||
|
import { ItemHelper } from "./ItemHelper";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
declare class BotGeneratorHelper {
|
||||||
|
private logger;
|
||||||
|
private jsonUtil;
|
||||||
|
private hashUtil;
|
||||||
|
private randomUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private durabilityLimitsHelper;
|
||||||
|
private itemHelper;
|
||||||
|
private inventoryHelper;
|
||||||
|
private containerHelper;
|
||||||
|
private configServer;
|
||||||
|
private botConfig;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, 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[];
|
||||||
|
/**
|
||||||
|
* With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines.
|
||||||
|
* Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0.
|
||||||
|
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
||||||
|
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
||||||
|
*
|
||||||
|
* @param {object} items The items where the CylinderMagazine's camora are appended to
|
||||||
|
* @param {object} modPool modPool which should include available cartrigdes
|
||||||
|
* @param {string} parentId The CylinderMagazine's UID
|
||||||
|
* @param {object} parentTemplate The CylinderMagazine's template
|
||||||
|
*/
|
||||||
|
private fillCamora;
|
||||||
|
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
|
||||||
|
"upd"?: Upd;
|
||||||
|
};
|
||||||
|
private getModTplFromItemDb;
|
||||||
|
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean;
|
||||||
|
/** Adds an item with all its childern into specified equipmentSlots, wherever it fits.
|
||||||
|
* Returns a `boolean` indicating success. */
|
||||||
|
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean;
|
||||||
|
private itemAllowedInContainer;
|
||||||
|
}
|
||||||
|
export declare class ExhaustableArray<T> {
|
||||||
|
private itemPool;
|
||||||
|
private randomUtil;
|
||||||
|
private jsonUtil;
|
||||||
|
private pool;
|
||||||
|
constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil);
|
||||||
|
getRandomValue(): T;
|
||||||
|
getFirstValue(): T;
|
||||||
|
hasValues(): boolean;
|
||||||
|
}
|
||||||
|
declare namespace BotGeneratorHelper {
|
||||||
|
enum EquipmentSlots {
|
||||||
|
HEADWEAR = "Headwear",
|
||||||
|
EARPIECE = "Earpiece",
|
||||||
|
FACE_COVER = "FaceCover",
|
||||||
|
ARMOR_VEST = "ArmorVest",
|
||||||
|
EYEWEAR = "Eyewear",
|
||||||
|
ARM_BAND = "ArmBand",
|
||||||
|
TACTICAL_VEST = "TacticalVest",
|
||||||
|
POCKETS = "Pockets",
|
||||||
|
BACKPACK = "Backpack",
|
||||||
|
SECURED_CONTAINER = "SecuredContainer",
|
||||||
|
FIRST_PRIMARY_WEAPON = "FirstPrimaryWeapon",
|
||||||
|
SECOND_PRIMARY_WEAPON = "SecondPrimaryWeapon",
|
||||||
|
HOLSTER = "Holster",
|
||||||
|
SCABBARD = "Scabbard"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export { BotGeneratorHelper };
|
22
TypeScript/7OnUpdateOnLoadHooks/types/helpers/BotHelper.d.ts
vendored
Normal file
22
TypeScript/7OnUpdateOnLoadHooks/types/helpers/BotHelper.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class BotHelper {
|
||||||
|
private logger;
|
||||||
|
private jsonUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private randomUtil;
|
||||||
|
private configServer;
|
||||||
|
private botConfig;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||||
|
getBotDifficultySettings(type: string, difficulty: string): Difficulty;
|
||||||
|
getPmcDifficultySettings(type: string, difficulty: string): Difficulty;
|
||||||
|
randomisePmcHostility(difficultySettings: Difficulty): void;
|
||||||
|
isBotPmc(botRole: string): boolean;
|
||||||
|
isBotBoss(botRole: string): boolean;
|
||||||
|
isBotFollower(botRole: string): boolean;
|
||||||
|
addBotToFriendlyList(difficultySettings: Difficulty, typeToAdd: string): void;
|
||||||
|
}
|
12
TypeScript/7OnUpdateOnLoadHooks/types/helpers/ContainerHelper.d.ts
vendored
Normal file
12
TypeScript/7OnUpdateOnLoadHooks/types/helpers/ContainerHelper.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
export declare class FindSlotResult {
|
||||||
|
success: boolean;
|
||||||
|
x: any;
|
||||||
|
y: any;
|
||||||
|
rotation: boolean;
|
||||||
|
constructor(success?: boolean, x?: any, y?: any, rotation?: boolean);
|
||||||
|
}
|
||||||
|
export declare class ContainerHelper {
|
||||||
|
private locateSlot;
|
||||||
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
||||||
|
}
|
20
TypeScript/7OnUpdateOnLoadHooks/types/helpers/DialogueHelper.d.ts
vendored
Normal file
20
TypeScript/7OnUpdateOnLoadHooks/types/helpers/DialogueHelper.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { ItemHelper } from "./ItemHelper";
|
||||||
|
import { Dialogue, MessageContent, MessagePreview, MessageType } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { NotifierHelper } from "./NotifierHelper";
|
||||||
|
import { NotificationSendHelper } from "./NotificationSendHelper";
|
||||||
|
export declare class DialogueHelper {
|
||||||
|
private hashUtil;
|
||||||
|
private saveServer;
|
||||||
|
private databaseServer;
|
||||||
|
private notifierHelper;
|
||||||
|
private notificationSendHelper;
|
||||||
|
private itemHelper;
|
||||||
|
constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper);
|
||||||
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||||
|
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void;
|
||||||
|
getMessagePreview(dialogue: Dialogue): MessagePreview;
|
||||||
|
getMessageItemContents(messageID: string, sessionID: string): any[];
|
||||||
|
}
|
25
TypeScript/7OnUpdateOnLoadHooks/types/helpers/DurabilityLimitsHelper.d.ts
vendored
Normal file
25
TypeScript/7OnUpdateOnLoadHooks/types/helpers/DurabilityLimitsHelper.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotHelper } from "./BotHelper";
|
||||||
|
export declare class DurabilityLimitsHelper {
|
||||||
|
private randomUtil;
|
||||||
|
private botHelper;
|
||||||
|
private configServer;
|
||||||
|
private botConfig;
|
||||||
|
constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer);
|
||||||
|
getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||||
|
getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||||
|
getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||||
|
getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||||
|
private generateMaxWeaponDurability;
|
||||||
|
private generateMaxPmcArmorDurability;
|
||||||
|
private getLowestMaxWeaponFromConfig;
|
||||||
|
private getHighestMaxWeaponDurabilityFromConfig;
|
||||||
|
private generateWeaponDurability;
|
||||||
|
private generateArmorDurability;
|
||||||
|
private getMinWeaponDeltaFromConfig;
|
||||||
|
private getMaxWeaponDeltaFromConfig;
|
||||||
|
private getMinArmorDeltaFromConfig;
|
||||||
|
private getMaxArmorDeltaFromConfig;
|
||||||
|
}
|
22
TypeScript/7OnUpdateOnLoadHooks/types/helpers/ExtendedProfileHelper.d.ts
vendored
Normal file
22
TypeScript/7OnUpdateOnLoadHooks/types/helpers/ExtendedProfileHelper.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { FenceService } from "../services/FenceService";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { ItemHelper } from "./ItemHelper";
|
||||||
|
import { IWatermark } from "../models/spt/utils/IWatermark";
|
||||||
|
import { BotGenerator } from "../generators/BotGenerator";
|
||||||
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
|
export declare class ExtendedProfileHelper extends ProfileHelper {
|
||||||
|
private botGenerator;
|
||||||
|
constructor(jsonUtil: JsonUtil, watermark: IWatermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator);
|
||||||
|
generatePlayerScav(sessionID: string): IPmcData;
|
||||||
|
private getScavSkills;
|
||||||
|
private removeSecureContainer;
|
||||||
|
private getDefaultScavSkills;
|
||||||
|
private getScavStats;
|
||||||
|
private getScavLevel;
|
||||||
|
private getScavExperience;
|
||||||
|
private setScavCooldownTimer;
|
||||||
|
}
|
9
TypeScript/7OnUpdateOnLoadHooks/types/helpers/GameEventHelper.d.ts
vendored
Normal file
9
TypeScript/7OnUpdateOnLoadHooks/types/helpers/GameEventHelper.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
export declare class GameEventHelper {
|
||||||
|
private databaseServer;
|
||||||
|
constructor(databaseServer: DatabaseServer);
|
||||||
|
get EVENT(): Record<string, string>;
|
||||||
|
get christmasEventItems(): string[];
|
||||||
|
itemIsChristmasRelated(itemId: string): boolean;
|
||||||
|
christmasEventEnabled(): boolean;
|
||||||
|
}
|
33
TypeScript/7OnUpdateOnLoadHooks/types/helpers/HandbookHelper.d.ts
vendored
Normal file
33
TypeScript/7OnUpdateOnLoadHooks/types/helpers/HandbookHelper.d.ts
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
declare class LookupItem {
|
||||||
|
byId: Record<number, string>;
|
||||||
|
byParent: Record<string, string[]>;
|
||||||
|
constructor();
|
||||||
|
}
|
||||||
|
export declare class LookupCollection {
|
||||||
|
items: LookupItem;
|
||||||
|
categories: LookupItem;
|
||||||
|
constructor();
|
||||||
|
}
|
||||||
|
export declare class HandbookHelper {
|
||||||
|
private lookup;
|
||||||
|
hydrateLookup(lookup: LookupCollection): void;
|
||||||
|
getTemplatePrice(x: string): number;
|
||||||
|
templatesWithParent(x: string): string[];
|
||||||
|
isCategory(x: string): boolean;
|
||||||
|
childrenCategories(x: string): string[];
|
||||||
|
/**
|
||||||
|
* Gets Currency to Ruble conversion Value
|
||||||
|
* @param {number} value
|
||||||
|
* @param {string} currencyFrom
|
||||||
|
* @returns number
|
||||||
|
*/
|
||||||
|
inRUB(value: number, currencyFrom: string): number;
|
||||||
|
/**
|
||||||
|
* Gets Ruble to Currency conversion Value
|
||||||
|
* @param {number} value
|
||||||
|
* @param {string} currencyTo
|
||||||
|
* @returns number
|
||||||
|
*/
|
||||||
|
fromRUB(value: number, currencyTo: string): number;
|
||||||
|
}
|
||||||
|
export {};
|
23
TypeScript/7OnUpdateOnLoadHooks/types/helpers/HealthHelper.d.ts
vendored
Normal file
23
TypeScript/7OnUpdateOnLoadHooks/types/helpers/HealthHelper.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class HealthHelper {
|
||||||
|
private jsonUtil;
|
||||||
|
private logger;
|
||||||
|
private timeUtil;
|
||||||
|
private saveServer;
|
||||||
|
private configServer;
|
||||||
|
private healthConfig;
|
||||||
|
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
|
||||||
|
resetVitality(sessionID: string): IAkiProfile;
|
||||||
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
||||||
|
private saveHealth;
|
||||||
|
private saveEffects;
|
||||||
|
private addEffect;
|
||||||
|
private isEmpty;
|
||||||
|
}
|
64
TypeScript/7OnUpdateOnLoadHooks/types/helpers/HideoutHelper.d.ts
vendored
Normal file
64
TypeScript/7OnUpdateOnLoadHooks/types/helpers/HideoutHelper.d.ts
vendored
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData";
|
||||||
|
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
|
import { StageBonus } from "../models/eft/hideout/IHideoutArea";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
|
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { PlayerService } from "../services/PlayerService";
|
||||||
|
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||||
|
import { InventoryHelper } from "./InventoryHelper";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
export declare class HideoutHelper {
|
||||||
|
private logger;
|
||||||
|
private hashUtil;
|
||||||
|
private timeUtil;
|
||||||
|
private randomUtil;
|
||||||
|
private databaseServer;
|
||||||
|
private itemEventRouter;
|
||||||
|
private httpResponse;
|
||||||
|
private profileHelper;
|
||||||
|
private inventoryHelper;
|
||||||
|
private playerService;
|
||||||
|
private configServer;
|
||||||
|
static BITCOIN_FARM: string;
|
||||||
|
private WATER_COLLECTOR;
|
||||||
|
private BITCOIN;
|
||||||
|
private EXPEDITIONARY_FUEL_TANK;
|
||||||
|
static NAME_BACKENDCOUNTERS_CRAFTING: string;
|
||||||
|
static SKILL_NAME_HIDEOUT: string;
|
||||||
|
static HOUR_FOR_SKILL_CRAFTING: number;
|
||||||
|
static SKILL_NAME_CRAFITING: string;
|
||||||
|
private hideoutConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer);
|
||||||
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* This convinience function intialies new Production Object
|
||||||
|
* with all the constants.
|
||||||
|
*/
|
||||||
|
initProduction(recipeId: string, productionTime: number): Production;
|
||||||
|
isProductionType(productive: Productive): productive is Production;
|
||||||
|
applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void;
|
||||||
|
private applySkillXPBoost;
|
||||||
|
updatePlayerHideout(sessionID: string): void;
|
||||||
|
private updateFuel;
|
||||||
|
private updateWaterFilters;
|
||||||
|
private getAreaUpdObject;
|
||||||
|
private updateAirFilters;
|
||||||
|
private updateBitcoinFarm;
|
||||||
|
private getBTCSlots;
|
||||||
|
private getManagementSkillsSlots;
|
||||||
|
private hasManagementSkillSlots;
|
||||||
|
private getHideoutManagementSkill;
|
||||||
|
private getHideoutManagementConsumptionBonus;
|
||||||
|
isProduction(productive: Productive): productive is Production;
|
||||||
|
getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user