forked from CWX/CWX-mods
personal debug tool
This commit is contained in:
parent
ef532ecc94
commit
d1fce092e9
9
Live/CWX_DebugTool/.eslintignore
Normal file
9
Live/CWX_DebugTool/.eslintignore
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Exclude these folders from linting
|
||||||
|
node_modules
|
||||||
|
dist/
|
||||||
|
types/
|
||||||
|
|
||||||
|
# Exclude these filetypes from linting
|
||||||
|
*.json
|
||||||
|
*.txt
|
||||||
|
*.exe
|
75
Live/CWX_DebugTool/.eslintrc.json
Normal file
75
Live/CWX_DebugTool/.eslintrc.json
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
{
|
||||||
|
"root": true,
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"plugins": [
|
||||||
|
"@typescript-eslint"
|
||||||
|
],
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"@typescript-eslint/no-explicit-any": 0,
|
||||||
|
"@typescript-eslint/no-unused-vars": 1,
|
||||||
|
"@typescript-eslint/no-empty-interface": 0,
|
||||||
|
"@typescript-eslint/no-namespace": 0,
|
||||||
|
"@typescript-eslint/comma-dangle": 1,
|
||||||
|
"@typescript-eslint/func-call-spacing": 2,
|
||||||
|
"@typescript-eslint/quotes": 1,
|
||||||
|
"@typescript-eslint/brace-style": [
|
||||||
|
"warn",
|
||||||
|
"allman"
|
||||||
|
],
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
"selector": "default",
|
||||||
|
"format": ["camelCase"],
|
||||||
|
"leadingUnderscore": "allow"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"selector": "typeLike",
|
||||||
|
"format": ["PascalCase"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"selector": "objectLiteralProperty",
|
||||||
|
"format": ["PascalCase", "camelCase"],
|
||||||
|
"leadingUnderscore": "allow"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"selector": "typeProperty",
|
||||||
|
"format": ["PascalCase", "camelCase"],
|
||||||
|
"leadingUnderscore": "allow"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"selector": "enumMember",
|
||||||
|
"format": ["UPPER_CASE"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@typescript-eslint/indent": [
|
||||||
|
"warn",
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-unused-expressions": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
"allowShortCircuit": false,
|
||||||
|
"allowTernary": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@typescript-eslint/keyword-spacing": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
"before": true,
|
||||||
|
"after": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@typescript-eslint/explicit-module-boundary-types": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
"allowArgumentsExplicitlyTypedAsAny": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
64
Live/CWX_DebugTool/README.md
Normal file
64
Live/CWX_DebugTool/README.md
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
|
||||||
|
This project was created to automate most parts of building and setting up an environment.
|
||||||
|
|
||||||
|
## **NodeJS 14.15.3:**
|
||||||
|
|
||||||
|
The first step would be to install nodejs on your pc, the version you NEED is **14.15.3**
|
||||||
|
|
||||||
|
That version is the one that has been used to test the mod templates and build scripts.
|
||||||
|
|
||||||
|
It can be downloaded from here: https://nodejs.org/download/release/v14.15.3/
|
||||||
|
|
||||||
|
A system reboot may be needed after install.
|
||||||
|
|
||||||
|
## **IDE:**
|
||||||
|
|
||||||
|
The second step is having an IDE ready. For the currect purpose we've setup a VSCodium workspace file.
|
||||||
|
|
||||||
|
You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium.
|
||||||
|
|
||||||
|
You can get VSCodium here: https://vscodium.com/#install
|
||||||
|
|
||||||
|
## **Workspace:**
|
||||||
|
|
||||||
|
Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Worspace from File...).
|
||||||
|
|
||||||
|
Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended.
|
||||||
|
|
||||||
|
## **Environment Setup:**
|
||||||
|
|
||||||
|
There is a task that will automatically setup your environment to use typescript.
|
||||||
|
|
||||||
|
To run it, you just need to go to:
|
||||||
|
|
||||||
|
> Terminal->Run Task...->Show All Tasks...->npm: install
|
||||||
|
|
||||||
|
After running this task, your environment will be ready to start coding.
|
||||||
|
|
||||||
|
DO NOT remove the node_modules folder, this is an auto generated directory that has the required dependencies to be able to use typescript and more.
|
||||||
|
|
||||||
|
## **IMPORTANT:**
|
||||||
|
|
||||||
|
Before starting to work on your mod, we suggest you read about Dependency Injection and Inversion of Control as this is the adopted architecture SPT-AKI has adopted.
|
||||||
|
|
||||||
|
It will be difficult to understand some of the problems you may be having if you dont understand the basics of it.
|
||||||
|
|
||||||
|
A guide explaining all the essentials will be available on the hub on release for you to read about.
|
||||||
|
|
||||||
|
## **Coding:**
|
||||||
|
|
||||||
|
All your work should be centered around the mod.ts file as an entry point.
|
||||||
|
You can ONLY change the following properties from the package.json file: `"name"`, `"version"`, `"license"`: `"MIT"`, `"author"`, `"akiVersion"`.
|
||||||
|
|
||||||
|
If you have never used typescript before, you can read about it here: https://www.typescriptlang.org/docs/
|
||||||
|
|
||||||
|
## **Distributing your mod:**
|
||||||
|
|
||||||
|
The project has been set up with an automatic task that will copy and zip ALL required files for your mod to work on SPT-AKI.
|
||||||
|
To run this task you just need to go to:
|
||||||
|
|
||||||
|
> Terminal->Run Task...->Show All Tasks...->npm: build:zip
|
||||||
|
|
||||||
|
The output will be a mod.zip file that will appear on the root of the project.
|
||||||
|
|
||||||
|
Always verify that all files were included into the zip file.
|
19
Live/CWX_DebugTool/config/config.json
Normal file
19
Live/CWX_DebugTool/config/config.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"showLogs": true,
|
||||||
|
"globalsConfig": {
|
||||||
|
"noFallDamage": true,
|
||||||
|
"openFlea": true,
|
||||||
|
"quickScav": true
|
||||||
|
},
|
||||||
|
"ragfairConfig": {
|
||||||
|
"staticTrader": true,
|
||||||
|
"roublesOnly": true,
|
||||||
|
"disableBSGBlacklist": true
|
||||||
|
},
|
||||||
|
"locationConfig": {
|
||||||
|
"turnLootOff": true
|
||||||
|
},
|
||||||
|
"inraidConfig": {
|
||||||
|
"turnPVEOff": true
|
||||||
|
}
|
||||||
|
}
|
64
Live/CWX_DebugTool/dist/README.md
vendored
Normal file
64
Live/CWX_DebugTool/dist/README.md
vendored
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
|
||||||
|
This project was created to automate most parts of building and setting up an environment.
|
||||||
|
|
||||||
|
## **NodeJS 14.15.3:**
|
||||||
|
|
||||||
|
The first step would be to install nodejs on your pc, the version you NEED is **14.15.3**
|
||||||
|
|
||||||
|
That version is the one that has been used to test the mod templates and build scripts.
|
||||||
|
|
||||||
|
It can be downloaded from here: https://nodejs.org/download/release/v14.15.3/
|
||||||
|
|
||||||
|
A system reboot may be needed after install.
|
||||||
|
|
||||||
|
## **IDE:**
|
||||||
|
|
||||||
|
The second step is having an IDE ready. For the currect purpose we've setup a VSCodium workspace file.
|
||||||
|
|
||||||
|
You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium.
|
||||||
|
|
||||||
|
You can get VSCodium here: https://vscodium.com/#install
|
||||||
|
|
||||||
|
## **Workspace:**
|
||||||
|
|
||||||
|
Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Worspace from File...).
|
||||||
|
|
||||||
|
Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended.
|
||||||
|
|
||||||
|
## **Environment Setup:**
|
||||||
|
|
||||||
|
There is a task that will automatically setup your environment to use typescript.
|
||||||
|
|
||||||
|
To run it, you just need to go to:
|
||||||
|
|
||||||
|
> Terminal->Run Task...->Show All Tasks...->npm: install
|
||||||
|
|
||||||
|
After running this task, your environment will be ready to start coding.
|
||||||
|
|
||||||
|
DO NOT remove the node_modules folder, this is an auto generated directory that has the required dependencies to be able to use typescript and more.
|
||||||
|
|
||||||
|
## **IMPORTANT:**
|
||||||
|
|
||||||
|
Before starting to work on your mod, we suggest you read about Dependency Injection and Inversion of Control as this is the adopted architecture SPT-AKI has adopted.
|
||||||
|
|
||||||
|
It will be difficult to understand some of the problems you may be having if you dont understand the basics of it.
|
||||||
|
|
||||||
|
A guide explaining all the essentials will be available on the hub on release for you to read about.
|
||||||
|
|
||||||
|
## **Coding:**
|
||||||
|
|
||||||
|
All your work should be centered around the mod.ts file as an entry point.
|
||||||
|
You can ONLY change the following properties from the package.json file: `"name"`, `"version"`, `"license"`: `"MIT"`, `"author"`, `"akiVersion"`.
|
||||||
|
|
||||||
|
If you have never used typescript before, you can read about it here: https://www.typescriptlang.org/docs/
|
||||||
|
|
||||||
|
## **Distributing your mod:**
|
||||||
|
|
||||||
|
The project has been set up with an automatic task that will copy and zip ALL required files for your mod to work on SPT-AKI.
|
||||||
|
To run this task you just need to go to:
|
||||||
|
|
||||||
|
> Terminal->Run Task...->Show All Tasks...->npm: build:zip
|
||||||
|
|
||||||
|
The output will be a mod.zip file that will appear on the root of the project.
|
||||||
|
|
||||||
|
Always verify that all files were included into the zip file.
|
19
Live/CWX_DebugTool/dist/config/config.json
vendored
Normal file
19
Live/CWX_DebugTool/dist/config/config.json
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"showLogs": true,
|
||||||
|
"globalsConfig": {
|
||||||
|
"noFallDamage": true,
|
||||||
|
"openFlea": true,
|
||||||
|
"quickScav": true
|
||||||
|
},
|
||||||
|
"ragfairConfig": {
|
||||||
|
"staticTrader": true,
|
||||||
|
"roublesOnly": true,
|
||||||
|
"disableBSGBlacklist": true
|
||||||
|
},
|
||||||
|
"locationConfig": {
|
||||||
|
"turnLootOff": true
|
||||||
|
},
|
||||||
|
"inraidConfig": {
|
||||||
|
"turnPVEOff": true
|
||||||
|
}
|
||||||
|
}
|
32
Live/CWX_DebugTool/dist/models/IConfig.ts
vendored
Normal file
32
Live/CWX_DebugTool/dist/models/IConfig.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
export interface IConfig
|
||||||
|
{
|
||||||
|
showLogs: boolean
|
||||||
|
globalsConfig: globalsConfig
|
||||||
|
ragfairConfig: ragfairConfig
|
||||||
|
locationConfig: locationConfig
|
||||||
|
inraidConfig: inraidConfig
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface globalsConfig
|
||||||
|
{
|
||||||
|
noFallDamage: boolean
|
||||||
|
openFlea: boolean
|
||||||
|
quickScav: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ragfairConfig
|
||||||
|
{
|
||||||
|
staticTrader: boolean
|
||||||
|
roublesOnly: boolean
|
||||||
|
disableBSGBlacklist: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface locationConfig
|
||||||
|
{
|
||||||
|
turnLootOff: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface inraidConfig
|
||||||
|
{
|
||||||
|
turnPVEOff: boolean
|
||||||
|
}
|
25
Live/CWX_DebugTool/dist/package.json
vendored
Normal file
25
Live/CWX_DebugTool/dist/package.json
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "DebugTool",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "src/mod.js",
|
||||||
|
"license": "NCSA",
|
||||||
|
"author": "CWX",
|
||||||
|
"akiVersion": "*.*.*",
|
||||||
|
"scripts": {
|
||||||
|
"setup:environment": "npm i",
|
||||||
|
"build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" \"./**/*.*\" ./dist",
|
||||||
|
"zip:files": "cd dist/ && bestzip ../mod.zip *",
|
||||||
|
"build:zip": "npm run clean:environment && npm run build:unzipped && npm run zip:files",
|
||||||
|
"clean:environment": "node -e \"require('fs').rm('mod.zip', ()=>{})\" && node -e \"require('fs').rmdir('./dist/',{recursive:true},()=>{})\""
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^14.15.3",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||||
|
"@typescript-eslint/parser": "^4.33.0",
|
||||||
|
"copyfiles": "2.4.1",
|
||||||
|
"eslint": "7.26.0",
|
||||||
|
"tsyringe": "4.6.0",
|
||||||
|
"typescript": "4.6.4",
|
||||||
|
"bestzip": "2.2.1"
|
||||||
|
}
|
||||||
|
}
|
18
Live/CWX_DebugTool/dist/src/configHandler.ts
vendored
Normal file
18
Live/CWX_DebugTool/dist/src/configHandler.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { injectable } from "tsyringe";
|
||||||
|
import { IConfig } from "../models/IConfig";
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class CWX_ConfigHandler
|
||||||
|
{
|
||||||
|
private config: IConfig;
|
||||||
|
|
||||||
|
constructor()
|
||||||
|
{
|
||||||
|
this.config = require("../config/config.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
public getConfig(): IConfig
|
||||||
|
{
|
||||||
|
return this.config;
|
||||||
|
}
|
||||||
|
}
|
53
Live/CWX_DebugTool/dist/src/globalsConfig.ts
vendored
Normal file
53
Live/CWX_DebugTool/dist/src/globalsConfig.ts
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { globalsConfig } from "models/IConfig";
|
||||||
|
|
||||||
|
import { inject, injectable } from "tsyringe";
|
||||||
|
import { CWX_ConfigHandler } from "./configHandler";
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class CWX_GlobalsConfig
|
||||||
|
{
|
||||||
|
private tables;
|
||||||
|
private config: globalsConfig;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
@inject("DatabaseServer") private databaseServer: DatabaseServer,
|
||||||
|
@inject("CWX_ConfigHandler") private configHandler: CWX_ConfigHandler
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
public applyChanges(): void
|
||||||
|
{
|
||||||
|
this.config = this.configHandler.getConfig().globalsConfig;
|
||||||
|
this.tables = this.databaseServer.getTables().globals;
|
||||||
|
|
||||||
|
this.NoFallDamage();
|
||||||
|
this.OpenFlea();
|
||||||
|
this.QuickScav();
|
||||||
|
}
|
||||||
|
|
||||||
|
private NoFallDamage(): void
|
||||||
|
{
|
||||||
|
if (this.config.noFallDamage)
|
||||||
|
{
|
||||||
|
this.tables.config.Health.Falling.DamagePerMeter = 0;
|
||||||
|
this.tables.config.Health.Falling.SafeHeight = 900;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private OpenFlea(): void
|
||||||
|
{
|
||||||
|
if (this.config.openFlea)
|
||||||
|
{
|
||||||
|
this.tables.config.RagFair.minUserLevel = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private QuickScav(): void
|
||||||
|
{
|
||||||
|
if (this.config.quickScav)
|
||||||
|
{
|
||||||
|
this.tables.config.SavagePlayCooldown = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
37
Live/CWX_DebugTool/dist/src/inraidConfig.ts
vendored
Normal file
37
Live/CWX_DebugTool/dist/src/inraidConfig.ts
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import { inject, injectable } from "tsyringe";
|
||||||
|
|
||||||
|
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||||
|
|
||||||
|
import { CWX_ConfigHandler } from "./configHandler";
|
||||||
|
import { inraidConfig } from "models/IConfig";
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class CWX_InraidConfig
|
||||||
|
{
|
||||||
|
private tables: IInRaidConfig;
|
||||||
|
private config: inraidConfig;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
@inject("ConfigServer") private configServer: ConfigServer,
|
||||||
|
@inject("CWX_ConfigHandler") private configHandler: CWX_ConfigHandler
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
public applyChanges(): void
|
||||||
|
{
|
||||||
|
this.config = this.configHandler.getConfig().inraidConfig;
|
||||||
|
this.tables = this.configServer.getConfig(ConfigTypes.IN_RAID);
|
||||||
|
|
||||||
|
this.TurnPVEOff();
|
||||||
|
}
|
||||||
|
|
||||||
|
private TurnPVEOff(): void
|
||||||
|
{
|
||||||
|
if (this.config.turnPVEOff)
|
||||||
|
{
|
||||||
|
this.tables.raidMenuSettings.enablePve = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
43
Live/CWX_DebugTool/dist/src/locationConfig.ts
vendored
Normal file
43
Live/CWX_DebugTool/dist/src/locationConfig.ts
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
import { inject, injectable } from "tsyringe";
|
||||||
|
|
||||||
|
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||||
|
|
||||||
|
import { CWX_ConfigHandler } from "./configHandler";
|
||||||
|
import { locationConfig } from "models/IConfig";
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class CWX_LocationConfig
|
||||||
|
{
|
||||||
|
private tables: ILocationConfig;
|
||||||
|
private config: locationConfig;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
@inject("ConfigServer") private configServer: ConfigServer,
|
||||||
|
@inject("CWX_ConfigHandler") private configHandler: CWX_ConfigHandler
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
public applyChanges(): void
|
||||||
|
{
|
||||||
|
this.config = this.configHandler.getConfig().locationConfig;
|
||||||
|
this.tables = this.configServer.getConfig(ConfigTypes.LOCATION);
|
||||||
|
|
||||||
|
this.TurnLootOff();
|
||||||
|
}
|
||||||
|
|
||||||
|
private TurnLootOff(): void
|
||||||
|
{
|
||||||
|
if (this.config.turnLootOff)
|
||||||
|
{
|
||||||
|
for (const location in this.tables.looseLootMultiplier) {
|
||||||
|
this.tables.looseLootMultiplier[location] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const location in this.tables.staticLootMultiplier) {
|
||||||
|
this.tables.staticLootMultiplier[location] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
101
Live/CWX_DebugTool/dist/src/logging.ts
vendored
Normal file
101
Live/CWX_DebugTool/dist/src/logging.ts
vendored
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
import { SptLogger } from "@spt-aki/models/spt/logging/SptLogger";
|
||||||
|
import { IConfig } from "models/IConfig";
|
||||||
|
import { inject, injectable } from "tsyringe";
|
||||||
|
import { CWX_ConfigHandler } from "./configHandler";
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class CWX_Logging
|
||||||
|
{
|
||||||
|
private config: IConfig;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
@inject("WinstonLogger") private logger: SptLogger,
|
||||||
|
@inject("CWX_ConfigHandler") private configHandler: CWX_ConfigHandler
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
public SendLogging(): void
|
||||||
|
{
|
||||||
|
this.config = this.configHandler.getConfig();
|
||||||
|
|
||||||
|
// globals
|
||||||
|
this.NoFallDamage();
|
||||||
|
this.OpenFlea();
|
||||||
|
this.QuickScav();
|
||||||
|
|
||||||
|
// ragfair
|
||||||
|
this.StaticTrader();
|
||||||
|
this.RoublesOnly();
|
||||||
|
this.DisableBSGBlacklist();
|
||||||
|
|
||||||
|
// location
|
||||||
|
this.TurnLootOff();
|
||||||
|
|
||||||
|
// inraid
|
||||||
|
this.TurnPVEOff();
|
||||||
|
}
|
||||||
|
|
||||||
|
private NoFallDamage(): void
|
||||||
|
{
|
||||||
|
if (this.config.globalsConfig.noFallDamage)
|
||||||
|
{
|
||||||
|
this.logger.info("No Fall Damage Activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private OpenFlea(): void
|
||||||
|
{
|
||||||
|
if (this.config.globalsConfig.openFlea)
|
||||||
|
{
|
||||||
|
this.logger.info("Open Flea Activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private QuickScav(): void
|
||||||
|
{
|
||||||
|
if (this.config.globalsConfig.quickScav)
|
||||||
|
{
|
||||||
|
this.logger.info("Quick Scav Activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private StaticTrader(): void
|
||||||
|
{
|
||||||
|
if (this.config.ragfairConfig.staticTrader)
|
||||||
|
{
|
||||||
|
this.logger.info("Static Trader Activated")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoublesOnly(): void
|
||||||
|
{
|
||||||
|
if (this.config.ragfairConfig.roublesOnly)
|
||||||
|
{
|
||||||
|
this.logger.info("Roubles Only Activated")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private DisableBSGBlacklist(): void
|
||||||
|
{
|
||||||
|
if (this.config.ragfairConfig.disableBSGBlacklist)
|
||||||
|
{
|
||||||
|
this.logger.info("Disable BSG Blacklist Activated")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private TurnLootOff(): void
|
||||||
|
{
|
||||||
|
if (this.config.locationConfig.turnLootOff)
|
||||||
|
{
|
||||||
|
this.logger.info("Turn Loot Off Activated")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private TurnPVEOff(): void
|
||||||
|
{
|
||||||
|
if (this.config.inraidConfig.turnPVEOff)
|
||||||
|
{
|
||||||
|
this.logger.info("Turn PVE Off Activated")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
Live/CWX_DebugTool/dist/src/mod.ts
vendored
Normal file
36
Live/CWX_DebugTool/dist/src/mod.ts
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import { DependencyContainer, Lifecycle } from "tsyringe";
|
||||||
|
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
|
||||||
|
|
||||||
|
import { CWX_ConfigHandler } from "./configHandler";
|
||||||
|
import { CWX_GlobalsConfig } from "./globalsConfig";
|
||||||
|
import { CWX_Logging } from "./logging";
|
||||||
|
import { CWX_RagfairConfig } from "./ragfairConfig";
|
||||||
|
import { CWX_LocationConfig } from "./locationConfig";
|
||||||
|
import { CWX_InraidConfig } from "./inraidConfig";
|
||||||
|
|
||||||
|
|
||||||
|
class CWX_DebugTool implements IPostDBLoadMod
|
||||||
|
{
|
||||||
|
public postDBLoad(container: DependencyContainer): void
|
||||||
|
{
|
||||||
|
container.register<CWX_ConfigHandler>("CWX_ConfigHandler", CWX_ConfigHandler, {lifecycle:Lifecycle.Singleton})
|
||||||
|
container.register<CWX_GlobalsConfig>("CWX_GlobalsConfig", CWX_GlobalsConfig);
|
||||||
|
container.register<CWX_RagfairConfig>("CWX_RagfairConfig", CWX_RagfairConfig);
|
||||||
|
container.register<CWX_LocationConfig>("CWX_LocationConfig", CWX_LocationConfig);
|
||||||
|
container.register<CWX_InraidConfig>("CWX_InraidConfig", CWX_InraidConfig);
|
||||||
|
container.register<CWX_Logging>("CWX_Logging", CWX_Logging);
|
||||||
|
|
||||||
|
|
||||||
|
container.resolve<CWX_GlobalsConfig>("CWX_GlobalsConfig").applyChanges();
|
||||||
|
container.resolve<CWX_RagfairConfig>("CWX_RagfairConfig").applyChanges();
|
||||||
|
container.resolve<CWX_LocationConfig>("CWX_LocationConfig").applyChanges();
|
||||||
|
container.resolve<CWX_InraidConfig>("CWX_InraidConfig").applyChanges();
|
||||||
|
|
||||||
|
if (container.resolve<CWX_ConfigHandler>("CWX_ConfigHandler").getConfig().showLogs)
|
||||||
|
{
|
||||||
|
container.resolve<CWX_Logging>("CWX_Logging").SendLogging();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { mod: new CWX_DebugTool() }
|
57
Live/CWX_DebugTool/dist/src/ragfairConfig.ts
vendored
Normal file
57
Live/CWX_DebugTool/dist/src/ragfairConfig.ts
vendored
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
import { inject, injectable } from "tsyringe";
|
||||||
|
|
||||||
|
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
|
|
||||||
|
import { CWX_ConfigHandler } from "./configHandler";
|
||||||
|
import { ragfairConfig } from "models/IConfig";
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class CWX_RagfairConfig
|
||||||
|
{
|
||||||
|
private tables: IRagfairConfig;
|
||||||
|
private config: ragfairConfig;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
@inject("ConfigServer") private configServer: ConfigServer,
|
||||||
|
@inject("CWX_ConfigHandler") private configHandler: CWX_ConfigHandler
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
public applyChanges(): void
|
||||||
|
{
|
||||||
|
this.config = this.configHandler.getConfig().ragfairConfig;
|
||||||
|
this.tables = this.configServer.getConfig(ConfigTypes.RAGFAIR);
|
||||||
|
|
||||||
|
this.StaticTrader();
|
||||||
|
this.RoublesOnly();
|
||||||
|
this.DisableBSGBlacklist();
|
||||||
|
}
|
||||||
|
|
||||||
|
private StaticTrader(): void
|
||||||
|
{
|
||||||
|
if (this.config.staticTrader)
|
||||||
|
{
|
||||||
|
this.tables.traders["ragfair"] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoublesOnly(): void
|
||||||
|
{
|
||||||
|
if (this.config.roublesOnly)
|
||||||
|
{
|
||||||
|
this.tables.dynamic.currencies["5449016a4bdc2d6f028b456f"] = 100;
|
||||||
|
this.tables.dynamic.currencies["5696686a4bdc2da3298b456a"] = 0;
|
||||||
|
this.tables.dynamic.currencies["569668774bdc2da2298b4568"] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private DisableBSGBlacklist(): void
|
||||||
|
{
|
||||||
|
if (this.config.disableBSGBlacklist)
|
||||||
|
{
|
||||||
|
this.tables.dynamic.blacklist.enableBsgList = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
4
Live/CWX_DebugTool/dist/types/Program.d.ts
vendored
Normal file
4
Live/CWX_DebugTool/dist/types/Program.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare class Program {
|
||||||
|
constructor();
|
||||||
|
start(): void;
|
||||||
|
}
|
3
Live/CWX_DebugTool/dist/types/TYPES.d.ts
vendored
Normal file
3
Live/CWX_DebugTool/dist/types/TYPES.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export declare const TYPES: {
|
||||||
|
[name: string]: symbol;
|
||||||
|
};
|
15
Live/CWX_DebugTool/dist/types/callbacks/BotCallbacks.d.ts
vendored
Normal file
15
Live/CWX_DebugTool/dist/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 { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class BotCallbacks {
|
||||||
|
protected botController: BotController;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
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;
|
||||||
|
}
|
18
Live/CWX_DebugTool/dist/types/callbacks/BundleCallbacks.d.ts
vendored
Normal file
18
Live/CWX_DebugTool/dist/types/callbacks/BundleCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { BundleLoader } from "../loaders/BundleLoader";
|
||||||
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class BundleCallbacks {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected httpServer: IHttpServer;
|
||||||
|
protected bundleLoader: BundleLoader;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected httpConfig: IHttpConfig;
|
||||||
|
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;
|
||||||
|
}
|
23
Live/CWX_DebugTool/dist/types/callbacks/CustomizationCallbacks.d.ts
vendored
Normal file
23
Live/CWX_DebugTool/dist/types/callbacks/CustomizationCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { CustomizationController } from "../controllers/CustomizationController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { ISuit } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||||
|
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class CustomizationCallbacks {
|
||||||
|
protected customizationController: CustomizationController;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
||||||
|
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{
|
||||||
|
_id: string;
|
||||||
|
suites: string[];
|
||||||
|
}>;
|
||||||
|
getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISuit[]>;
|
||||||
|
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
32
Live/CWX_DebugTool/dist/types/callbacks/DataCallbacks.d.ts
vendored
Normal file
32
Live/CWX_DebugTool/dist/types/callbacks/DataCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
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 { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class DataCallbacks {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected databaseServer: 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
Live/CWX_DebugTool/dist/types/callbacks/DialogueCallbacks.d.ts
vendored
Normal file
45
Live/CWX_DebugTool/dist/types/callbacks/DialogueCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import { DialogueController } from "../controllers/DialogueController";
|
||||||
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IFriendRequestData } from "../models/eft/dialog/IFriendRequestData";
|
||||||
|
import { IGetAllAttachmentsRequestData } from "../models/eft/dialog/IGetAllAttachmentsRequestData";
|
||||||
|
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
||||||
|
import { IGetChatServerListRequestData } from "../models/eft/dialog/IGetChatServerListRequestData";
|
||||||
|
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
||||||
|
import { IGetMailDialogInfoRequestData } from "../models/eft/dialog/IGetMailDialogInfoRequestData";
|
||||||
|
import { IGetMailDialogListRequestData } from "../models/eft/dialog/IGetMailDialogListRequestData";
|
||||||
|
import { IGetMailDialogViewRequestData } from "../models/eft/dialog/IGetMailDialogViewRequestData";
|
||||||
|
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
||||||
|
import { IPinDialogRequestData } from "../models/eft/dialog/IPinDialogRequestData";
|
||||||
|
import { IRemoveDialogRequestData } from "../models/eft/dialog/IRemoveDialogRequestData";
|
||||||
|
import { ISendMessageRequest } from "../models/eft/dialog/ISendMessageRequest";
|
||||||
|
import { ISetDialogReadRequestData } from "../models/eft/dialog/ISetDialogReadRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { DialogueInfo } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class DialogueCallbacks extends OnUpdate {
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected dialogueController: 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;
|
||||||
|
}
|
26
Live/CWX_DebugTool/dist/types/callbacks/GameCallbacks.d.ts
vendored
Normal file
26
Live/CWX_DebugTool/dist/types/callbacks/GameCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import { GameController } from "../controllers/GameController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
|
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
||||||
|
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
|
||||||
|
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { Watermark } from "../utils/Watermark";
|
||||||
|
declare class GameCallbacks {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected watermark: Watermark;
|
||||||
|
protected gameController: GameController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, 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;
|
||||||
|
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
||||||
|
}
|
||||||
|
export { GameCallbacks };
|
8
Live/CWX_DebugTool/dist/types/callbacks/HandbookCallbacks.d.ts
vendored
Normal file
8
Live/CWX_DebugTool/dist/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 {
|
||||||
|
protected handbookController: HandbookController;
|
||||||
|
constructor(handbookController: HandbookController);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
27
Live/CWX_DebugTool/dist/types/callbacks/HealthCallbacks.d.ts
vendored
Normal file
27
Live/CWX_DebugTool/dist/types/callbacks/HealthCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import { HealthController } from "../controllers/HealthController";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
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 { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class HealthCallbacks {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected healthController: HealthController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController);
|
||||||
|
/**
|
||||||
|
* Custom aki server request found in modules/HealthSynchronizer.cs
|
||||||
|
* @param url
|
||||||
|
* @param info HealthListener.Instance.CurrentHealth class
|
||||||
|
* @param sessionID session id
|
||||||
|
* @returns empty response, no data sent back to client
|
||||||
|
*/
|
||||||
|
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||||
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
33
Live/CWX_DebugTool/dist/types/callbacks/HideoutCallbacks.d.ts
vendored
Normal file
33
Live/CWX_DebugTool/dist/types/callbacks/HideoutCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import { HideoutController } from "../controllers/HideoutController";
|
||||||
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||||
|
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||||
|
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||||
|
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
|
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
|
||||||
|
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||||
|
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||||
|
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
|
||||||
|
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
export declare class HideoutCallbacks extends OnUpdate {
|
||||||
|
protected hideoutController: HideoutController;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected hideoutConfig: IHideoutConfig;
|
||||||
|
constructor(hideoutController: HideoutController, // TODO: delay needed
|
||||||
|
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
Live/CWX_DebugTool/dist/types/callbacks/HttpCallbacks.d.ts
vendored
Normal file
9
Live/CWX_DebugTool/dist/types/callbacks/HttpCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { OnLoad } from "../di/OnLoad";
|
||||||
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
|
export declare class HttpCallbacks extends OnLoad {
|
||||||
|
protected httpServer: IHttpServer;
|
||||||
|
constructor(httpServer: IHttpServer);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
getImage(): string;
|
||||||
|
}
|
23
Live/CWX_DebugTool/dist/types/callbacks/InraidCallbacks.d.ts
vendored
Normal file
23
Live/CWX_DebugTool/dist/types/callbacks/InraidCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { InraidController } from "../controllers/InraidController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class InraidCallbacks {
|
||||||
|
protected inraidController: InraidController;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected airdropConfig: IAirdropConfig;
|
||||||
|
protected inraidConfig: IInRaidConfig;
|
||||||
|
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;
|
||||||
|
}
|
24
Live/CWX_DebugTool/dist/types/callbacks/InsuranceCallbacks.d.ts
vendored
Normal file
24
Live/CWX_DebugTool/dist/types/callbacks/InsuranceCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { InsuranceController } from "../controllers/InsuranceController";
|
||||||
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
|
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
||||||
|
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class InsuranceCallbacks extends OnUpdate {
|
||||||
|
protected insuranceController: InsuranceController;
|
||||||
|
protected insuranceService: InsuranceService;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
|
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||||
|
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
|
||||||
|
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
onUpdate(secondsSinceLastRun: number): boolean;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
39
Live/CWX_DebugTool/dist/types/callbacks/InventoryCallbacks.d.ts
vendored
Normal file
39
Live/CWX_DebugTool/dist/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 { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
|
import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData";
|
||||||
|
import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData";
|
||||||
|
import { IInventoryEditMarkerRequestData } from "../models/eft/inventory/IInventoryEditMarkerRequestData";
|
||||||
|
import { IInventoryExamineRequestData } from "../models/eft/inventory/IInventoryExamineRequestData";
|
||||||
|
import { IInventoryFoldRequestData } from "../models/eft/inventory/IInventoryFoldRequestData";
|
||||||
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryReadEncyclopediaRequestData } from "../models/eft/inventory/IInventoryReadEncyclopediaRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
|
import { IInventorySortRequestData } from "../models/eft/inventory/IInventorySortRequestData";
|
||||||
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
|
import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwapRequestData";
|
||||||
|
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
||||||
|
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||||
|
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
export declare class InventoryCallbacks {
|
||||||
|
protected inventoryController: 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
Live/CWX_DebugTool/dist/types/callbacks/ItemEventCallbacks.d.ts
vendored
Normal file
11
Live/CWX_DebugTool/dist/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 {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
||||||
|
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
||||||
|
}
|
28
Live/CWX_DebugTool/dist/types/callbacks/LauncherCallbacks.d.ts
vendored
Normal file
28
Live/CWX_DebugTool/dist/types/callbacks/LauncherCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { LauncherController } from "../controllers/LauncherController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
|
||||||
|
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
|
||||||
|
import { IRegisterData } from "../models/eft/launcher/IRegisterData";
|
||||||
|
import { IRemoveProfileData } from "../models/eft/launcher/IRemoveProfileData";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { Watermark } from "../utils/Watermark";
|
||||||
|
declare class LauncherCallbacks {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected launcherController: LauncherController;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected watermark: Watermark;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark);
|
||||||
|
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: IEmptyRequestData, sessionID: string): string;
|
||||||
|
removeProfile(url: string, info: IRemoveProfileData, sessionID: string): string;
|
||||||
|
getCompatibleTarkovVersion(): string;
|
||||||
|
}
|
||||||
|
export { LauncherCallbacks };
|
14
Live/CWX_DebugTool/dist/types/callbacks/LocationCallbacks.d.ts
vendored
Normal file
14
Live/CWX_DebugTool/dist/types/callbacks/LocationCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import { LocationController } from "../controllers/LocationController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
||||||
|
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class LocationCallbacks {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected locationController: LocationController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
|
||||||
|
getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
|
||||||
|
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;
|
||||||
|
}
|
42
Live/CWX_DebugTool/dist/types/callbacks/MatchCallbacks.d.ts
vendored
Normal file
42
Live/CWX_DebugTool/dist/types/callbacks/MatchCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import { MatchController } from "../controllers/MatchController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
|
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||||
|
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||||
|
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||||
|
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||||
|
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
export declare class MatchCallbacks {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected matchController: MatchController;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
||||||
|
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
||||||
|
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
|
exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
|
startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
|
stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
|
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
|
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
|
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
|
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
|
||||||
|
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
||||||
|
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||||
|
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||||
|
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||||
|
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
|
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
|
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
|
}
|
22
Live/CWX_DebugTool/dist/types/callbacks/ModCallbacks.d.ts
vendored
Normal file
22
Live/CWX_DebugTool/dist/types/callbacks/ModCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { OnLoad } from "../di/OnLoad";
|
||||||
|
import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
||||||
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
declare class ModCallbacks extends OnLoad {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected httpServer: IHttpServer;
|
||||||
|
protected postAkiModLoader: PostAkiModLoader;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected httpConfig: IHttpConfig;
|
||||||
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, postAkiModLoader: PostAkiModLoader, configServer: ConfigServer);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||||
|
getBundles(url: string, info: any, sessionID: string): string;
|
||||||
|
getBundle(url: string, info: any, sessionID: string): string;
|
||||||
|
}
|
||||||
|
export { ModCallbacks };
|
11
Live/CWX_DebugTool/dist/types/callbacks/NoteCallbacks.d.ts
vendored
Normal file
11
Live/CWX_DebugTool/dist/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 { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
||||||
|
export declare class NoteCallbacks {
|
||||||
|
protected noteController: 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
Live/CWX_DebugTool/dist/types/callbacks/NotifierCallbacks.d.ts
vendored
Normal file
24
Live/CWX_DebugTool/dist/types/callbacks/NotifierCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { NotifierController } from "../controllers/NotifierController";
|
||||||
|
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 { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class NotifierCallbacks {
|
||||||
|
protected httpServerHelper: HttpServerHelper;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected notifierController: 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;
|
||||||
|
}
|
16
Live/CWX_DebugTool/dist/types/callbacks/PresetBuildCallbacks.d.ts
vendored
Normal file
16
Live/CWX_DebugTool/dist/types/callbacks/PresetBuildCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { PresetBuildController } from "../controllers/PresetBuildController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
||||||
|
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class PresetBuildCallbacks {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected presetBuildController: PresetBuildController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController);
|
||||||
|
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
||||||
|
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
8
Live/CWX_DebugTool/dist/types/callbacks/PresetCallbacks.d.ts
vendored
Normal file
8
Live/CWX_DebugTool/dist/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 {
|
||||||
|
protected presetController: PresetController;
|
||||||
|
constructor(presetController: PresetController);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
38
Live/CWX_DebugTool/dist/types/callbacks/ProfileCallbacks.d.ts
vendored
Normal file
38
Live/CWX_DebugTool/dist/types/callbacks/ProfileCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
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 { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
||||||
|
import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData";
|
||||||
|
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
|
||||||
|
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
|
||||||
|
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
|
||||||
|
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
|
||||||
|
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
|
||||||
|
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class ProfileCallbacks {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected profileController: 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>;
|
||||||
|
/**
|
||||||
|
* Called when creating a character, when you choose a character face/voice
|
||||||
|
* @param url
|
||||||
|
* @param info response (empty)
|
||||||
|
* @param sessionID
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
|
||||||
|
searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData<ISearchFriendResponse[]>;
|
||||||
|
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
|
||||||
|
getAllMiniProfiles(url: string, info: any, sessionID: string): string;
|
||||||
|
}
|
26
Live/CWX_DebugTool/dist/types/callbacks/QuestCallbacks.d.ts
vendored
Normal file
26
Live/CWX_DebugTool/dist/types/callbacks/QuestCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import { QuestController } from "../controllers/QuestController";
|
||||||
|
import { RepeatableQuestController } from "../controllers/RepeatableQuestController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IQuest } from "../models/eft/common/tables/IQuest";
|
||||||
|
import { IPmcDataRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
|
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||||
|
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
|
||||||
|
import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestData";
|
||||||
|
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class QuestCallbacks {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected questController: QuestController;
|
||||||
|
protected repeatableQuestController: 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[]>;
|
||||||
|
}
|
41
Live/CWX_DebugTool/dist/types/callbacks/RagfairCallbacks.d.ts
vendored
Normal file
41
Live/CWX_DebugTool/dist/types/callbacks/RagfairCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import { RagfairController } from "../controllers/RagfairController";
|
||||||
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IAddOfferRequestData } from "../models/eft/ragfair/IAddOfferRequestData";
|
||||||
|
import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData";
|
||||||
|
import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
|
||||||
|
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
|
||||||
|
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
||||||
|
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
||||||
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
|
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected ragfairServer: RagfairServer;
|
||||||
|
protected ragfairController: RagfairController;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected ragfairConfig: IRagfairConfig;
|
||||||
|
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<IGetOffersResult>;
|
||||||
|
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
||||||
|
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
|
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
||||||
|
}
|
11
Live/CWX_DebugTool/dist/types/callbacks/RepairCallbacks.d.ts
vendored
Normal file
11
Live/CWX_DebugTool/dist/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 { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
|
||||||
|
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
|
export declare class RepairCallbacks {
|
||||||
|
protected repairController: RepairController;
|
||||||
|
constructor(repairController: RepairController);
|
||||||
|
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
9
Live/CWX_DebugTool/dist/types/callbacks/SaveCallbacks.d.ts
vendored
Normal file
9
Live/CWX_DebugTool/dist/types/callbacks/SaveCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
export declare class SaveCallbacks extends OnLoadOnUpdate {
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
constructor(saveServer: SaveServer);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
onUpdate(secondsSinceLastRun: number): boolean;
|
||||||
|
}
|
11
Live/CWX_DebugTool/dist/types/callbacks/TradeCallbacks.d.ts
vendored
Normal file
11
Live/CWX_DebugTool/dist/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 { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
||||||
|
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||||
|
export declare class TradeCallbacks {
|
||||||
|
protected tradeController: TradeController;
|
||||||
|
constructor(tradeController: TradeController);
|
||||||
|
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
18
Live/CWX_DebugTool/dist/types/callbacks/TraderCallbacks.d.ts
vendored
Normal file
18
Live/CWX_DebugTool/dist/types/callbacks/TraderCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { TraderController } from "../controllers/TraderController";
|
||||||
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
|
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 { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class TraderCallbacks extends OnLoadOnUpdate {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected traderController: TraderController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
||||||
|
onLoad(): void;
|
||||||
|
onUpdate(): boolean;
|
||||||
|
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>;
|
||||||
|
}
|
10
Live/CWX_DebugTool/dist/types/callbacks/WeatherCallbacks.d.ts
vendored
Normal file
10
Live/CWX_DebugTool/dist/types/callbacks/WeatherCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { WeatherController } from "../controllers/WeatherController";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class WeatherCallbacks {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected weatherController: WeatherController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);
|
||||||
|
getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
}
|
10
Live/CWX_DebugTool/dist/types/callbacks/WishlistCallbacks.d.ts
vendored
Normal file
10
Live/CWX_DebugTool/dist/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 { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
||||||
|
export declare class WishlistCallbacks {
|
||||||
|
protected wishlistController: WishlistController;
|
||||||
|
constructor(wishlistController: WishlistController);
|
||||||
|
addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
9
Live/CWX_DebugTool/dist/types/context/ApplicationContext.d.ts
vendored
Normal file
9
Live/CWX_DebugTool/dist/types/context/ApplicationContext.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { ContextVariable } from "./ContextVariable";
|
||||||
|
import { ContextVariableType } from "./ContextVariableType";
|
||||||
|
export declare class ApplicationContext {
|
||||||
|
private variables;
|
||||||
|
private static holderMaxSize;
|
||||||
|
getLatestValue(type: ContextVariableType): ContextVariable;
|
||||||
|
getValues(type: ContextVariableType): ContextVariable[];
|
||||||
|
addValue(type: ContextVariableType, value: any): void;
|
||||||
|
}
|
10
Live/CWX_DebugTool/dist/types/context/ContextVariable.d.ts
vendored
Normal file
10
Live/CWX_DebugTool/dist/types/context/ContextVariable.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { ContextVariableType } from "./ContextVariableType";
|
||||||
|
export declare class ContextVariable {
|
||||||
|
private value;
|
||||||
|
private timestamp;
|
||||||
|
private type;
|
||||||
|
constructor(value: any, type: ContextVariableType);
|
||||||
|
getValue(): any;
|
||||||
|
getTimestamp(): Date;
|
||||||
|
getType(): ContextVariableType;
|
||||||
|
}
|
4
Live/CWX_DebugTool/dist/types/context/ContextVariableType.d.ts
vendored
Normal file
4
Live/CWX_DebugTool/dist/types/context/ContextVariableType.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare enum ContextVariableType {
|
||||||
|
SESSION_ID = 0,
|
||||||
|
MATCH_INFO = 1
|
||||||
|
}
|
35
Live/CWX_DebugTool/dist/types/controllers/BotController.d.ts
vendored
Normal file
35
Live/CWX_DebugTool/dist/types/controllers/BotController.d.ts
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import { BotGenerator } from "../generators/BotGenerator";
|
||||||
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||||
|
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
||||||
|
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
export declare class BotController {
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected botGenerator: BotGenerator;
|
||||||
|
protected botHelper: BotHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Return the number of bot loadout varieties to be generated
|
||||||
|
* @param type bot Type we want the loadout gen count for
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getBotPresetGenerationLimit(type: string): number;
|
||||||
|
getBotCoreDifficulty(): IBotCore;
|
||||||
|
/**
|
||||||
|
* Get bot difficulty settings
|
||||||
|
* adjust PMC settings to ensure they engage the correct bot types
|
||||||
|
* @param type what bot the server is requesting settings for
|
||||||
|
* @param difficulty difficulty level server requested settings for
|
||||||
|
* @returns Difficulty object
|
||||||
|
*/
|
||||||
|
getBotDifficulty(type: string, difficulty: string): Difficulty;
|
||||||
|
protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty;
|
||||||
|
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||||
|
getBotCap(): number;
|
||||||
|
}
|
22
Live/CWX_DebugTool/dist/types/controllers/CustomizationController.d.ts
vendored
Normal file
22
Live/CWX_DebugTool/dist/types/controllers/CustomizationController.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { ISuit } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||||
|
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
export declare class CustomizationController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected profileHelper: 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;
|
||||||
|
protected getAllTraderSuits(sessionID: string): ISuit[];
|
||||||
|
}
|
25
Live/CWX_DebugTool/dist/types/controllers/DialogueController.d.ts
vendored
Normal file
25
Live/CWX_DebugTool/dist/types/controllers/DialogueController.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
|
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
||||||
|
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
||||||
|
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
||||||
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
export declare class DialogueController {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected dialogueHelper: 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;
|
||||||
|
protected messagesHaveUncollectedRewards(messages: Message[]): boolean;
|
||||||
|
protected removeExpiredItems(sessionID: string): void;
|
||||||
|
update(): void;
|
||||||
|
}
|
29
Live/CWX_DebugTool/dist/types/controllers/GameController.d.ts
vendored
Normal file
29
Live/CWX_DebugTool/dist/types/controllers/GameController.d.ts
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
|
import { Watermark } from "../utils/Watermark";
|
||||||
|
export declare class GameController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected watermark: Watermark;
|
||||||
|
protected httpServerHelper: HttpServerHelper;
|
||||||
|
protected localeService: LocaleService;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected profileFixerService: ProfileFixerService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected httpConfig: IHttpConfig;
|
||||||
|
protected coreConfig: ICoreConfig;
|
||||||
|
constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, localeService: LocaleService, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void;
|
||||||
|
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
||||||
|
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||||
|
getServer(): any[];
|
||||||
|
getValidGameVersion(): any;
|
||||||
|
}
|
8
Live/CWX_DebugTool/dist/types/controllers/HandbookController.d.ts
vendored
Normal file
8
Live/CWX_DebugTool/dist/types/controllers/HandbookController.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
export declare class HandbookController {
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected handbookHelper: HandbookHelper;
|
||||||
|
constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper);
|
||||||
|
load(): void;
|
||||||
|
}
|
46
Live/CWX_DebugTool/dist/types/controllers/HealthController.d.ts
vendored
Normal file
46
Live/CWX_DebugTool/dist/types/controllers/HealthController.d.ts
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
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 {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected paymentService: PaymentService;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected healthHelper: HealthHelper;
|
||||||
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
||||||
|
/**
|
||||||
|
* stores in-raid player health
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param info Request data
|
||||||
|
* @param sessionID
|
||||||
|
* @param addEffects Should effects found be added or removed from profile
|
||||||
|
*/
|
||||||
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
||||||
|
/**
|
||||||
|
* When healing in menu
|
||||||
|
* @param pmcData
|
||||||
|
* @param body
|
||||||
|
* @param sessionID
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Occurs on post-raid healing page
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param info Request data from client
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
104
Live/CWX_DebugTool/dist/types/controllers/HideoutController.d.ts
vendored
Normal file
104
Live/CWX_DebugTool/dist/types/controllers/HideoutController.d.ts
vendored
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
import { ScavCaseRewardGenerator } from "../generators/ScavCaseRewardGenerator";
|
||||||
|
import { HideoutHelper } from "../helpers/HideoutHelper";
|
||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
||||||
|
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||||
|
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||||
|
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||||
|
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||||
|
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
|
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
|
||||||
|
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||||
|
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||||
|
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { PlayerService } from "../services/PlayerService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
export declare class HideoutController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected playerService: PlayerService;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected paymentHelper: PaymentHelper;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected hideoutHelper: HideoutHelper;
|
||||||
|
protected scavCaseRewardGenerator: ScavCaseRewardGenerator;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected static nameBackendCountersCrafting: string;
|
||||||
|
protected hideoutConfig: IHideoutConfig;
|
||||||
|
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, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer, jsonUtil: JsonUtil);
|
||||||
|
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Create item in hideout slot item array, remove item from player inventory
|
||||||
|
* @param pmcData Profile data
|
||||||
|
* @param addItemToHideoutRequest reqeust from client to place item in area slot
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns IItemEventRouterResponse object
|
||||||
|
*/
|
||||||
|
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param pmcData Profile to update
|
||||||
|
* @param removeResourceRequest client request
|
||||||
|
* @param output response to send to client
|
||||||
|
* @param hideoutArea Area fuel is being removed from
|
||||||
|
* @returns IItemEventRouterResponse response
|
||||||
|
*/
|
||||||
|
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
||||||
|
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handles event after clicking 'start' on the scav case hideout page
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param body client request object
|
||||||
|
* @param sessionID session id
|
||||||
|
* @returns item event router response
|
||||||
|
*/
|
||||||
|
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Add generated scav case rewards to player profile
|
||||||
|
* @param pmcData player profile to add rewards to
|
||||||
|
* @param rewards reward items to add to profile
|
||||||
|
*/
|
||||||
|
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[]): void;
|
||||||
|
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
||||||
|
* @param sessionID
|
||||||
|
* @param pmcData
|
||||||
|
* @param body
|
||||||
|
* @param output
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
update(): void;
|
||||||
|
}
|
47
Live/CWX_DebugTool/dist/types/controllers/InraidController.d.ts
vendored
Normal file
47
Live/CWX_DebugTool/dist/types/controllers/InraidController.d.ts
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||||
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
|
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class InraidController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected questHelper: QuestHelper;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
|
protected healthHelper: HealthHelper;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
|
protected insuranceService: InsuranceService;
|
||||||
|
protected inRaidHelper: InRaidHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected inraidConfig: IInRaidConfig;
|
||||||
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
|
||||||
|
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
||||||
|
saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Mark inventory items as FiR if player survived raid, otherwise remove FiR from them
|
||||||
|
* @param offraidData Save Progress Request
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param isPlayerScav Was the player a pScav
|
||||||
|
*/
|
||||||
|
protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void;
|
||||||
|
protected handlePostRaidPlayerScavProcess(scavData: IPmcData, sessionID: string, offraidData: ISaveProgressRequestData, pmcData: IPmcData, isDead: boolean): void;
|
||||||
|
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData, sessionID: string): void;
|
||||||
|
}
|
44
Live/CWX_DebugTool/dist/types/controllers/InsuranceController.d.ts
vendored
Normal file
44
Live/CWX_DebugTool/dist/types/controllers/InsuranceController.d.ts
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
|
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
||||||
|
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class InsuranceController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected paymentService: PaymentService;
|
||||||
|
protected insuranceService: InsuranceService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
|
constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required
|
||||||
|
insuranceService: InsuranceService, configServer: ConfigServer);
|
||||||
|
processReturn(): void;
|
||||||
|
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Calculate insurance cost
|
||||||
|
* @param info request object
|
||||||
|
* @param sessionID session id
|
||||||
|
* @returns response object to send to client
|
||||||
|
*/
|
||||||
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
|
}
|
121
Live/CWX_DebugTool/dist/types/controllers/InventoryController.d.ts
vendored
Normal file
121
Live/CWX_DebugTool/dist/types/controllers/InventoryController.d.ts
vendored
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
|
import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData";
|
||||||
|
import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData";
|
||||||
|
import { IInventoryEditMarkerRequestData } from "../models/eft/inventory/IInventoryEditMarkerRequestData";
|
||||||
|
import { IInventoryExamineRequestData } from "../models/eft/inventory/IInventoryExamineRequestData";
|
||||||
|
import { IInventoryFoldRequestData } from "../models/eft/inventory/IInventoryFoldRequestData";
|
||||||
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryReadEncyclopediaRequestData } from "../models/eft/inventory/IInventoryReadEncyclopediaRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
|
import { IInventorySortRequestData } from "../models/eft/inventory/IInventorySortRequestData";
|
||||||
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
|
import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwapRequestData";
|
||||||
|
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
||||||
|
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||||
|
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { FenceService } from "../services/FenceService";
|
||||||
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
export declare class InventoryController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected fenceService: FenceService;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected paymentHelper: PaymentHelper;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, 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: IAddItemRequestData, 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 an item
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param body request object
|
||||||
|
* @param sessionID session id
|
||||||
|
* @returns response
|
||||||
|
*/
|
||||||
|
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get the tplid of an item from the examine request object
|
||||||
|
* @param body response request
|
||||||
|
* @returns tplid
|
||||||
|
*/
|
||||||
|
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||||
|
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handles sorting of Inventory.
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
}
|
28
Live/CWX_DebugTool/dist/types/controllers/LauncherController.d.ts
vendored
Normal file
28
Live/CWX_DebugTool/dist/types/controllers/LauncherController.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
|
import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
|
||||||
|
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
|
||||||
|
import { IRegisterData } from "../models/eft/launcher/IRegisterData";
|
||||||
|
import { Info } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
export declare class LauncherController {
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected httpServerHelper: HttpServerHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected coreConfig: ICoreConfig;
|
||||||
|
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;
|
||||||
|
protected createAccount(info: IRegisterData): string;
|
||||||
|
changeUsername(info: IChangeRequestData): string;
|
||||||
|
changePassword(info: IChangeRequestData): string;
|
||||||
|
wipe(info: IRegisterData): string;
|
||||||
|
getCompatibleTarkovVersion(): string;
|
||||||
|
}
|
18
Live/CWX_DebugTool/dist/types/controllers/LocationController.d.ts
vendored
Normal file
18
Live/CWX_DebugTool/dist/types/controllers/LocationController.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { LocationGenerator } from "../generators/LocationGenerator";
|
||||||
|
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
||||||
|
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class LocationController {
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected locationGenerator: LocationGenerator;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil);
|
||||||
|
get(location: string): ILocationBase;
|
||||||
|
generate(name: string): ILocationBase;
|
||||||
|
generateAll(): ILocationsGenerateAllResponse;
|
||||||
|
}
|
42
Live/CWX_DebugTool/dist/types/controllers/MatchController.d.ts
vendored
Normal file
42
Live/CWX_DebugTool/dist/types/controllers/MatchController.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import { ApplicationContext } from "../context/ApplicationContext";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
||||||
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
|
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||||
|
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||||
|
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
|
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||||
|
import { MatchLocationService } from "../services/MatchLocationService";
|
||||||
|
import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
|
||||||
|
export declare class MatchController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected matchLocationService: MatchLocationService;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
|
protected botLootCacheService: BotLootCacheService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
|
protected applicationContext: ApplicationContext;
|
||||||
|
protected matchConfig: IMatchConfig;
|
||||||
|
protected inraidConfig: IInRaidConfig;
|
||||||
|
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext);
|
||||||
|
getEnabled(): boolean;
|
||||||
|
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||||
|
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||||
|
deleteGroup(info: any): void;
|
||||||
|
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||||
|
protected getMatch(location: string): any;
|
||||||
|
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
||||||
|
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void;
|
||||||
|
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||||
|
}
|
11
Live/CWX_DebugTool/dist/types/controllers/NoteController.d.ts
vendored
Normal file
11
Live/CWX_DebugTool/dist/types/controllers/NoteController.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
export declare class NoteController {
|
||||||
|
protected itemEventRouter: 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;
|
||||||
|
}
|
22
Live/CWX_DebugTool/dist/types/controllers/NotifierController.d.ts
vendored
Normal file
22
Live/CWX_DebugTool/dist/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 {
|
||||||
|
protected notifierHelper: NotifierHelper;
|
||||||
|
protected httpServerHelper: HttpServerHelper;
|
||||||
|
protected notificationService: NotificationService;
|
||||||
|
protected pollInterval: number;
|
||||||
|
protected timeout: number;
|
||||||
|
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
Live/CWX_DebugTool/dist/types/controllers/PresetBuildController.d.ts
vendored
Normal file
18
Live/CWX_DebugTool/dist/types/controllers/PresetBuildController.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
||||||
|
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
export declare class PresetBuildController {
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected saveServer: 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
Live/CWX_DebugTool/dist/types/controllers/PresetController.d.ts
vendored
Normal file
8
Live/CWX_DebugTool/dist/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 {
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer);
|
||||||
|
initialize(): void;
|
||||||
|
}
|
44
Live/CWX_DebugTool/dist/types/controllers/ProfileController.d.ts
vendored
Normal file
44
Live/CWX_DebugTool/dist/types/controllers/ProfileController.d.ts
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
|
||||||
|
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
|
||||||
|
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
|
||||||
|
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
|
||||||
|
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
|
||||||
|
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
|
||||||
|
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class ProfileController {
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected profileFixerService: ProfileFixerService;
|
||||||
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, profileHelper: ProfileHelper);
|
||||||
|
getMiniProfiles(): IMiniProfile[];
|
||||||
|
getMiniProfile(sessionID: string): any;
|
||||||
|
getCompleteProfile(sessionID: string): IPmcData[];
|
||||||
|
createProfile(info: IProfileCreateRequestData, sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Generate a player scav object
|
||||||
|
* pmc profile MUST exist first before pscav can be generated
|
||||||
|
* @param sessionID
|
||||||
|
* @returns IPmcData object
|
||||||
|
*/
|
||||||
|
generatePlayerScav(sessionID: string): IPmcData;
|
||||||
|
validateNickname(info: IValidateNicknameRequestData, sessionID: string): string;
|
||||||
|
changeNickname(info: IProfileChangeNicknameRequestData, sessionID: string): string;
|
||||||
|
changeVoice(info: IProfileChangeVoiceRequestData, sessionID: string): void;
|
||||||
|
getFriends(info: ISearchFriendRequestData, sessionID: string): ISearchFriendResponse[];
|
||||||
|
}
|
76
Live/CWX_DebugTool/dist/types/controllers/QuestController.d.ts
vendored
Normal file
76
Live/CWX_DebugTool/dist/types/controllers/QuestController.d.ts
vendored
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
||||||
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
|
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||||
|
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
|
||||||
|
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
import { PlayerService } from "../services/PlayerService";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class QuestController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected questHelper: QuestHelper;
|
||||||
|
protected questConditionHelper: QuestConditionHelper;
|
||||||
|
protected playerService: PlayerService;
|
||||||
|
protected localeService: LocaleService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected questConfig: IQuestConfig;
|
||||||
|
constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Get all quests visible to player
|
||||||
|
* Exclude quests with incomplete preconditions (level/loyalty)
|
||||||
|
* @param sessionID session id
|
||||||
|
* @returns array of IQuest
|
||||||
|
*/
|
||||||
|
getClientQuests(sessionID: string): IQuest[];
|
||||||
|
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Remove completed quest from profile
|
||||||
|
* Add newly unlocked quests to profile
|
||||||
|
* Also recalculate thier level due to exp rewards
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param body completed quest request
|
||||||
|
* @param sessionID session id
|
||||||
|
* @returns ItemEvent response
|
||||||
|
*/
|
||||||
|
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Send a popup to player on completion of a quest
|
||||||
|
* @param sessionID session id
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param completedQuestId completed quest id
|
||||||
|
* @param questRewards rewards given to player
|
||||||
|
*/
|
||||||
|
protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void;
|
||||||
|
/**
|
||||||
|
* Returns a list of quests that should be failed when a quest is completed
|
||||||
|
* @param completedQuestId quest completed id
|
||||||
|
* @returns array of quests
|
||||||
|
*/
|
||||||
|
protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[];
|
||||||
|
/**
|
||||||
|
* Fail the quests provided
|
||||||
|
* @param sessionID session id
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param questsToFail quests to fail
|
||||||
|
*/
|
||||||
|
protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void;
|
||||||
|
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
72
Live/CWX_DebugTool/dist/types/controllers/RagfairController.d.ts
vendored
Normal file
72
Live/CWX_DebugTool/dist/types/controllers/RagfairController.d.ts
vendored
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator";
|
||||||
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { RagfairHelper } from "../helpers/RagfairHelper";
|
||||||
|
import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper";
|
||||||
|
import { RagfairSellHelper } from "../helpers/RagfairSellHelper";
|
||||||
|
import { RagfairSortHelper } from "../helpers/RagfairSortHelper";
|
||||||
|
import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { IAddOfferRequestData, Requirement } from "../models/eft/ragfair/IAddOfferRequestData";
|
||||||
|
import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData";
|
||||||
|
import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
|
||||||
|
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
|
||||||
|
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
||||||
|
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
|
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||||
|
import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class RagfairController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected ragfairServer: RagfairServer;
|
||||||
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected ragfairSellHelper: RagfairSellHelper;
|
||||||
|
protected ragfairTaxHelper: RagfairTaxHelper;
|
||||||
|
protected ragfairSortHelper: RagfairSortHelper;
|
||||||
|
protected ragfairOfferHelper: RagfairOfferHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected paymentService: PaymentService;
|
||||||
|
protected handbookHelper: HandbookHelper;
|
||||||
|
protected paymentHelper: PaymentHelper;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected ragfairHelper: RagfairHelper;
|
||||||
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
|
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
||||||
|
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected ragfairConfig: IRagfairConfig;
|
||||||
|
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer);
|
||||||
|
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
|
||||||
|
protected isLinkedSearch(info: ISearchRequestData): boolean;
|
||||||
|
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
||||||
|
update(): void;
|
||||||
|
getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||||
|
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
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;
|
||||||
|
}
|
41
Live/CWX_DebugTool/dist/types/controllers/RepairController.d.ts
vendored
Normal file
41
Live/CWX_DebugTool/dist/types/controllers/RepairController.d.ts
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
|
import { RepairHelper } from "../helpers/RepairHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
|
||||||
|
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
|
import { IRepairConfig } from "../models/spt/config/IRepairConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
export declare class RepairController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected questHelper: QuestHelper;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
|
protected paymentService: PaymentService;
|
||||||
|
protected repairHelper: RepairHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected repairConfig: IRepairConfig;
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
220
Live/CWX_DebugTool/dist/types/controllers/RepeatableQuestController.d.ts
vendored
Normal file
220
Live/CWX_DebugTool/dist/types/controllers/RepeatableQuestController.d.ts
vendored
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { Exit } from "../models/eft/common/ILocationBase";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { TraderInfo } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPmcDataRepeatableQuest, IRepeatableQuest, IReward, IRewards } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
||||||
|
import { ELocationName } from "../models/enums/ELocationName";
|
||||||
|
import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
|
import { ProbabilityObject, ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
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 {
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected mathUtil: MathUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected profileFixerService: ProfileFixerService;
|
||||||
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected paymentService: PaymentService;
|
||||||
|
protected objectId: ObjectId;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected questConfig: IQuestConfig;
|
||||||
|
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint
|
||||||
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
|
* 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
Live/CWX_DebugTool/dist/types/controllers/TradeController.d.ts
vendored
Normal file
21
Live/CWX_DebugTool/dist/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 {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected tradeHelper: TradeHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected ragfairServer: 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 };
|
41
Live/CWX_DebugTool/dist/types/controllers/TraderController.d.ts
vendored
Normal file
41
Live/CWX_DebugTool/dist/types/controllers/TraderController.d.ts
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
|
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { TraderAssortService } from "../services/TraderAssortService";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class TraderController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected traderAssortHelper: TraderAssortHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected traderAssortService: TraderAssortService;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil);
|
||||||
|
/**
|
||||||
|
* Runs when onLoad event is fired
|
||||||
|
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService
|
||||||
|
* Store timestamp of next assort refresh in nextResupply property of traders .base object
|
||||||
|
*/
|
||||||
|
load(): void;
|
||||||
|
/**
|
||||||
|
* Runs when onUpdate is fired
|
||||||
|
* If current time is > nextResupply(expire) time of trader, refresh traders assorts and
|
||||||
|
* @returns has run
|
||||||
|
*/
|
||||||
|
update(): boolean;
|
||||||
|
/**
|
||||||
|
* Return an array of all traders
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns array if ITraderBase objects
|
||||||
|
*/
|
||||||
|
getAllTraders(sessionID: string): ITraderBase[];
|
||||||
|
getTrader(sessionID: string, traderID: string): ITraderBase;
|
||||||
|
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
||||||
|
getPurchasesData(sessionID: string, traderID: string): Record<string, IBarterScheme[][]>;
|
||||||
|
}
|
11
Live/CWX_DebugTool/dist/types/controllers/WeatherController.d.ts
vendored
Normal file
11
Live/CWX_DebugTool/dist/types/controllers/WeatherController.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
||||||
|
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||||
|
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
export declare class WeatherController {
|
||||||
|
protected weatherGenerator: WeatherGenerator;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected weatherConfig: IWeatherConfig;
|
||||||
|
constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer);
|
||||||
|
generate(): IWeatherData;
|
||||||
|
}
|
10
Live/CWX_DebugTool/dist/types/controllers/WishlistController.d.ts
vendored
Normal file
10
Live/CWX_DebugTool/dist/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 {
|
||||||
|
protected itemEvenRouter: ItemEventRouter;
|
||||||
|
constructor(itemEvenRouter: ItemEventRouter);
|
||||||
|
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
}
|
14
Live/CWX_DebugTool/dist/types/di/Container.d.ts
vendored
Normal file
14
Live/CWX_DebugTool/dist/types/di/Container.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
export declare class Container {
|
||||||
|
static registerTypes(depContainer: DependencyContainer): void;
|
||||||
|
static registerListTypes(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
Live/CWX_DebugTool/dist/types/di/OnLoad.d.ts
vendored
Normal file
4
Live/CWX_DebugTool/dist/types/di/OnLoad.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare class OnLoad {
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
7
Live/CWX_DebugTool/dist/types/di/OnLoadOnUpdate.d.ts
vendored
Normal file
7
Live/CWX_DebugTool/dist/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
Live/CWX_DebugTool/dist/types/di/OnUpdate.d.ts
vendored
Normal file
4
Live/CWX_DebugTool/dist/types/di/OnUpdate.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare class OnUpdate {
|
||||||
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
40
Live/CWX_DebugTool/dist/types/di/Router.d.ts
vendored
Normal file
40
Live/CWX_DebugTool/dist/types/di/Router.d.ts
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
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;
|
||||||
|
getTopLevelRoute(): string;
|
||||||
|
protected getHandledRoutes(): HandledRoute[];
|
||||||
|
private getInternalHandledRoutes;
|
||||||
|
canHandle(url: string, partialMatch?: boolean): boolean;
|
||||||
|
}
|
||||||
|
export declare class StaticRouter extends Router {
|
||||||
|
private routes;
|
||||||
|
constructor(routes: RouteAction[]);
|
||||||
|
handleStatic(url: string, info: any, sessionID: string, output: string): any;
|
||||||
|
getHandledRoutes(): HandledRoute[];
|
||||||
|
}
|
||||||
|
export declare class DynamicRouter extends Router {
|
||||||
|
private routes;
|
||||||
|
constructor(routes: RouteAction[]);
|
||||||
|
handleDynamic(url: string, info: any, sessionID: string, output: string): any;
|
||||||
|
getHandledRoutes(): HandledRoute[];
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
export declare class RouteAction {
|
||||||
|
url: string;
|
||||||
|
action: (url: string, info: any, sessionID: string, output: string) => any;
|
||||||
|
constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any);
|
||||||
|
}
|
5
Live/CWX_DebugTool/dist/types/di/Serializer.d.ts
vendored
Normal file
5
Live/CWX_DebugTool/dist/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;
|
||||||
|
}
|
96
Live/CWX_DebugTool/dist/types/generators/BotGenerator.d.ts
vendored
Normal file
96
Live/CWX_DebugTool/dist/types/generators/BotGenerator.d.ts
vendored
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||||
|
import { Health as PmcHealth, IBotBase, Skills } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { Health, IBotType, Inventory } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotInventoryGenerator } from "./BotInventoryGenerator";
|
||||||
|
declare namespace BotGenerator {
|
||||||
|
interface IRandomisedBotLevelResult {
|
||||||
|
level: number;
|
||||||
|
exp: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export declare class BotGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected botInventoryGenerator: BotInventoryGenerator;
|
||||||
|
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||||
|
protected botHelper: BotHelper;
|
||||||
|
protected gameEventHelper: GameEventHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botEquipmentFilterService: BotEquipmentFilterService, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Generate a player scav bot object
|
||||||
|
* @param role e.g. assault / pmcbot
|
||||||
|
* @param difficulty easy/normal/hard/impossible
|
||||||
|
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
generatePlayerScav(role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
||||||
|
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||||
|
/**
|
||||||
|
* Choose if a bot should become a PMC by checking if bot type is allowed to become a Pmc in botConfig.convertFromChances and doing a random int check
|
||||||
|
* @param botRole the bot role to check if should be a pmc
|
||||||
|
* @returns true if should be a pmc
|
||||||
|
*/
|
||||||
|
protected shouldBotBePmc(botRole: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get a randomised PMC side based on bot config value 'isUsec'
|
||||||
|
* @returns pmc side as string
|
||||||
|
*/
|
||||||
|
protected getRandomisedPmcSide(): string;
|
||||||
|
/**
|
||||||
|
* Get a clone of the database\bots\base.json file
|
||||||
|
* @returns IBotBase object
|
||||||
|
*/
|
||||||
|
protected getCloneOfBotBase(): IBotBase;
|
||||||
|
protected generateBot(bot: IBotBase, role: string, node: IBotType, isPmc: boolean, isPlayerScav?: boolean): IBotBase;
|
||||||
|
/**
|
||||||
|
* Log the number of PMCs generated to the debug console
|
||||||
|
*/
|
||||||
|
protected logPmcGeneratedCount(output: IBotBase[]): void;
|
||||||
|
protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult;
|
||||||
|
/**
|
||||||
|
* Converts health object to the required format
|
||||||
|
* @param healthObj health object from bot json
|
||||||
|
* @param playerScav Is a pscav bot being generated
|
||||||
|
* @returns PmcHealth object
|
||||||
|
*/
|
||||||
|
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
||||||
|
protected generateSkills(skillsObj: Skills): Skills;
|
||||||
|
/**
|
||||||
|
* Convert from pmc side (usec/bear) to the side as defined in the bot config (usecType/bearType)
|
||||||
|
* @param pmcSide eft side (usec/bear)
|
||||||
|
* @returns pmc side as defined in config
|
||||||
|
*/
|
||||||
|
protected getPmcRole(pmcSide: string): string;
|
||||||
|
/**
|
||||||
|
* Iterate through bots inventory and loot to find and remove christmas items (as defined in GameEventHelper)
|
||||||
|
* @param nodeInventory Bots inventory to iterate over
|
||||||
|
*/
|
||||||
|
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
||||||
|
protected generateId(bot: IBotBase): IBotBase;
|
||||||
|
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||||
|
protected getPMCDifficulty(requestedDifficulty: string): string;
|
||||||
|
/**
|
||||||
|
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
||||||
|
* @param bot bot to add dogtag to
|
||||||
|
* @returns Bot with dogtag added
|
||||||
|
*/
|
||||||
|
protected generateDogtag(bot: IBotBase): IBotBase;
|
||||||
|
}
|
||||||
|
export {};
|
24
Live/CWX_DebugTool/dist/types/generators/BotInventoryGenerator.d.ts
vendored
Normal file
24
Live/CWX_DebugTool/dist/types/generators/BotInventoryGenerator.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { Inventory, Chances, Generation, Mods } 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 {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected botWeaponGenerator: BotWeaponGenerator;
|
||||||
|
protected botLootGenerator: BotLootGenerator;
|
||||||
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
|
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;
|
||||||
|
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void;
|
||||||
|
protected generateInventoryBase(): PmcInventory;
|
||||||
|
}
|
124
Live/CWX_DebugTool/dist/types/generators/BotLootGenerator.d.ts
vendored
Normal file
124
Live/CWX_DebugTool/dist/types/generators/BotLootGenerator.d.ts
vendored
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
||||||
|
export declare class BotLootGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected handbookHelper: HandbookHelper;
|
||||||
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
|
protected botWeaponGenerator: BotWeaponGenerator;
|
||||||
|
protected botLootCacheService: BotLootCacheService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botLootCacheService: BotLootCacheService, configServer: ConfigServer);
|
||||||
|
generateLoot(templateInventory: Inventory, itemCounts: ItemMinMax, isPmc: boolean, botRole: string, botInventory: PmcInventory, equipmentChances: Chances): void;
|
||||||
|
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
||||||
|
/**
|
||||||
|
* Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached
|
||||||
|
* @param pool pool of items to pick from
|
||||||
|
* @param equipmentSlots What equality slot will the loot items be added to
|
||||||
|
* @param totalItemCount Max count of items to add
|
||||||
|
* @param inventoryToAddItemsTo bot inventory loot will be added to
|
||||||
|
* @param botRole role of the bot loot is being generated for (assault/pmcbot)
|
||||||
|
* @param useLimits should item limit counts be used as defined in config/bot.json
|
||||||
|
* @param totalValueLimitRub total value of loot allowed in roubles
|
||||||
|
* @param isPmc is the bot being generated for a pmc
|
||||||
|
*/
|
||||||
|
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, useLimits?: boolean, totalValueLimitRub?: number, isPmc?: boolean): void;
|
||||||
|
/**
|
||||||
|
* Add generated weapons to inventory as loot
|
||||||
|
* @param botInventory inventory to add preset to
|
||||||
|
* @param equipmentSlot slot to place the preset in (backpack)
|
||||||
|
* @param templateInventory bots template, assault.json
|
||||||
|
* @param modChances chances for mods to spawn on weapon
|
||||||
|
* @param botRole bots role, .e.g. pmcBot
|
||||||
|
* @param isPmc are we generating for a pmc
|
||||||
|
*/
|
||||||
|
protected addLooseWeaponsToInventorySlot(botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean): void;
|
||||||
|
/**
|
||||||
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
|
* @param pool pool of items to pick an item from
|
||||||
|
* @param isPmc is the bot being created a pmc
|
||||||
|
* @returns ITemplateItem object
|
||||||
|
*/
|
||||||
|
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* Get the loot nvalue from botconfig
|
||||||
|
* @param isPmc if true the pmc nvalue is returned
|
||||||
|
* @returns nvalue as number
|
||||||
|
*/
|
||||||
|
protected getBotLootNValue(isPmc: boolean): number;
|
||||||
|
/**
|
||||||
|
* Update item limit array to contain items that have a limit
|
||||||
|
* All values are set to 0
|
||||||
|
* @param isPmc is the bot a pmc
|
||||||
|
* @param botRole role the bot has
|
||||||
|
* @param limitCount
|
||||||
|
*/
|
||||||
|
protected initItemLimitArray(isPmc: boolean, botRole: string, limitCount: Record<string, number>): void;
|
||||||
|
/**
|
||||||
|
* Check if an item has reached its bot-specific spawn limit
|
||||||
|
* @param itemTemplate Item we check to see if its reached spawn limit
|
||||||
|
* @param botRole Bot type
|
||||||
|
* @param isPmc Is bot we're working with a pmc
|
||||||
|
* @param limitCount spawn limits for items on bot
|
||||||
|
* @param itemSpawnLimits the limits this bot is allowed to have
|
||||||
|
* @returns true if item has reached spawn limit
|
||||||
|
*/
|
||||||
|
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||||
|
/**
|
||||||
|
* Is the item an ammo box
|
||||||
|
* @param props props of the item to check
|
||||||
|
* @returns true if item is an ammo box
|
||||||
|
*/
|
||||||
|
protected isAmmoBox(props: Props): boolean;
|
||||||
|
/**
|
||||||
|
* Create an object that contains the ammo stack for an ammo box
|
||||||
|
* @param parentId ammo box id
|
||||||
|
* @param props ammo box props
|
||||||
|
* @returns Item object
|
||||||
|
*/
|
||||||
|
protected createAmmoForAmmoBox(parentId: string, props: Props): Item;
|
||||||
|
/**
|
||||||
|
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||||
|
* @param isPmc is this a PMC
|
||||||
|
* @param itemTemplate item details
|
||||||
|
* @param moneyItem Money stack to randomise
|
||||||
|
*/
|
||||||
|
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||||
|
/**
|
||||||
|
* Randomise the size of an ammo stack
|
||||||
|
* @param isPmc is this a PMC
|
||||||
|
* @param itemTemplate item details
|
||||||
|
* @param ammoItem Ammo stack to randomise
|
||||||
|
*/
|
||||||
|
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
||||||
|
/**
|
||||||
|
* Get spawn limits for a specific bot type from bot.json config
|
||||||
|
* If no limit found for a non pmc bot, fall back to defaults
|
||||||
|
* @param isPmc is the bot we want limits for a pmc
|
||||||
|
* @param botRole what role does the bot have
|
||||||
|
* @returns dictionary of tplIds and limit
|
||||||
|
*/
|
||||||
|
protected getItemSpawnLimitsForBotType(isPmc: boolean, botRole: string): Record<string, number>;
|
||||||
|
/**
|
||||||
|
* Get the parentId or tplId of item inside spawnLimits object if it exists
|
||||||
|
* @param itemTemplate item we want to look for in spawn limits
|
||||||
|
* @param spawnLimits Limits to check for item
|
||||||
|
* @returns id as string, otherwise undefined
|
||||||
|
*/
|
||||||
|
protected getMatchingIdFromSpawnLimits(itemTemplate: ITemplateItem, spawnLimits: Record<string, number>): string;
|
||||||
|
}
|
173
Live/CWX_DebugTool/dist/types/generators/BotWeaponGenerator.d.ts
vendored
Normal file
173
Live/CWX_DebugTool/dist/types/generators/BotWeaponGenerator.d.ts
vendored
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
|
import { MinMax } from "../models/common/MinMax";
|
||||||
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { Inventory, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { GenerateWeaponResult } from "../models/spt/bots/GenerateWeaponResult";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
export declare class BotWeaponGenerator {
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected readonly modMagazineSlotId = "mod_magazine";
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Get a random weapon from a bots pool of weapons (weighted)
|
||||||
|
* @param equipmentSlot Primary/secondary/holster
|
||||||
|
* @param botTemplateInventory e.g. assault.json
|
||||||
|
* @returns weapon tpl
|
||||||
|
*/
|
||||||
|
pickWeightedWeaponTplFromPool(equipmentSlot: string, botTemplateInventory: Inventory): string;
|
||||||
|
/**
|
||||||
|
* Generated a weapon based on the supplied weapon tpl
|
||||||
|
* @param weaponTpl weapon tpl to generate (use pickWeightedWeaponTplFromPool())
|
||||||
|
* @param equipmentSlot slot to fit into, primary/secondary/holster
|
||||||
|
* @param botTemplateInventory e.g. assault.json
|
||||||
|
* @param weaponParentId
|
||||||
|
* @param modChances
|
||||||
|
* @param botRole
|
||||||
|
* @param isPmc
|
||||||
|
* @returns GenerateWeaponResult object
|
||||||
|
*/
|
||||||
|
generateWeaponByTpl(weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean): GenerateWeaponResult;
|
||||||
|
/**
|
||||||
|
* Generate an entirely random weapon
|
||||||
|
* @param equipmentSlot Primary/secondary/holster
|
||||||
|
* @param botTemplateInventory e.g. assault.json
|
||||||
|
* @param weaponParentId
|
||||||
|
* @param modChances
|
||||||
|
* @param botRole
|
||||||
|
* @param isPmc
|
||||||
|
* @returns GenerateWeaponResult object
|
||||||
|
*/
|
||||||
|
generateRandomWeapon(equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean): GenerateWeaponResult;
|
||||||
|
/**
|
||||||
|
* Create array with weapon base as only element
|
||||||
|
* Add additional properties as required
|
||||||
|
* @param weaponTpl
|
||||||
|
* @param weaponParentId
|
||||||
|
* @param equipmentSlot
|
||||||
|
* @param weaponItemTemplate
|
||||||
|
* @param botRole for durability values
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
constructWeaponBaseArray(weaponTpl: string, weaponParentId: string, equipmentSlot: string, weaponItemTemplate: ITemplateItem, botRole: string): Item[];
|
||||||
|
/**
|
||||||
|
* Add compatible magazines to an inventory based on a generated weapon
|
||||||
|
* @param weaponDetails
|
||||||
|
* @param magCounts
|
||||||
|
* @param inventory
|
||||||
|
* @param botRole the bot type we're getting generating extra mags for
|
||||||
|
*/
|
||||||
|
addExtraMagazinesToInventory(weaponDetails: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void;
|
||||||
|
/**
|
||||||
|
* Get the mods necessary to kit out a weapon to its preset level
|
||||||
|
* @param weaponTpl weapon to find preset for
|
||||||
|
* @param equipmentSlot the slot the weapon will be placed in
|
||||||
|
* @param weaponParentId Value used for the parentid
|
||||||
|
* @returns array of weapon mods
|
||||||
|
*/
|
||||||
|
protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[];
|
||||||
|
/** Checks if all required slots are occupied on a weapon and all it's mods */
|
||||||
|
protected isWeaponValid(weaponItemArray: Item[]): boolean;
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
* @param inventory
|
||||||
|
* @param botRole the bot type we're getting generating extra mags for
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory, botRole: string): void;
|
||||||
|
/**
|
||||||
|
* Get a randomised number of bullets for a specific magazine
|
||||||
|
* @param magCounts min and max count of magazines
|
||||||
|
* @param magTemplate magazine to generate bullet count for
|
||||||
|
* @returns bullet count number
|
||||||
|
*/
|
||||||
|
protected getRandomisedBulletCount(magCounts: MinMax, magTemplate: ITemplateItem): number;
|
||||||
|
/**
|
||||||
|
* Get a randomised count of magazines
|
||||||
|
* @param magCounts min and max value returned value can be between
|
||||||
|
* @returns numberical value of magazine count
|
||||||
|
*/
|
||||||
|
protected getRandomisedMagazineCount(magCounts: MinMax): number;
|
||||||
|
/**
|
||||||
|
* Add ammo to the secure container
|
||||||
|
* @param stackCount How many stacks of ammo to add
|
||||||
|
* @param ammoTpl Ammo type to add
|
||||||
|
* @param stackSize Size of the ammo stack to add
|
||||||
|
* @param inventory Player inventory
|
||||||
|
*/
|
||||||
|
protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void;
|
||||||
|
/**
|
||||||
|
* Get a weapons magazine tpl from a weapon template
|
||||||
|
* @param weaponMods mods from a weapon template
|
||||||
|
* @param weaponTemplate Weapon to get magazine tpl for
|
||||||
|
* @param botRole the bot type we are getting the magazine for
|
||||||
|
* @returns magazine tpl string
|
||||||
|
*/
|
||||||
|
protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem, botRole: string): string;
|
||||||
|
/**
|
||||||
|
* Get a weapons default magazine template id
|
||||||
|
* @param weaponTemplate weapon to get default magazine for
|
||||||
|
* @returns tpl of magazine
|
||||||
|
*/
|
||||||
|
protected getWeaponsDefaultMagazineTpl(weaponTemplate: ITemplateItem): string;
|
||||||
|
protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void;
|
||||||
|
/**
|
||||||
|
* Finds and return a compatible ammo tpl based on the bots ammo weightings (x.json/inventory/equipment/ammo)
|
||||||
|
* @param ammo a list of ammo tpls the weapon can use
|
||||||
|
* @param weaponTemplate the weapon we want to pick ammo for
|
||||||
|
* @param isPmc is the ammo being gathered for a pmc (runs pmc ammo filtering)
|
||||||
|
* @returns an ammo tpl that works with the desired gun
|
||||||
|
*/
|
||||||
|
protected getCompatibleAmmo(ammo: Record<string, Record<string, number>>, weaponTemplate: ITemplateItem, isPmc: boolean): string;
|
||||||
|
/**
|
||||||
|
* Get a weapons compatible cartridge caliber
|
||||||
|
* @param weaponTemplate Weapon to look up caliber of
|
||||||
|
* @returns caliber as string
|
||||||
|
*/
|
||||||
|
protected getWeaponCaliber(weaponTemplate: ITemplateItem): string;
|
||||||
|
/**
|
||||||
|
* Fill existing magazines to full, while replacing their contents with specified ammo
|
||||||
|
* @param weaponMods
|
||||||
|
* @param magazine
|
||||||
|
* @param ammoTpl
|
||||||
|
*/
|
||||||
|
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
|
||||||
|
/**
|
||||||
|
* Add cartridge item to weapon Item array, if it already exists, update
|
||||||
|
* @param weaponMods Weapon items array to amend
|
||||||
|
* @param magazine magazine item details we're adding cartridges to
|
||||||
|
* @param chosenAmmo cartridge to put into the magazine
|
||||||
|
* @param newStackSize how many cartridges should go into the magazine
|
||||||
|
*/
|
||||||
|
protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void;
|
||||||
|
/**
|
||||||
|
* Fill each Camora with a bullet
|
||||||
|
* @param weaponMods Weapon mods to find and update camora mod(s) from
|
||||||
|
* @param magazineId magazine id to find and add to
|
||||||
|
* @param ammoTpl ammo template id to hydate with
|
||||||
|
*/
|
||||||
|
protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void;
|
||||||
|
}
|
46
Live/CWX_DebugTool/dist/types/generators/LocationGenerator.d.ts
vendored
Normal file
46
Live/CWX_DebugTool/dist/types/generators/LocationGenerator.d.ts
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import { ContainerHelper } from "../helpers/ContainerHelper";
|
||||||
|
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
|
import { ILooseLoot, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
export interface IContainerItem {
|
||||||
|
items: Item[];
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
}
|
||||||
|
export declare class LocationGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected objectId: ObjectId;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected mathUtil: MathUtil;
|
||||||
|
protected gameEventHelper: GameEventHelper;
|
||||||
|
protected containerHelper: ContainerHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected locationConfig: ILocationConfig;
|
||||||
|
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;
|
||||||
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
|
generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): SpawnpointTemplate[];
|
||||||
|
protected createItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
|
||||||
|
protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string;
|
||||||
|
protected getRandomValidCaliber(magTemplate: ITemplateItem): string;
|
||||||
|
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): string;
|
||||||
|
protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, caliber?: string): Item;
|
||||||
|
protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item;
|
||||||
|
}
|
15
Live/CWX_DebugTool/dist/types/generators/PMCLootGenerator.d.ts
vendored
Normal file
15
Live/CWX_DebugTool/dist/types/generators/PMCLootGenerator.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
export declare class PMCLootGenerator {
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected pocketLootPool: string[];
|
||||||
|
protected backpackLootPool: string[];
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
|
generatePMCPocketLootPool(): string[];
|
||||||
|
generatePMCBackpackLootPool(): string[];
|
||||||
|
}
|
67
Live/CWX_DebugTool/dist/types/generators/PlayerScavGenerator.d.ts
vendored
Normal file
67
Live/CWX_DebugTool/dist/types/generators/PlayerScavGenerator.d.ts
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { Skills, Stats } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { IPlayerScavConfig, KarmaLevel } from "../models/spt/config/IPlayerScavConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||||
|
import { FenceService } from "../services/FenceService";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { BotGenerator } from "./BotGenerator";
|
||||||
|
export declare class PlayerScavGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected botHelper: BotHelper;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected fenceService: FenceService;
|
||||||
|
protected botLootCacheService: BotLootCacheService;
|
||||||
|
protected botGenerator: BotGenerator;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected playerScavConfig: IPlayerScavConfig;
|
||||||
|
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, botGenerator: BotGenerator, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Update a player profile to include a new player scav profile
|
||||||
|
* @param sessionID session id to specify what profile is updated
|
||||||
|
* @returns profile object
|
||||||
|
*/
|
||||||
|
generate(sessionID: string): IPmcData;
|
||||||
|
/**
|
||||||
|
* Get the scav karama level for a profile
|
||||||
|
* Is also the fence trader rep level
|
||||||
|
* @param pmcData pmc profile
|
||||||
|
* @returns karma level
|
||||||
|
*/
|
||||||
|
protected getScavKarmaLevel(pmcData: IPmcData): number;
|
||||||
|
/**
|
||||||
|
* Get a baseBot template
|
||||||
|
* If the parameter doesnt match "assault", take parts from the loot type and apply to the return bot template
|
||||||
|
* @param botTypeForLoot bot type to use for inventory/chances
|
||||||
|
* @returns IBotType object
|
||||||
|
*/
|
||||||
|
protected constructBotBaseTemplate(botTypeForLoot: string): IBotType;
|
||||||
|
/**
|
||||||
|
* Adjust equipment/mod/item generation values based on scav karma levels
|
||||||
|
* @param karmaSettings Values to modify the bot template with
|
||||||
|
* @param baseBotNode bot template to modify according to karama level settings
|
||||||
|
*/
|
||||||
|
protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void;
|
||||||
|
protected getScavSkills(scavProfile: IPmcData): Skills;
|
||||||
|
protected getDefaultScavSkills(): Skills;
|
||||||
|
protected getScavStats(scavProfile: IPmcData): Stats;
|
||||||
|
protected getScavLevel(scavProfile: IPmcData): number;
|
||||||
|
protected getScavExperience(scavProfile: IPmcData): number;
|
||||||
|
/**
|
||||||
|
* Set cooldown till pscav is playable
|
||||||
|
* take into account scav cooldown bonus
|
||||||
|
* @param scavData scav profile
|
||||||
|
* @param pmcData pmc profile
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected setScavCooldownTimer(scavData: IPmcData, pmcData: IPmcData): IPmcData;
|
||||||
|
}
|
25
Live/CWX_DebugTool/dist/types/generators/RagfairAssortGenerator.d.ts
vendored
Normal file
25
Live/CWX_DebugTool/dist/types/generators/RagfairAssortGenerator.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
export declare class RagfairAssortGenerator {
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected generatedAssortItems: Item[];
|
||||||
|
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer);
|
||||||
|
/**
|
||||||
|
* Get an array of unique items that can be sold on the flea
|
||||||
|
* @returns array of unique items
|
||||||
|
*/
|
||||||
|
getAssortItems(): Item[];
|
||||||
|
protected assortsAreGenerated(): boolean;
|
||||||
|
/**
|
||||||
|
* Generate an array of items the flea can sell
|
||||||
|
* @returns array of unique items
|
||||||
|
*/
|
||||||
|
protected generateRagfairAssortItems(): Item[];
|
||||||
|
protected createRagfairAssortItem(tplId: string, id?: string): Item;
|
||||||
|
}
|
92
Live/CWX_DebugTool/dist/types/generators/RagfairOfferGenerator.d.ts
vendored
Normal file
92
Live/CWX_DebugTool/dist/types/generators/RagfairOfferGenerator.d.ts
vendored
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { FenceService } from "../services/FenceService";
|
||||||
|
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
|
||||||
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
|
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { RagfairAssortGenerator } from "./RagfairAssortGenerator";
|
||||||
|
export declare class RagfairOfferGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
||||||
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
|
protected ragfairCategoriesService: RagfairCategoriesService;
|
||||||
|
protected fenceService: FenceService;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected ragfairConfig: IRagfairConfig;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
||||||
|
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||||
|
protected getTraderId(userID: string): string;
|
||||||
|
protected getRating(userID: string): number;
|
||||||
|
/**
|
||||||
|
* Is the offers user rating growing
|
||||||
|
* @param userID user to check rating of
|
||||||
|
* @returns true if its growing
|
||||||
|
*/
|
||||||
|
protected getRatingGrowing(userID: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get number of section until offer should expire
|
||||||
|
* @param userID Id of the offer owner
|
||||||
|
* @param time Time the offer is posted
|
||||||
|
* @returns number of seconds until offer expires
|
||||||
|
*/
|
||||||
|
protected getOfferEndTime(userID: string, time: number): number;
|
||||||
|
/**
|
||||||
|
* Create multiple offers for items by using a unique list of items we've generated previously
|
||||||
|
* @param expiredOffers optional, expired offers to regenerate
|
||||||
|
*/
|
||||||
|
generateDynamicOffers(expiredOffers?: Item[]): void;
|
||||||
|
/**
|
||||||
|
* Generate trader offers on flea using the traders assort data
|
||||||
|
* @param traderID Trader to generate offers for
|
||||||
|
*/
|
||||||
|
generateFleaOffersForTrader(traderID: string): void;
|
||||||
|
protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[];
|
||||||
|
/**
|
||||||
|
* Add missing conditions to an item if needed
|
||||||
|
* Durabiltiy for repairable items
|
||||||
|
* HpResource for medical items
|
||||||
|
* @param item item to add conditions to
|
||||||
|
* @returns Item with conditions added
|
||||||
|
*/
|
||||||
|
protected addMissingCondition(item: Item): Item;
|
||||||
|
protected getOfferRequirements(items: Item[]): {
|
||||||
|
count: number;
|
||||||
|
_tpl: string;
|
||||||
|
}[];
|
||||||
|
/**
|
||||||
|
* Create a flea offer and store it in the Ragfair server offers array
|
||||||
|
* @param userID owner of the offer
|
||||||
|
* @param time time offer is put up
|
||||||
|
* @param items items in the offer
|
||||||
|
* @param barterScheme
|
||||||
|
* @param loyalLevel
|
||||||
|
* @param price price of offer
|
||||||
|
* @param sellInOnePiece
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||||
|
}
|
105
Live/CWX_DebugTool/dist/types/generators/ScavCaseRewardGenerator.d.ts
vendored
Normal file
105
Live/CWX_DebugTool/dist/types/generators/ScavCaseRewardGenerator.d.ts
vendored
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { Product } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||||
|
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||||
|
import { IScavCaseConfig } from "../models/spt/config/IScavCaseConfig";
|
||||||
|
import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "../models/spt/hideout/ScavCaseRewardCountsAndPrices";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
export declare class ScavCaseRewardGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected scavCaseConfig: IScavCaseConfig;
|
||||||
|
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Create an array of rewards that will be given to the player upon completing their scav case build
|
||||||
|
* @param body client request
|
||||||
|
* @returns Product array
|
||||||
|
*/
|
||||||
|
generate(body: IHideoutScavCaseStartRequestData): Product[];
|
||||||
|
/**
|
||||||
|
* Get all db items that are not blacklisted in scavcase config
|
||||||
|
* @returns filtered array of db items
|
||||||
|
*/
|
||||||
|
protected getDbItems(): ITemplateItem[];
|
||||||
|
/**
|
||||||
|
* Check if a template id has a blacklisted parent id
|
||||||
|
* @param tplid template id to check
|
||||||
|
* @returns true if item is blacklisted
|
||||||
|
*/
|
||||||
|
protected itemHasBlacklistedParent(tplid: string): boolean;
|
||||||
|
/**
|
||||||
|
* Pick a number of items to be rewards, the count is defined by the values in
|
||||||
|
* @param items item pool to pick rewards from
|
||||||
|
* @param itemFilters how the rewards should be filtered down (by item count)
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[];
|
||||||
|
/**
|
||||||
|
* Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig
|
||||||
|
* @returns true if reward should be money
|
||||||
|
*/
|
||||||
|
protected rewardShouldBeMoney(): boolean;
|
||||||
|
/**
|
||||||
|
* Choose if ammo should be a reward based on the ammoRewardChancePercent config chance in scavCaseConfig
|
||||||
|
* @returns true if reward should be ammo
|
||||||
|
*/
|
||||||
|
protected rewardShouldBeAmmo(): boolean;
|
||||||
|
/**
|
||||||
|
* Choose from rouble/dollar/euro at random
|
||||||
|
*/
|
||||||
|
protected getRandomMoney(): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* Get a random ammo from items.json that is not in the ammo blacklist AND inside the price rage defined in scavcase.json config
|
||||||
|
* @param rarity The rarity this ammo reward is for
|
||||||
|
* @returns random ammo item from items.json
|
||||||
|
*/
|
||||||
|
protected getRandomAmmo(rarity: string): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* Take all the rewards picked create the Product object array ready to return to calling code
|
||||||
|
* Also add a stack count to ammo and money
|
||||||
|
* @param rewardItems items to convert
|
||||||
|
* @returns Product array
|
||||||
|
*/
|
||||||
|
protected randomiseContainerItemRewards(rewardItems: ITemplateItem[], rarity: string): Product[];
|
||||||
|
/**
|
||||||
|
* Add a randomised stack count to ammo or money items
|
||||||
|
* @param item money or ammo item
|
||||||
|
* @param resultItem money or ammo item with a randomise stack size
|
||||||
|
*/
|
||||||
|
protected addStackCountToAmmoAndMoney(item: ITemplateItem, resultItem: {
|
||||||
|
_id: string;
|
||||||
|
_tpl: string;
|
||||||
|
upd: any;
|
||||||
|
}, rarity: string): void;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param dbItems all items from the items.json
|
||||||
|
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
|
||||||
|
* @returns filtered dbItems array
|
||||||
|
*/
|
||||||
|
protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[];
|
||||||
|
/**
|
||||||
|
* Gathers the reward options from config and scavcase.json into a single object
|
||||||
|
* @param scavCaseDetails scavcase.json values
|
||||||
|
* @returns ScavCaseRewardCountsAndPrices object
|
||||||
|
*/
|
||||||
|
protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices;
|
||||||
|
/**
|
||||||
|
* Randomises the size of ammo and money stacks
|
||||||
|
* @param itemToCalculate ammo or money item
|
||||||
|
* @param rarity rarity (common/rare/superrare)
|
||||||
|
* @returns value to set stack count to
|
||||||
|
*/
|
||||||
|
protected getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem, rarity: string): number;
|
||||||
|
}
|
33
Live/CWX_DebugTool/dist/types/generators/WeatherGenerator.d.ts
vendored
Normal file
33
Live/CWX_DebugTool/dist/types/generators/WeatherGenerator.d.ts
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||||
|
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class WeatherGenerator {
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected weatherConfig: IWeatherConfig;
|
||||||
|
constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||||
|
calculateTime(data: IWeatherData): IWeatherData;
|
||||||
|
/**
|
||||||
|
* Get server uptime seconds multiplied by a multiplier and add to current time as seconds
|
||||||
|
* Format to BSGs requirements
|
||||||
|
* @param computedDate current date
|
||||||
|
* @returns formatted time
|
||||||
|
*/
|
||||||
|
protected getAcceleratedTime(computedDate: Date): string;
|
||||||
|
/**
|
||||||
|
* Get current time formatted to fit BSGs requirement
|
||||||
|
* @param computedDate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected getNormalTime(computedDate: Date): string;
|
||||||
|
generateWeather(data: IWeatherData): IWeatherData;
|
||||||
|
protected getWeightedFog(): string;
|
||||||
|
protected getWeightedRain(): number;
|
||||||
|
protected getRandomFloat(node: string): number;
|
||||||
|
protected getRandomInt(node: string): number;
|
||||||
|
}
|
36
Live/CWX_DebugTool/dist/types/helpers/AssortHelper.d.ts
vendored
Normal file
36
Live/CWX_DebugTool/dist/types/helpers/AssortHelper.d.ts
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
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 {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected questHelper: QuestHelper;
|
||||||
|
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper);
|
||||||
|
/**
|
||||||
|
* Remove assorts from a trader that have not been unlocked yet
|
||||||
|
* @param pmcProfile player profile
|
||||||
|
* @param traderId traders id
|
||||||
|
* @param assort assort items from a trader
|
||||||
|
* @returns assort items minus locked quest assorts
|
||||||
|
*/
|
||||||
|
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort;
|
||||||
|
/**
|
||||||
|
* Remove assorts from a trader that have not been unlocked yet
|
||||||
|
* @param pmcProfile player profile
|
||||||
|
* @param traderId traders id
|
||||||
|
* @param assort traders assorts
|
||||||
|
* @returns traders assorts minus locked loyality assorts
|
||||||
|
*/
|
||||||
|
stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort;
|
||||||
|
/**
|
||||||
|
* Remove an item from an assort
|
||||||
|
* @param assort assort to modify
|
||||||
|
* @param itemID item id to remove from asort
|
||||||
|
* @returns Modified assort
|
||||||
|
*/
|
||||||
|
removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort;
|
||||||
|
}
|
131
Live/CWX_DebugTool/dist/types/helpers/BotGeneratorHelper.d.ts
vendored
Normal file
131
Live/CWX_DebugTool/dist/types/helpers/BotGeneratorHelper.d.ts
vendored
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
||||||
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
|
||||||
|
import { Grid, ITemplateItem, Slot } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { ContainerHelper } from "./ContainerHelper";
|
||||||
|
import { InventoryHelper } from "./InventoryHelper";
|
||||||
|
import { ItemHelper } from "./ItemHelper";
|
||||||
|
import { ProbabilityHelper } from "./ProbabilityHelper";
|
||||||
|
export declare class BotGeneratorHelper {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected probabilityHelper: ProbabilityHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected durabilityLimitsHelper: DurabilityLimitsHelper;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected containerHelper: ContainerHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer);
|
||||||
|
generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances): Item[];
|
||||||
|
/**
|
||||||
|
* Is this magazine cylinder related (revolvers and grenade launchers)
|
||||||
|
* @param magazineParentName the name of the magazines parent
|
||||||
|
* @returns true if it is cylinder related
|
||||||
|
*/
|
||||||
|
magazineIsCylinderRelated(magazineParentName: string): boolean;
|
||||||
|
/**
|
||||||
|
* randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
|
||||||
|
* never return true for an item that has 0% spawn chance
|
||||||
|
* @param itemSlot slot the item sits in
|
||||||
|
* @param modSlot slot the mod sits in
|
||||||
|
* @param modSpawnChances Chances for various mod spawns
|
||||||
|
* @returns boolean true if it should spawn
|
||||||
|
*/
|
||||||
|
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
||||||
|
/**
|
||||||
|
* Get a list of containers that hold ammo
|
||||||
|
* e.g. mod_magazine
|
||||||
|
* @returns string array
|
||||||
|
*/
|
||||||
|
protected getAmmoContainers(): string[];
|
||||||
|
/**
|
||||||
|
* Get the slot details for an item (chamber/cartridge/slot)
|
||||||
|
* @param modSlot e.g patron_in_weapon
|
||||||
|
* @param parentTemplate item template
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot;
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Take a record of camoras and merge the compatable shells into one array
|
||||||
|
* @param camorasWithShells camoras we want to merge into one array
|
||||||
|
* @returns string array of shells fro luitple camora sources
|
||||||
|
*/
|
||||||
|
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
||||||
|
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
|
||||||
|
upd?: Upd;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* Create a repairable object for a weapon that containers durability + max durability properties
|
||||||
|
* @param itemTemplate weapon object being generated for
|
||||||
|
* @param botRole type of bot being generated for
|
||||||
|
* @returns Repairable object
|
||||||
|
*/
|
||||||
|
protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
|
||||||
|
/**
|
||||||
|
* Create a repairable object for an armor that containers durability + max durability properties
|
||||||
|
* @param itemTemplate weapon object being generated for
|
||||||
|
* @param botRole type of bot being generated for
|
||||||
|
* @returns Repairable object
|
||||||
|
*/
|
||||||
|
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
|
||||||
|
protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
|
||||||
|
/**
|
||||||
|
* Sort by spawn chance, highest to lowest, higher is more common
|
||||||
|
* @param unsortedModArray String array to sort
|
||||||
|
* @returns Sorted string array
|
||||||
|
*/
|
||||||
|
protected sortModArray(unsortedModArray: string[]): string[];
|
||||||
|
/**
|
||||||
|
* Can an item be added to an item without issue
|
||||||
|
* @param items
|
||||||
|
* @param tplToCheck
|
||||||
|
* @param equipmentSlot
|
||||||
|
* @returns true if possible
|
||||||
|
*/
|
||||||
|
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean;
|
||||||
|
/**
|
||||||
|
* Adds an item with all its childern into specified equipmentSlots, wherever it fits.
|
||||||
|
* @param equipmentSlots
|
||||||
|
* @param parentId
|
||||||
|
* @param parentTpl
|
||||||
|
* @param itemWithChildren
|
||||||
|
* @param inventory
|
||||||
|
* @returns a `boolean` indicating item was added
|
||||||
|
*/
|
||||||
|
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean;
|
||||||
|
protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean;
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
45
Live/CWX_DebugTool/dist/types/helpers/BotHelper.d.ts
vendored
Normal file
45
Live/CWX_DebugTool/dist/types/helpers/BotHelper.d.ts
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import { Difficulty, IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
export declare class BotHelper {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||||
|
getBotDifficultySettings(type: string, difficulty: string): Difficulty;
|
||||||
|
getBotTemplate(role: string): IBotType;
|
||||||
|
getPmcDifficultySettings(type: string, difficulty: string): Difficulty;
|
||||||
|
/**
|
||||||
|
* Randomise the chance the PMC will attack their own side
|
||||||
|
* @param difficultySettings pmc difficulty settings
|
||||||
|
*/
|
||||||
|
randomisePmcHostility(difficultySettings: Difficulty): void;
|
||||||
|
isBotPmc(botRole: string): boolean;
|
||||||
|
isBotBoss(botRole: string): boolean;
|
||||||
|
isBotFollower(botRole: string): boolean;
|
||||||
|
/**
|
||||||
|
* Add a bot to the FRIENDLY_BOT_TYPES array
|
||||||
|
* @param difficultySettings bot settings to alter
|
||||||
|
* @param typeToAdd bot type to add to friendly list
|
||||||
|
*/
|
||||||
|
addBotToFriendlyList(difficultySettings: Difficulty, typeToAdd: string): void;
|
||||||
|
/**
|
||||||
|
* Add a bot to the ENEMY_BOT_TYPES array
|
||||||
|
* @param difficultySettings bot settings to alter
|
||||||
|
* @param typesToAdd bot type to add to enemy list
|
||||||
|
*/
|
||||||
|
addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void;
|
||||||
|
/**
|
||||||
|
* Add a bot to the REVENGE_BOT_TYPES array
|
||||||
|
* @param difficultySettings bot settings to alter
|
||||||
|
* @param typesToAdd bot type to add to revenge list
|
||||||
|
*/
|
||||||
|
addBotToRevengeList(difficultySettings: Difficulty, typesToAdd: string[]): void;
|
||||||
|
}
|
12
Live/CWX_DebugTool/dist/types/helpers/ContainerHelper.d.ts
vendored
Normal file
12
Live/CWX_DebugTool/dist/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 {
|
||||||
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
||||||
|
}
|
40
Live/CWX_DebugTool/dist/types/helpers/DialogueHelper.d.ts
vendored
Normal file
40
Live/CWX_DebugTool/dist/types/helpers/DialogueHelper.d.ts
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { Dialogue, MessageContent, MessagePreview } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { MessageType } from "../models/enums/MessageType";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { ItemHelper } from "./ItemHelper";
|
||||||
|
import { NotificationSendHelper } from "./NotificationSendHelper";
|
||||||
|
import { NotifierHelper } from "./NotifierHelper";
|
||||||
|
export declare class DialogueHelper {
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected notifierHelper: NotifierHelper;
|
||||||
|
protected notificationSendHelper: NotificationSendHelper;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper);
|
||||||
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||||
|
/**
|
||||||
|
* Add a templated message to the dialogue.
|
||||||
|
* @param dialogueID
|
||||||
|
* @param messageContent
|
||||||
|
* @param sessionID
|
||||||
|
* @param rewards
|
||||||
|
*/
|
||||||
|
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void;
|
||||||
|
/**
|
||||||
|
* Get the preview contents of the last message in a dialogue.
|
||||||
|
* @param dialogue
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getMessagePreview(dialogue: Dialogue): MessagePreview;
|
||||||
|
/**
|
||||||
|
* Get the item contents for a particular message.
|
||||||
|
* @param messageID
|
||||||
|
* @param sessionID
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getMessageItemContents(messageID: string, sessionID: string): Item[];
|
||||||
|
}
|
26
Live/CWX_DebugTool/dist/types/helpers/DurabilityLimitsHelper.d.ts
vendored
Normal file
26
Live/CWX_DebugTool/dist/types/helpers/DurabilityLimitsHelper.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotHelper } from "./BotHelper";
|
||||||
|
export declare class DurabilityLimitsHelper {
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected botHelper: BotHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
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;
|
||||||
|
protected generateMaxWeaponDurability(botRole: string): number;
|
||||||
|
protected generateMaxPmcArmorDurability(itemMaxDurability: number): number;
|
||||||
|
protected getLowestMaxWeaponFromConfig(botRole: string): number;
|
||||||
|
protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number;
|
||||||
|
protected generateWeaponDurability(botRole: string, maxDurability: number): number;
|
||||||
|
protected generateArmorDurability(botRole: string, maxDurability: number): number;
|
||||||
|
protected getMinWeaponDeltaFromConfig(botRole: string): number;
|
||||||
|
protected getMaxWeaponDeltaFromConfig(botRole: string): number;
|
||||||
|
protected getMinArmorDeltaFromConfig(botRole: string): number;
|
||||||
|
protected getMaxArmorDeltaFromConfig(botRole: string): 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