forked from CWX/CWX-mods
bump for 3.6.0
This commit is contained in:
parent
18f4b57fb5
commit
30ce0f1538
@ -32,7 +32,8 @@ namespace CWX_AlarmChanger
|
|||||||
|
|
||||||
private void LoadAudioFilePaths()
|
private void LoadAudioFilePaths()
|
||||||
{
|
{
|
||||||
var AudioFiles = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory + "/BepInEx/plugins/CWX_AlarmChanger/Sounds/");
|
var AudioFiles = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory + "/BepInEx/plugins/CWX/Sounds/");
|
||||||
|
|
||||||
foreach (var File in AudioFiles)
|
foreach (var File in AudioFiles)
|
||||||
{
|
{
|
||||||
LoadAudioClip(File);
|
LoadAudioClip(File);
|
||||||
|
@ -1,42 +1,13 @@
|
|||||||
using BepInEx;
|
using BepInEx;
|
||||||
using EFT.Interactive;
|
|
||||||
using System.Linq;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace CWX_BushWhacker
|
namespace CWX_BushWhacker
|
||||||
{
|
{
|
||||||
[BepInPlugin("com.cwx.bushwhacker", "cwx-bushwhacker", "1.3.2")]
|
[BepInPlugin("com.cwx.bushwhacker", "cwx-bushwhacker", "1.4.0")]
|
||||||
public class BushWhacker : BaseUnityPlugin
|
public class BushWhacker : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
new BushWhackerPatch().Enable();
|
new BushWhackerPatch().Enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DisableBushes()
|
|
||||||
{
|
|
||||||
var bushes = FindObjectsOfType<ObstacleCollider>().ToList();
|
|
||||||
|
|
||||||
var swamps = FindObjectsOfType<BoxCollider>().ToList();
|
|
||||||
|
|
||||||
foreach (var swamp in swamps)
|
|
||||||
{
|
|
||||||
if (swamp.name == "Swamp_collider")
|
|
||||||
{
|
|
||||||
DestroyImmediate(swamp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var bushesItem in bushes)
|
|
||||||
{
|
|
||||||
var filbert = bushesItem?.transform?.parent?.gameObject?.name?.Contains("filbert");
|
|
||||||
var fibert = bushesItem?.transform?.parent?.gameObject?.name?.Contains("fibert");
|
|
||||||
|
|
||||||
if (filbert == true || fibert == true)
|
|
||||||
{
|
|
||||||
DestroyImmediate(bushesItem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@ namespace CWX_BushWhacker
|
|||||||
[PatchPostfix]
|
[PatchPostfix]
|
||||||
public static void PatchPostFix()
|
public static void PatchPostFix()
|
||||||
{
|
{
|
||||||
BushWhacker bushWhacker = new BushWhacker();
|
BushWhackerScript bushWhacker = new BushWhackerScript();
|
||||||
bushWhacker.DisableBushes();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
35
Live/CWX_BushWhacker/BushWhackerScript.cs
Normal file
35
Live/CWX_BushWhacker/BushWhackerScript.cs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
using EFT.Interactive;
|
||||||
|
using System.Linq;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace CWX_BushWhacker
|
||||||
|
{
|
||||||
|
public class BushWhackerScript : MonoBehaviour
|
||||||
|
{
|
||||||
|
public BushWhackerScript()
|
||||||
|
{
|
||||||
|
var bushes = FindObjectsOfType<ObstacleCollider>().ToList();
|
||||||
|
|
||||||
|
var swamps = FindObjectsOfType<BoxCollider>().ToList();
|
||||||
|
|
||||||
|
foreach (var swamp in swamps)
|
||||||
|
{
|
||||||
|
if (swamp.name == "Swamp_collider")
|
||||||
|
{
|
||||||
|
DestroyImmediate(swamp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var bushesItem in bushes)
|
||||||
|
{
|
||||||
|
var filbert = bushesItem?.transform?.parent?.gameObject?.name?.Contains("filbert");
|
||||||
|
var fibert = bushesItem?.transform?.parent?.gameObject?.name?.Contains("fibert");
|
||||||
|
|
||||||
|
if (filbert == true || fibert == true)
|
||||||
|
{
|
||||||
|
DestroyImmediate(bushesItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<AssemblyName>CWX-BushWhacker</AssemblyName>
|
<AssemblyName>CWX-BushWhacker</AssemblyName>
|
||||||
<Version>1.3.2</Version>
|
<Version>1.4.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<Version>1.5.2</Version>
|
<Version>1.6.0</Version>
|
||||||
<AssemblyName>CWX-DeSharpener</AssemblyName>
|
<AssemblyName>CWX-DeSharpener</AssemblyName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace CWX_DeSharpener
|
namespace CWX_DeSharpener
|
||||||
{
|
{
|
||||||
[BepInPlugin("com.CWX.DeSharpener", "CWX-DeSharpener", "1.5.2")]
|
[BepInPlugin("com.CWX.DeSharpener", "CWX-DeSharpener", "1.6.0")]
|
||||||
public class DeSharpener : BaseUnityPlugin
|
public class DeSharpener : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
// This file is used by Code Analysis to maintain SuppressMessage
|
|
||||||
// attributes that are applied to this project.
|
|
||||||
// Project-level suppressions either have no target or are given
|
|
||||||
// a specific target and scoped to a namespace, type, member, etc.
|
|
||||||
|
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
[assembly: SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "<Pending>", Scope = "member", Target = "~M:DeSharpener.DeSharpener.PatchPrefix~System.Boolean")]
|
|
@ -86,9 +86,9 @@ namespace CWX_DebuggingTool
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add existing Bots to list
|
// Add existing Bots to list
|
||||||
if (_gameWorld.AllPlayers.Count > 1)
|
if (_gameWorld.RegisteredPlayers.Count > 1)
|
||||||
{
|
{
|
||||||
foreach (var player in _gameWorld.AllPlayers)
|
foreach (var player in _gameWorld.AllAlivePlayersList)
|
||||||
{
|
{
|
||||||
if (player.IsYourPlayer) continue;
|
if (player.IsYourPlayer) continue;
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ namespace CWX_DebuggingTool
|
|||||||
if (Mode >= 1)
|
if (Mode >= 1)
|
||||||
{
|
{
|
||||||
_content = string.Empty;
|
_content = string.Empty;
|
||||||
_content += $"Total = {_gameWorld.AllPlayers.Count - 1}\n";
|
//_content += $"Total = {_gameWorld.AllPlayers.Count - 1}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// If Mode Greater than or equal to 2 show total for each zone
|
// If Mode Greater than or equal to 2 show total for each zone
|
||||||
|
Binary file not shown.
@ -1,35 +0,0 @@
|
|||||||
University of Illinois/NCSA Open Source License
|
|
||||||
|
|
||||||
Copyright (c) [year] [fullname]. All rights reserved.
|
|
||||||
|
|
||||||
Developed by:
|
|
||||||
[CWX]
|
|
||||||
[https://github.com/CWXDEV/CWX-DeSharpener]
|
|
||||||
[https://hub.sp-tarkov.com/files/file/455-cwx-desharpener/]
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
|
||||||
obtaining a copy of this software and associated documentation files
|
|
||||||
(the "Software"), to deal with the Software without restriction,
|
|
||||||
including without limitation the rights to use, copy, modify, merge,
|
|
||||||
publish, distribute, sublicense, and/or sell copies of the Software,
|
|
||||||
and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimers.
|
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimers in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
* Neither the names of [fullname], [project] nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this Software without specific prior written permission.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH
|
|
||||||
THE SOFTWARE.
|
|
@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "MasterKey",
|
|
||||||
"author": "CWX",
|
|
||||||
"version": "1.4.3",
|
|
||||||
"license": "NCSA",
|
|
||||||
"main": "src/mod.js",
|
|
||||||
"akiVersion": "3.5.5",
|
|
||||||
"scripts": {
|
|
||||||
"setup": "npm i",
|
|
||||||
"build": "node ./packageBuild.ts"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/node": "16.18.10",
|
|
||||||
"@typescript-eslint/eslint-plugin": "5.46.1",
|
|
||||||
"@typescript-eslint/parser": "5.46.1",
|
|
||||||
"bestzip": "2.2.1",
|
|
||||||
"eslint": "8.30.0",
|
|
||||||
"fs-extra": "11.1.0",
|
|
||||||
"glob": "8.0.3",
|
|
||||||
"tsyringe": "4.7.0",
|
|
||||||
"typescript": "4.9.4"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"keyId": "5c1d0d6d86f7744bb2683e1f"
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
|
||||||
import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod";
|
|
||||||
import { DynamicRouterModService } from "@spt-aki/services/mod/dynamicRouter/DynamicRouterModService";
|
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
|
||||||
|
|
||||||
class CWX_MasterKey implements IPreAkiLoadMod
|
|
||||||
{
|
|
||||||
|
|
||||||
private router: DynamicRouterModService;
|
|
||||||
private cfg;
|
|
||||||
private http: HttpResponseUtil;
|
|
||||||
|
|
||||||
public preAkiLoad(container: DependencyContainer): void
|
|
||||||
{
|
|
||||||
this.router = container.resolve<DynamicRouterModService>("DynamicRouterModService");
|
|
||||||
this.http = container.resolve<HttpResponseUtil>("HttpResponseUtil");
|
|
||||||
this.cfg = require("./config.json");
|
|
||||||
|
|
||||||
this.addRoute();
|
|
||||||
}
|
|
||||||
|
|
||||||
private addRoute() : void
|
|
||||||
{
|
|
||||||
this.router.registerDynamicRouter(
|
|
||||||
"MasterKey",
|
|
||||||
[
|
|
||||||
{
|
|
||||||
url: "/cwx/masterkey",
|
|
||||||
action: (url, info, sessionId, output) =>
|
|
||||||
{
|
|
||||||
return this.onRequestConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"MasterKey"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private onRequestConfig(): any
|
|
||||||
{
|
|
||||||
if (typeof this.cfg.keyId !== "string")
|
|
||||||
{
|
|
||||||
return this.http.noBody({ keyId: "5c1d0d6d86f7744bb2683e1f" });
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.http.noBody({ keyId: this.cfg.keyId});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = { mod: new CWX_MasterKey() }
|
|
@ -1,8 +0,0 @@
|
|||||||
// This file is used by Code Analysis to maintain SuppressMessage
|
|
||||||
// attributes that are applied to this project.
|
|
||||||
// Project-level suppressions either have no target or are given
|
|
||||||
// a specific target and scoped to a namespace, type, member, etc.
|
|
||||||
|
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
[assembly: SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "<Pending>", Scope = "member", Target = "~M:CWX_MasterKey.Patch.PatchPostFix")]
|
|
@ -1,13 +1,28 @@
|
|||||||
using BepInEx;
|
using BepInEx;
|
||||||
|
using BepInEx.Configuration;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace CWX_MasterKey
|
namespace CWX_MasterKey
|
||||||
{
|
{
|
||||||
[BepInPlugin("com.CWX.MasterKey", "CWX-MasterKey", "1.4.3")]
|
[BepInPlugin("com.CWX.MasterKey", "CWX-MasterKey", "1.4.3")]
|
||||||
public class MasterKey : BaseUnityPlugin
|
public class MasterKey : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
|
private const string KeyConfigName = "Key Config";
|
||||||
|
internal static ConfigEntry<string> Key;
|
||||||
|
private static string DefaultKey = "5c1d0d6d86f7744bb2683e1f";
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
InitConfig();
|
||||||
|
|
||||||
new MasterKeyPatch().Enable();
|
new MasterKeyPatch().Enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitConfig()
|
||||||
|
{
|
||||||
|
Key = Config.Bind(
|
||||||
|
KeyConfigName,"Key",
|
||||||
|
DefaultKey, "This will be used as the key to open doors");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
namespace CWX_MasterKey
|
|
||||||
{
|
|
||||||
public class MasterKeyConfigClass
|
|
||||||
{
|
|
||||||
public string keyId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,51 +1,24 @@
|
|||||||
using Aki.Common.Http;
|
using BepInEx;
|
||||||
using Aki.Common.Utils;
|
|
||||||
using BepInEx;
|
|
||||||
using Comfort.Common;
|
using Comfort.Common;
|
||||||
using EFT;
|
using EFT;
|
||||||
using EFT.Interactive;
|
using EFT.Interactive;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
|
||||||
using System.Threading;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace CWX_MasterKey
|
namespace CWX_MasterKey
|
||||||
{
|
{
|
||||||
public class MasterKeyScript
|
public class MasterKeyScript
|
||||||
{
|
{
|
||||||
private object _lockObject = new object();
|
|
||||||
|
|
||||||
// Black, Blue, Green, Red, Yellow, Violet
|
// Black, Blue, Green, Red, Yellow, Violet
|
||||||
private readonly string[] _keys = { "5c1d0f4986f7744bb01837fa", "5c1d0c5f86f7744bb2683cf0", "5c1d0dc586f7744baf2e7b79", "5c1d0efb86f7744baf2e7b7b", "5c1d0d6d86f7744bb2683e1f", "5c1e495a86f7743109743dfb" };
|
private readonly string[] _keys = { "5c1d0f4986f7744bb01837fa", "5c1d0c5f86f7744bb2683cf0", "5c1d0dc586f7744baf2e7b79", "5c1d0efb86f7744baf2e7b7b", "5c1d0d6d86f7744bb2683e1f", "5c1e495a86f7743109743dfb" };
|
||||||
private string _keyToUse = "5c1d0d6d86f7744bb2683e1f";
|
private string _keyToUse = "5c1d0d6d86f7744bb2683e1f";
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
MasterKeyConfigClass config = new MasterKeyConfigClass();
|
if (_keys.Any(x => x == MasterKey.Key.Value))
|
||||||
bool lockWasTaken = false;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
Monitor.Enter(_lockObject, ref lockWasTaken);
|
_keyToUse = MasterKey.Key.Value;
|
||||||
|
|
||||||
config = GetConfig();
|
|
||||||
}
|
|
||||||
catch (WebException)
|
|
||||||
{
|
|
||||||
Debug.LogError("[CWX_MasterKey] Issue happened whilst getting config from server");
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (lockWasTaken)
|
|
||||||
{
|
|
||||||
Monitor.Exit(_lockObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_keys.Any(x => x == config.keyId))
|
|
||||||
{
|
|
||||||
_keyToUse = config.keyId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CheckPlayer())
|
if (!CheckPlayer())
|
||||||
@ -53,10 +26,10 @@ namespace CWX_MasterKey
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Door> allDoors = GameObject.FindObjectsOfType<Door>().ToList(); // mechanical doors
|
List<Door> allDoors = Object.FindObjectsOfType<Door>().ToList(); // mechanical doors
|
||||||
List<KeycardDoor> allKeyCardDoors = GameObject.FindObjectsOfType<KeycardDoor>().ToList(); // keycard doors
|
List<KeycardDoor> allKeyCardDoors = Object.FindObjectsOfType<KeycardDoor>().ToList(); // keycard doors
|
||||||
List<LootableContainer> allKeyContainers = GameObject.FindObjectsOfType<LootableContainer>().ToList(); // locked loot containers
|
List<LootableContainer> allKeyContainers = Object.FindObjectsOfType<LootableContainer>().ToList(); // locked loot containers
|
||||||
List<Trunk> allTrunks = GameObject.FindObjectsOfType<Trunk>().ToList(); // locked car trunks
|
List<Trunk> allTrunks = Object.FindObjectsOfType<Trunk>().ToList(); // locked car trunks
|
||||||
|
|
||||||
foreach (Door door in allDoors) // mechanical doors
|
foreach (Door door in allDoors) // mechanical doors
|
||||||
{
|
{
|
||||||
@ -91,23 +64,10 @@ namespace CWX_MasterKey
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public MasterKeyConfigClass GetConfig()
|
|
||||||
{
|
|
||||||
var json = RequestHandler.GetJson($"/cwx/masterkey");
|
|
||||||
var jsonClass = Json.Deserialize<MasterKeyConfigClass>(json);
|
|
||||||
|
|
||||||
return jsonClass;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool CheckPlayer()
|
public bool CheckPlayer()
|
||||||
{
|
{
|
||||||
GameWorld gameWorld = Singleton<GameWorld>.Instance;
|
return Singleton<GameWorld>.Instance.MainPlayer.Profile.Inventory.Equipment.GetAllItems()
|
||||||
|
.Any(item => item.TemplateId == _keyToUse);
|
||||||
Player player= gameWorld.RegisteredPlayers.Find(p => p.IsYourPlayer);
|
|
||||||
|
|
||||||
var items = player.Profile.Inventory.Equipment.GetAllItems();
|
|
||||||
|
|
||||||
return items.Any(item => item.TemplateId == _keyToUse);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,9 +0,0 @@
|
|||||||
# Exclude these folders from linting
|
|
||||||
node_modules
|
|
||||||
dist/
|
|
||||||
types/
|
|
||||||
|
|
||||||
# Exclude these filetypes from linting
|
|
||||||
*.json
|
|
||||||
*.txt
|
|
||||||
*.exe
|
|
@ -1,75 +0,0 @@
|
|||||||
{
|
|
||||||
"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
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
University of Illinois/NCSA Open Source License
|
|
||||||
|
|
||||||
Copyright (c) [year] [fullname]. All rights reserved.
|
|
||||||
|
|
||||||
Developed by:
|
|
||||||
[CWX]
|
|
||||||
[https://github.com/CWXDEV/CWX-DeSharpener]
|
|
||||||
[https://hub.sp-tarkov.com/files/file/455-cwx-desharpener/]
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
|
||||||
obtaining a copy of this software and associated documentation files
|
|
||||||
(the "Software"), to deal with the Software without restriction,
|
|
||||||
including without limitation the rights to use, copy, modify, merge,
|
|
||||||
publish, distribute, sublicense, and/or sell copies of the Software,
|
|
||||||
and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimers.
|
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimers in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
* Neither the names of [fullname], [project] nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this Software without specific prior written permission.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH
|
|
||||||
THE SOFTWARE.
|
|
35
Live/CWX_MasterKey/server/dist/LICENSE.txt
vendored
35
Live/CWX_MasterKey/server/dist/LICENSE.txt
vendored
@ -1,35 +0,0 @@
|
|||||||
University of Illinois/NCSA Open Source License
|
|
||||||
|
|
||||||
Copyright (c) [year] [fullname]. All rights reserved.
|
|
||||||
|
|
||||||
Developed by:
|
|
||||||
[CWX]
|
|
||||||
[https://github.com/CWXDEV/CWX-DeSharpener]
|
|
||||||
[https://hub.sp-tarkov.com/files/file/455-cwx-desharpener/]
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
|
||||||
obtaining a copy of this software and associated documentation files
|
|
||||||
(the "Software"), to deal with the Software without restriction,
|
|
||||||
including without limitation the rights to use, copy, modify, merge,
|
|
||||||
publish, distribute, sublicense, and/or sell copies of the Software,
|
|
||||||
and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimers.
|
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimers in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
* Neither the names of [fullname], [project] nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this Software without specific prior written permission.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH
|
|
||||||
THE SOFTWARE.
|
|
23
Live/CWX_MasterKey/server/dist/package.json
vendored
23
Live/CWX_MasterKey/server/dist/package.json
vendored
@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "MasterKey",
|
|
||||||
"author": "CWX",
|
|
||||||
"version": "1.4.3",
|
|
||||||
"license": "NCSA",
|
|
||||||
"main": "src/mod.js",
|
|
||||||
"akiVersion": "3.5.5",
|
|
||||||
"scripts": {
|
|
||||||
"setup": "npm i",
|
|
||||||
"build": "node ./packageBuild.ts"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/node": "16.18.10",
|
|
||||||
"@typescript-eslint/eslint-plugin": "5.46.1",
|
|
||||||
"@typescript-eslint/parser": "5.46.1",
|
|
||||||
"bestzip": "2.2.1",
|
|
||||||
"eslint": "8.30.0",
|
|
||||||
"fs-extra": "11.1.0",
|
|
||||||
"glob": "8.0.3",
|
|
||||||
"tsyringe": "4.7.0",
|
|
||||||
"typescript": "4.9.4"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"keyId": "5c1d0d6d86f7744bb2683e1f"
|
|
||||||
}
|
|
50
Live/CWX_MasterKey/server/dist/src/mod.ts
vendored
50
Live/CWX_MasterKey/server/dist/src/mod.ts
vendored
@ -1,50 +0,0 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
|
||||||
import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod";
|
|
||||||
import { DynamicRouterModService } from "@spt-aki/services/mod/dynamicRouter/DynamicRouterModService";
|
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
|
||||||
|
|
||||||
class CWX_MasterKey implements IPreAkiLoadMod
|
|
||||||
{
|
|
||||||
|
|
||||||
private router: DynamicRouterModService;
|
|
||||||
private cfg;
|
|
||||||
private http: HttpResponseUtil;
|
|
||||||
|
|
||||||
public preAkiLoad(container: DependencyContainer): void
|
|
||||||
{
|
|
||||||
this.router = container.resolve<DynamicRouterModService>("DynamicRouterModService");
|
|
||||||
this.http = container.resolve<HttpResponseUtil>("HttpResponseUtil");
|
|
||||||
this.cfg = require("./config.json");
|
|
||||||
|
|
||||||
this.addRoute();
|
|
||||||
}
|
|
||||||
|
|
||||||
private addRoute() : void
|
|
||||||
{
|
|
||||||
this.router.registerDynamicRouter(
|
|
||||||
"MasterKey",
|
|
||||||
[
|
|
||||||
{
|
|
||||||
url: "/cwx/masterkey",
|
|
||||||
action: (url, info, sessionId, output) =>
|
|
||||||
{
|
|
||||||
return this.onRequestConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"MasterKey"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private onRequestConfig(): any
|
|
||||||
{
|
|
||||||
if (typeof this.cfg.keyId !== "string")
|
|
||||||
{
|
|
||||||
return this.http.noBody({ keyId: "5c1d0d6d86f7744bb2683e1f" });
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.http.noBody({ keyId: this.cfg.keyId});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = { mod: new CWX_MasterKey() }
|
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"folders": [
|
|
||||||
{
|
|
||||||
"path": "."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extensions": {
|
|
||||||
"recommendations": [
|
|
||||||
"dbaeumer.vscode-eslint"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "MasterKey",
|
|
||||||
"author": "CWX",
|
|
||||||
"version": "1.4.3",
|
|
||||||
"license": "NCSA",
|
|
||||||
"main": "src/mod.js",
|
|
||||||
"akiVersion": "3.5.5",
|
|
||||||
"scripts": {
|
|
||||||
"setup": "npm i",
|
|
||||||
"build": "node ./packageBuild.ts"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/node": "16.18.10",
|
|
||||||
"@typescript-eslint/eslint-plugin": "5.46.1",
|
|
||||||
"@typescript-eslint/parser": "5.46.1",
|
|
||||||
"bestzip": "2.2.1",
|
|
||||||
"eslint": "8.30.0",
|
|
||||||
"fs-extra": "11.1.0",
|
|
||||||
"glob": "8.0.3",
|
|
||||||
"tsyringe": "4.7.0",
|
|
||||||
"typescript": "4.9.4"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,72 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
// This is a simple script used to build a mod package. The script will copy necessary files to the build directory
|
|
||||||
// and compress the build directory into a zip file that can be easily shared.
|
|
||||||
|
|
||||||
const fs = require("fs-extra");
|
|
||||||
const glob = require("glob");
|
|
||||||
const zip = require('bestzip');
|
|
||||||
const path = require("path");
|
|
||||||
|
|
||||||
// Load the package.json file to get some information about the package so we can name things appropriately. This is
|
|
||||||
// atypical, and you would never do this in a production environment, but this script is only used for development so
|
|
||||||
// it's fine in this case. Some of these values are stored in environment variables, but those differ between node
|
|
||||||
// versions; the 'author' value is not available after node v14.
|
|
||||||
const { author, name:packageName, version } = require("./package.json");
|
|
||||||
|
|
||||||
// Generate the name of the package, stripping out all non-alphanumeric characters in the 'author' and 'name'.
|
|
||||||
const modName = `${author.replace(/[^a-z0-9]/gi, "")}-${packageName.replace(/[^a-z0-9]/gi, "")}-${version}`;
|
|
||||||
console.log(`Generated package name: ${modName}`);
|
|
||||||
|
|
||||||
// Delete the old build directory and compressed package file.
|
|
||||||
fs.rmSync(`${__dirname}/dist`, { force: true, recursive: true });
|
|
||||||
console.log("Previous build files deleted.");
|
|
||||||
|
|
||||||
// Generate a list of files that should not be copied over into the distribution directory. This is a blacklist to ensure
|
|
||||||
// we always copy over additional files and directories that authors may have added to their project. This may need to be
|
|
||||||
// expanded upon by the mod author to allow for node modules that are used within the mod; example commented out below.
|
|
||||||
const ignoreList = [
|
|
||||||
"node_modules/",
|
|
||||||
// "node_modules/!(weighted|glob)", // Instead of excluding the entire node_modules directory, allow two node modules.
|
|
||||||
"src/**/*.js",
|
|
||||||
"types/",
|
|
||||||
".git/",
|
|
||||||
".gitea/",
|
|
||||||
".eslintignore",
|
|
||||||
".eslintrc.json",
|
|
||||||
".gitignore",
|
|
||||||
".DS_Store",
|
|
||||||
"packageBuild.ts",
|
|
||||||
"mod.code-workspace",
|
|
||||||
"package-lock.json",
|
|
||||||
"tsconfig.json"
|
|
||||||
];
|
|
||||||
const exclude = glob.sync(`{${ignoreList.join(",")}}`, { realpath: true, dot: true });
|
|
||||||
|
|
||||||
// For some reason these basic-bitch functions won't allow us to copy a directory into itself, so we have to resort to
|
|
||||||
// using a temporary directory, like an idiot. Excuse the normalize spam; some modules cross-platform, some don't...
|
|
||||||
fs.copySync(__dirname, path.normalize(`${__dirname}/../~${modName}`), {filter:(filePath) =>
|
|
||||||
{
|
|
||||||
return !exclude.includes(filePath);
|
|
||||||
}});
|
|
||||||
fs.moveSync(path.normalize(`${__dirname}/../~${modName}`), path.normalize(`${__dirname}/${modName}`), { overwrite: true });
|
|
||||||
fs.copySync(path.normalize(`${__dirname}/${modName}`), path.normalize(`${__dirname}/dist`));
|
|
||||||
console.log("Build files copied.");
|
|
||||||
|
|
||||||
// Compress the files for easy distribution. The compressed file is saved into the dist directory. When uncompressed we
|
|
||||||
// need to be sure that it includes a directory that the user can easily copy into their game mods directory.
|
|
||||||
zip({
|
|
||||||
source: modName,
|
|
||||||
destination: `dist/${modName}.zip`,
|
|
||||||
cwd: __dirname
|
|
||||||
}).catch(function(err)
|
|
||||||
{
|
|
||||||
console.error("A bestzip error has occurred: ", err.stack);
|
|
||||||
}).then(function()
|
|
||||||
{
|
|
||||||
console.log(`Compressed mod package to: /dist/${modName}.zip`);
|
|
||||||
|
|
||||||
// Now that we're done with the compression we can delete the temporary build directory.
|
|
||||||
fs.rmSync(`${__dirname}/${modName}`, { force: true, recursive: true });
|
|
||||||
console.log("Build successful! your zip file has been created and is ready to be uploaded to hub.sp-tarkov.com/files/");
|
|
||||||
});
|
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"keyId": "5c1d0d6d86f7744bb2683e1f"
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
|
||||||
import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod";
|
|
||||||
import { DynamicRouterModService } from "@spt-aki/services/mod/dynamicRouter/DynamicRouterModService";
|
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
|
||||||
|
|
||||||
class CWX_MasterKey implements IPreAkiLoadMod
|
|
||||||
{
|
|
||||||
|
|
||||||
private router: DynamicRouterModService;
|
|
||||||
private cfg;
|
|
||||||
private http: HttpResponseUtil;
|
|
||||||
|
|
||||||
public preAkiLoad(container: DependencyContainer): void
|
|
||||||
{
|
|
||||||
this.router = container.resolve<DynamicRouterModService>("DynamicRouterModService");
|
|
||||||
this.http = container.resolve<HttpResponseUtil>("HttpResponseUtil");
|
|
||||||
this.cfg = require("./config.json");
|
|
||||||
|
|
||||||
this.addRoute();
|
|
||||||
}
|
|
||||||
|
|
||||||
private addRoute() : void
|
|
||||||
{
|
|
||||||
this.router.registerDynamicRouter(
|
|
||||||
"MasterKey",
|
|
||||||
[
|
|
||||||
{
|
|
||||||
url: "/cwx/masterkey",
|
|
||||||
action: (url, info, sessionId, output) =>
|
|
||||||
{
|
|
||||||
return this.onRequestConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"MasterKey"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private onRequestConfig(): any
|
|
||||||
{
|
|
||||||
if (typeof this.cfg.keyId !== "string")
|
|
||||||
{
|
|
||||||
return this.http.noBody({ keyId: "5c1d0d6d86f7744bb2683e1f" });
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.http.noBody({ keyId: this.cfg.keyId});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = { mod: new CWX_MasterKey() }
|
|
@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"allowJs": true,
|
|
||||||
"module": "CommonJS",
|
|
||||||
"target": "es2020",
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"downlevelIteration": true,
|
|
||||||
"experimentalDecorators": true,
|
|
||||||
"emitDecoratorMetadata": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"outDir": "tmp",
|
|
||||||
"baseUrl": ".",
|
|
||||||
"paths": {
|
|
||||||
"@spt-aki/*": ["./types/*"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lib": [
|
|
||||||
"es2020"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"src/*",
|
|
||||||
"src/**/*"
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
export declare class ErrorHandler {
|
|
||||||
private logger;
|
|
||||||
private readLine;
|
|
||||||
constructor();
|
|
||||||
handleCriticalError(err: any): void;
|
|
||||||
}
|
|
5
Live/CWX_MasterKey/server/types/Program.d.ts
vendored
5
Live/CWX_MasterKey/server/types/Program.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
export declare class Program {
|
|
||||||
private errorHandler;
|
|
||||||
constructor();
|
|
||||||
start(): void;
|
|
||||||
}
|
|
3
Live/CWX_MasterKey/server/types/TYPES.d.ts
vendored
3
Live/CWX_MasterKey/server/types/TYPES.d.ts
vendored
@ -1,3 +0,0 @@
|
|||||||
export declare const TYPES: {
|
|
||||||
[name: string]: symbol;
|
|
||||||
};
|
|
@ -1,36 +0,0 @@
|
|||||||
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);
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/limit
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/difficulty
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
/**
|
|
||||||
* Handle client/game/bot/generate
|
|
||||||
* @returns IGetBodyResponseData
|
|
||||||
*/
|
|
||||||
generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData<IBotBase[]>;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/maxCap
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotCap(): string;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/getBotBehaviours
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotBehaviours(): string;
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
import { BundleLoader } from "../loaders/BundleLoader";
|
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class BundleCallbacks {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected httpFileUtil: HttpFileUtil;
|
|
||||||
protected bundleLoader: BundleLoader;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected httpConfig: IHttpConfig;
|
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, 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;
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
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 { IGetSuitsResponse } from "../models/eft/customization/IGetSuitsResponse";
|
|
||||||
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);
|
|
||||||
/**
|
|
||||||
* Handles client/trading/customization/storage
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetSuitsResponse>;
|
|
||||||
/**
|
|
||||||
* Handles client/trading/customization
|
|
||||||
* @returns ISuit[]
|
|
||||||
*/
|
|
||||||
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;
|
|
||||||
}
|
|
@ -1,74 +0,0 @@
|
|||||||
import { HideoutController } from "../controllers/HideoutController";
|
|
||||||
import { RagfairController } from "../controllers/RagfairController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IGlobals } from "../models/eft/common/IGlobals";
|
|
||||||
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
|
|
||||||
import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase";
|
|
||||||
import { IQuest } from "../models/eft/common/tables/IQuest";
|
|
||||||
import { IGetItemPricesResponse } from "../models/eft/game/IGetItemPricesResponse";
|
|
||||||
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 { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
/**
|
|
||||||
* Handle client requests
|
|
||||||
*/
|
|
||||||
export declare class DataCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected ragfairController: RagfairController;
|
|
||||||
protected hideoutController: HideoutController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, ragfairController: RagfairController, hideoutController: HideoutController);
|
|
||||||
/**
|
|
||||||
* Handles client/settings
|
|
||||||
* @returns ISettingsBase
|
|
||||||
*/
|
|
||||||
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
|
||||||
/**
|
|
||||||
* Handles client/globals
|
|
||||||
* @returns IGlobals
|
|
||||||
*/
|
|
||||||
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
|
||||||
/**
|
|
||||||
* Handles client/items
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
/**
|
|
||||||
* Handles client/handbook/templates
|
|
||||||
* @returns IHandbookBase
|
|
||||||
*/
|
|
||||||
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHandbookBase>;
|
|
||||||
/**
|
|
||||||
* Handles client/customization
|
|
||||||
* @returns Record<string, ICustomizationItem
|
|
||||||
*/
|
|
||||||
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
|
|
||||||
/**
|
|
||||||
* Handles client/account/customization
|
|
||||||
* @returns string[]
|
|
||||||
*/
|
|
||||||
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<Record<string, string>>;
|
|
||||||
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
|
||||||
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
/**
|
|
||||||
* Handle client/hideout/qte/list
|
|
||||||
*/
|
|
||||||
getQteList(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
/**
|
|
||||||
* Handle client/items/prices/
|
|
||||||
* Called when viewing a traders assorts
|
|
||||||
* TODO - fully implement this
|
|
||||||
*/
|
|
||||||
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetItemPricesResponse>;
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
import { DialogueController } from "../controllers/DialogueController";
|
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IChatServer } from "../models/eft/dialog/IChatServer";
|
|
||||||
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 implements OnUpdate {
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected dialogueController: DialogueController;
|
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
|
|
||||||
/**
|
|
||||||
* Handles client/friend/list
|
|
||||||
* @returns IGetFriendListDataResponse
|
|
||||||
*/
|
|
||||||
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
|
|
||||||
/**
|
|
||||||
* Handles client/chatServer/list
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<IChatServer[]>;
|
|
||||||
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<DialogueInfo>;
|
|
||||||
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[]>;
|
|
||||||
/**
|
|
||||||
* Handles client/mail/dialog/getAllAttachments
|
|
||||||
* @returns IGetAllAttachmentsResponse
|
|
||||||
*/
|
|
||||||
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): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
import { GameController } from "../controllers/GameController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
|
||||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
|
||||||
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
|
||||||
import { IGameKeepAliveResponse } from "../models/eft/game/IGameKeepAliveResponse";
|
|
||||||
import { IGameLogoutResponseData } from "../models/eft/game/IGameLogoutResponseData";
|
|
||||||
import { IGameStartResponse } from "../models/eft/game/IGameStartResponse";
|
|
||||||
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
|
|
||||||
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
|
||||||
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);
|
|
||||||
/**
|
|
||||||
* Handle client/game/version/validate
|
|
||||||
* @returns INullResponseData
|
|
||||||
*/
|
|
||||||
versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData;
|
|
||||||
/**
|
|
||||||
* Handle client/game/start
|
|
||||||
* @returns IGameStartResponse
|
|
||||||
*/
|
|
||||||
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameStartResponse>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/logout
|
|
||||||
* @returns IGameLogoutResponseData
|
|
||||||
*/
|
|
||||||
gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameLogoutResponseData>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/config
|
|
||||||
* @returns IGameConfigResponse
|
|
||||||
*/
|
|
||||||
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
|
|
||||||
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
|
|
||||||
getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any;
|
|
||||||
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/keepalive
|
|
||||||
* @returns IGameKeepAliveResponse
|
|
||||||
*/
|
|
||||||
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameKeepAliveResponse>;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/version
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
|
||||||
}
|
|
||||||
export { GameCallbacks };
|
|
@ -1,8 +0,0 @@
|
|||||||
import { HandbookController } from "../controllers/HandbookController";
|
|
||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
export declare class HandbookCallbacks implements OnLoad {
|
|
||||||
protected handbookController: HandbookController;
|
|
||||||
constructor(handbookController: HandbookController);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
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 { IWorkoutData } from "../models/eft/health/IWorkoutData";
|
|
||||||
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>;
|
|
||||||
/**
|
|
||||||
* Custom aki server request found in modules/QTEPatch.cs
|
|
||||||
* @param url
|
|
||||||
* @param info HealthListener.Instance.CurrentHealth class
|
|
||||||
* @param sessionID session id
|
|
||||||
* @returns empty response, no data sent back to client
|
|
||||||
*/
|
|
||||||
handleWorkoutEffects(url: string, info: IWorkoutData, sessionID: string): IGetBodyResponseData<string>;
|
|
||||||
/**
|
|
||||||
* Handle Eat
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle Heal
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle RestoreHealth
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,75 +0,0 @@
|
|||||||
import { HideoutController } from "../controllers/HideoutController";
|
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
|
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
|
||||||
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
|
|
||||||
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 { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
export declare class HideoutCallbacks implements OnUpdate {
|
|
||||||
protected hideoutController: HideoutController;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected hideoutConfig: IHideoutConfig;
|
|
||||||
constructor(hideoutController: HideoutController, // TODO: delay needed
|
|
||||||
configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Handle HideoutUpgrade
|
|
||||||
*/
|
|
||||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutUpgradeComplete
|
|
||||||
*/
|
|
||||||
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutPutItemsInAreaSlots
|
|
||||||
*/
|
|
||||||
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutTakeItemsFromAreaSlots
|
|
||||||
*/
|
|
||||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutToggleArea
|
|
||||||
*/
|
|
||||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutSingleProductionStart
|
|
||||||
*/
|
|
||||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutScavCaseProductionStart
|
|
||||||
*/
|
|
||||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutContinuousProductionStart
|
|
||||||
*/
|
|
||||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutTakeProduction
|
|
||||||
*/
|
|
||||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutQuickTimeEvent
|
|
||||||
*/
|
|
||||||
handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
|
||||||
*/
|
|
||||||
recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
|
||||||
*/
|
|
||||||
improveArea(pmcData: IPmcData, request: IHideoutImproveAreaRequestData, sessionId: string): IItemEventRouterResponse;
|
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
import { HttpServer } from "../servers/HttpServer";
|
|
||||||
export declare class HttpCallbacks implements OnLoad {
|
|
||||||
protected httpServer: HttpServer;
|
|
||||||
constructor(httpServer: HttpServer);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
getImage(): string;
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
import { InraidController } from "../controllers/InraidController";
|
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
|
||||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
/**
|
|
||||||
* Handle client requests
|
|
||||||
*/
|
|
||||||
export declare class InraidCallbacks {
|
|
||||||
protected inraidController: InraidController;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil);
|
|
||||||
/**
|
|
||||||
* Handle client/location/getLocalloot
|
|
||||||
* @param url
|
|
||||||
* @param info register player request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Null http response
|
|
||||||
*/
|
|
||||||
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
|
|
||||||
/**
|
|
||||||
* Handle raid/profile/save
|
|
||||||
* @param url
|
|
||||||
* @param info Save progress request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Null http response
|
|
||||||
*/
|
|
||||||
saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/raid/endstate
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getRaidEndState(): string;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/raid/menu
|
|
||||||
* @returns JSON as string
|
|
||||||
*/
|
|
||||||
getRaidMenuSettings(): string;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/weapon/durability
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getWeaponDurability(): string;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/airdrop/config
|
|
||||||
* @returns JSON as string
|
|
||||||
*/
|
|
||||||
getAirdropConfig(): string;
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
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 implements 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);
|
|
||||||
/**
|
|
||||||
* Handle client/insurance/items/list/cost
|
|
||||||
* @returns IGetInsuranceCostResponseData
|
|
||||||
*/
|
|
||||||
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
|
|
||||||
/**
|
|
||||||
* Handle Insure
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
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 { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
|
||||||
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;
|
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { Warning } from "../models/eft/itemEvent/IItemEventRouterBase";
|
|
||||||
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>;
|
|
||||||
protected getErrorCode(warnings: Warning[]): number;
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
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 };
|
|
@ -1,15 +0,0 @@
|
|||||||
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>;
|
|
||||||
getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
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 { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
|
||||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
|
||||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
|
||||||
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
|
||||||
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>;
|
|
||||||
/**
|
|
||||||
* Handle client/match/group/status
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
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;
|
|
||||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
|
||||||
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
declare class ModCallbacks implements OnLoad {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected httpFileUtil: HttpFileUtil;
|
|
||||||
protected postAkiModLoader: PostAkiModLoader;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected httpConfig: IHttpConfig;
|
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, localisationService: LocalisationService, configServer: ConfigServer);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
||||||
export { ModCallbacks };
|
|
@ -1,11 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
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 { ISelectProfileResponse } from "../models/eft/notifier/ISelectProfileResponse";
|
|
||||||
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>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/select
|
|
||||||
* @returns ISelectProfileResponse
|
|
||||||
*/
|
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
import { PresetController } from "../controllers/PresetController";
|
|
||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
export declare class PresetCallbacks implements OnLoad {
|
|
||||||
protected presetController: PresetController;
|
|
||||||
constructor(presetController: PresetController);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,72 +0,0 @@
|
|||||||
import { ProfileController } from "../controllers/ProfileController";
|
|
||||||
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 { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
|
||||||
import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData";
|
|
||||||
import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest";
|
|
||||||
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";
|
|
||||||
/** Handle profile related client events */
|
|
||||||
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>;
|
|
||||||
/**
|
|
||||||
* Get the complete player profile (scav + pmc character)
|
|
||||||
* @param url
|
|
||||||
* @param info Empty
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Profile object
|
|
||||||
*/
|
|
||||||
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
|
||||||
/**
|
|
||||||
* Handle the creation of a scav profile for player
|
|
||||||
* Occurs post-raid and when profile first created immediately after character details are confirmed by player
|
|
||||||
* @param url
|
|
||||||
* @param info empty
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Profile object
|
|
||||||
*/
|
|
||||||
regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/voice/change event
|
|
||||||
* @param url
|
|
||||||
* @param info Change voice request object
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Client response
|
|
||||||
*/
|
|
||||||
changeVoice(url: string, info: IProfileChangeVoiceRequestData, sessionID: string): INullResponseData;
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/nickname/change event
|
|
||||||
* Client allows player to adjust their profile name
|
|
||||||
* @param url
|
|
||||||
* @param info Change nickname request object
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns client response
|
|
||||||
*/
|
|
||||||
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 choosing a character face/voice
|
|
||||||
* @param url
|
|
||||||
* @param info response (empty)
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
|
|
||||||
getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData<string>;
|
|
||||||
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;
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
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;
|
|
||||||
/**
|
|
||||||
* Handle client/quest/list
|
|
||||||
* @param url
|
|
||||||
* @param info
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
|
||||||
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
|
||||||
import { RagfairController } from "../controllers/RagfairController";
|
|
||||||
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 { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
/**
|
|
||||||
* Handle ragfair related callback events
|
|
||||||
*/
|
|
||||||
export declare class RagfairCallbacks implements OnLoad, OnUpdate {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected ragfairServer: RagfairServer;
|
|
||||||
protected ragfairController: RagfairController;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected ragfairConfig: IRagfairConfig;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
|
||||||
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
|
||||||
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle /client/items/prices
|
|
||||||
* Called when clicking an item to list on flea
|
|
||||||
*/
|
|
||||||
getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
|
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
|
||||||
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
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);
|
|
||||||
/**
|
|
||||||
* use trader to repair item
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Use repair kit to repair item
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
export declare class SaveCallbacks implements OnLoad, OnUpdate {
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
constructor(saveServer: SaveServer);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
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);
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/items/moving TradingConfirm
|
|
||||||
*/
|
|
||||||
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
|
||||||
import { TraderController } from "../controllers/TraderController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class TraderCallbacks implements OnLoad, OnUpdate {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected traderController: TraderController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
onUpdate(): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
|
||||||
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
|
||||||
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
|
||||||
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
import { WeatherController } from "../controllers/WeatherController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class WeatherCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected weatherController: WeatherController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);
|
|
||||||
/**
|
|
||||||
* Handle client/weather
|
|
||||||
* @returns IWeatherData
|
|
||||||
*/
|
|
||||||
getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IWeatherData>;
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
import { ContextVariable } from "./ContextVariable";
|
|
||||||
import { ContextVariableType } from "./ContextVariableType";
|
|
||||||
export declare class ApplicationContext {
|
|
||||||
private variables;
|
|
||||||
private static holderMaxSize;
|
|
||||||
/**
|
|
||||||
* Called like:
|
|
||||||
*
|
|
||||||
* const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue<IRegisterPlayerRequestData>();
|
|
||||||
*
|
|
||||||
* const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue<string>();
|
|
||||||
*
|
|
||||||
* const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue<IStartOfflineRaidRequestData>();
|
|
||||||
* @param type
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getLatestValue(type: ContextVariableType): ContextVariable;
|
|
||||||
getValues(type: ContextVariableType): ContextVariable[];
|
|
||||||
addValue(type: ContextVariableType, value: any): void;
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
import { ContextVariableType } from "./ContextVariableType";
|
|
||||||
export declare class ContextVariable {
|
|
||||||
private value;
|
|
||||||
private timestamp;
|
|
||||||
private type;
|
|
||||||
constructor(value: any, type: ContextVariableType);
|
|
||||||
getValue<T>(): T;
|
|
||||||
getTimestamp(): Date;
|
|
||||||
getType(): ContextVariableType;
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
export declare enum ContextVariableType {
|
|
||||||
/** Logged in users session id */
|
|
||||||
SESSION_ID = 0,
|
|
||||||
/** Currently acive raid information */
|
|
||||||
RAID_CONFIGURATION = 1,
|
|
||||||
/** Timestamp when client first connected */
|
|
||||||
CLIENT_START_TIMESTAMP = 2,
|
|
||||||
/** When player is loading into map and loot is requested */
|
|
||||||
REGISTER_PLAYER_REQUEST = 3
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
import { ApplicationContext } from "../context/ApplicationContext";
|
|
||||||
import { BotGenerator } from "../generators/BotGenerator";
|
|
||||||
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
|
||||||
import { BotHelper } from "../helpers/BotHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
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 { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
export declare class BotController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected botGenerator: BotGenerator;
|
|
||||||
protected botHelper: BotHelper;
|
|
||||||
protected botDifficultyHelper: BotDifficultyHelper;
|
|
||||||
protected botGenerationCacheService: BotGenerationCacheService;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected applicationContext: ApplicationContext;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
static readonly pmcTypeLabel = "PMC";
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
|
|
||||||
/**
|
|
||||||
* Return the number of bot loadout varieties to be generated
|
|
||||||
* @param type bot Type we want the loadout gen count for
|
|
||||||
* @returns number of bots to generate
|
|
||||||
*/
|
|
||||||
getBotPresetGenerationLimit(type: string): number;
|
|
||||||
/**
|
|
||||||
* Get the core.json difficulty settings from database\bots
|
|
||||||
* @returns IBotCore
|
|
||||||
*/
|
|
||||||
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;
|
|
||||||
/**
|
|
||||||
* Generate bot profiles and store in cache
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param info bot generation request info
|
|
||||||
* @returns IBotBase array
|
|
||||||
*/
|
|
||||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
|
||||||
/**
|
|
||||||
* Get the difficulty passed in, if its not "asoline", get selected difficulty from config
|
|
||||||
* @param requestedDifficulty
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getPMCDifficulty(requestedDifficulty: string): string;
|
|
||||||
/**
|
|
||||||
* Get the max number of bots allowed on a map
|
|
||||||
* Looks up location player is entering when getting cap value
|
|
||||||
* @returns cap number
|
|
||||||
*/
|
|
||||||
getBotCap(): number;
|
|
||||||
getPmcBotTypes(): Record<string, Record<string, Record<string, number>>>;
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
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 { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
export declare class CustomizationController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, 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[];
|
|
||||||
}
|
|
@ -1,79 +0,0 @@
|
|||||||
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 { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class DialogueController {
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected dialogueHelper: DialogueHelper;
|
|
||||||
constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper);
|
|
||||||
update(): void;
|
|
||||||
getFriendList(sessionID: string): IGetFriendListDataResponse;
|
|
||||||
/**
|
|
||||||
* Create array holding trader dialogs and mail interactions with player
|
|
||||||
* Set the content of the dialogue on the list tab.
|
|
||||||
* @param sessionID Session Id
|
|
||||||
* @returns array of dialogs
|
|
||||||
*/
|
|
||||||
generateDialogueList(sessionID: string): DialogueInfo[];
|
|
||||||
/**
|
|
||||||
* Get the content of a dialogue
|
|
||||||
* @param dialogueID Dialog id
|
|
||||||
* @param sessionID Session Id
|
|
||||||
* @returns DialogueInfo
|
|
||||||
*/
|
|
||||||
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
|
|
||||||
/**
|
|
||||||
* Handle player clicking 'messenger' and seeing all the messages they've recieved
|
|
||||||
* Set the content of the dialogue on the details panel, showing all the messages
|
|
||||||
* for the specified dialogue.
|
|
||||||
* @param dialogueID Dialog id
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IGetMailDialogViewResponseData object
|
|
||||||
*/
|
|
||||||
generateDialogueView(dialogueID: string, sessionID: string): IGetMailDialogViewResponseData;
|
|
||||||
/**
|
|
||||||
* Get a count of messages with attachments from a particular dialog
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @param dialogueID Dialog id
|
|
||||||
* @returns Count of messages with attachments
|
|
||||||
*/
|
|
||||||
protected getUnreadMessagesWithAttachmentsCount(sessionID: string, dialogueID: string): number;
|
|
||||||
/**
|
|
||||||
* Does array have messages with uncollected rewards (includes expired rewards)
|
|
||||||
* @param messages Messages to check
|
|
||||||
* @returns true if uncollected rewards found
|
|
||||||
*/
|
|
||||||
protected messagesHaveUncollectedRewards(messages: Message[]): boolean;
|
|
||||||
removeDialogue(dialogueID: string, sessionID: string): void;
|
|
||||||
setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void;
|
|
||||||
setRead(dialogueIDs: string[], sessionID: string): void;
|
|
||||||
/**
|
|
||||||
* Get all uncollected items attached to mail in a particular dialog
|
|
||||||
* @param dialogueID Dialog to get mail attachments from
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
|
|
||||||
/**
|
|
||||||
* Get messages from a specific dialog that have items not expired
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param dialogueId Dialog to get mail attachments from
|
|
||||||
* @returns Message array
|
|
||||||
*/
|
|
||||||
protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[];
|
|
||||||
/**
|
|
||||||
* Return array of messages with uncollected items (includes expired)
|
|
||||||
* @param messages Messages to parse
|
|
||||||
* @returns messages with items to collect
|
|
||||||
*/
|
|
||||||
protected getMessagesWithAttachments(messages: Message[]): Message[];
|
|
||||||
/**
|
|
||||||
* Delete expired items. triggers when updating traders.
|
|
||||||
* @param sessionID Session id
|
|
||||||
*/
|
|
||||||
protected removeExpiredItems(sessionID: string): void;
|
|
||||||
}
|
|
@ -1,87 +0,0 @@
|
|||||||
import { ApplicationContext } from "../context/ApplicationContext";
|
|
||||||
import { HideoutHelper } from "../helpers/HideoutHelper";
|
|
||||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
|
||||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
|
||||||
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
|
||||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { OpenZoneService } from "../services/OpenZoneService";
|
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
|
||||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class GameController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected preAkiModLoader: PreAkiModLoader;
|
|
||||||
protected httpServerHelper: HttpServerHelper;
|
|
||||||
protected hideoutHelper: HideoutHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected profileFixerService: ProfileFixerService;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected customLocationWaveService: CustomLocationWaveService;
|
|
||||||
protected openZoneService: OpenZoneService;
|
|
||||||
protected seasonalEventService: SeasonalEventService;
|
|
||||||
protected applicationContext: ApplicationContext;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected httpConfig: IHttpConfig;
|
|
||||||
protected coreConfig: ICoreConfig;
|
|
||||||
protected locationConfig: ILocationConfig;
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
|
||||||
/**
|
|
||||||
* When player logs in, iterate over all active effects and reduce timer
|
|
||||||
* TODO - add body part HP regen
|
|
||||||
* @param pmcProfile
|
|
||||||
*/
|
|
||||||
protected updateProfileHealthValues(pmcProfile: IPmcData): void;
|
|
||||||
/**
|
|
||||||
* Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max
|
|
||||||
*/
|
|
||||||
protected fixBrokenOfflineMapWaves(): void;
|
|
||||||
/**
|
|
||||||
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
|
|
||||||
*/
|
|
||||||
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
|
|
||||||
/**
|
|
||||||
* Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long
|
|
||||||
*/
|
|
||||||
protected splitBotWavesIntoSingleWaves(): void;
|
|
||||||
/**
|
|
||||||
* Get a list of installed mods and save their details to the profile being used
|
|
||||||
* @param fullProfile Profile to add mod details to
|
|
||||||
*/
|
|
||||||
protected saveActiveModsToProfile(fullProfile: IAkiProfile): void;
|
|
||||||
/**
|
|
||||||
* Add the logged in players name to PMC name pool
|
|
||||||
* @param pmcProfile
|
|
||||||
*/
|
|
||||||
protected addPlayerToPMCNames(pmcProfile: IPmcData): void;
|
|
||||||
/**
|
|
||||||
* Blank out the "test" mail message from prapor
|
|
||||||
*/
|
|
||||||
protected removePraporTestMessage(): void;
|
|
||||||
/**
|
|
||||||
* Make non-trigger-spawned raiders spawn earlier + always
|
|
||||||
*/
|
|
||||||
protected adjustLabsRaiderSpawnRate(): void;
|
|
||||||
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
|
||||||
getGameConfig(sessionID: string): IGameConfigResponse;
|
|
||||||
getServer(): IServerDetails[];
|
|
||||||
getCurrentGroup(sessionId: any): any;
|
|
||||||
getValidGameVersion(): ICheckVersionResponse;
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
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 { IWorkoutData } from "../models/eft/health/IWorkoutData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
export declare class HealthController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected paymentService: PaymentService;
|
|
||||||
protected inventoryHelper: InventoryHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected healthHelper: HealthHelper;
|
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, 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, deleteExistingEffects?: boolean): void;
|
|
||||||
/**
|
|
||||||
* When healing in menu
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Consume food/water outside of a raid
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param body request Object
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Occurs on post-raid healing page
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @param healthTreatmentRequest Request data from client
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* applies skills from hideout workout.
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param info Request data
|
|
||||||
* @param sessionID
|
|
||||||
*/
|
|
||||||
applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void;
|
|
||||||
/**
|
|
||||||
* Iterate over treatment request diff and find effects to remove from player limbs
|
|
||||||
* @param sessionId
|
|
||||||
* @param profile Profile to update
|
|
||||||
* @param treatmentRequest client request
|
|
||||||
* @param output response to send to client
|
|
||||||
*/
|
|
||||||
protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData, output: IItemEventRouterResponse): void;
|
|
||||||
}
|
|
@ -1,220 +0,0 @@
|
|||||||
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 { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
|
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
|
||||||
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
|
|
||||||
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 { IQteData } from "../models/eft/hideout/IQteData";
|
|
||||||
import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { FenceService } from "../services/FenceService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PlayerService } from "../services/PlayerService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
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 eventOutputHolder: EventOutputHolder;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected hideoutHelper: HideoutHelper;
|
|
||||||
protected scavCaseRewardGenerator: ScavCaseRewardGenerator;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected fenceService: FenceService;
|
|
||||||
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, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService);
|
|
||||||
/**
|
|
||||||
* Start a hideout area upgrade
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request upgrade start request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Complete a hideout area upgrade
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request Completed upgrade request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutPutItemsInAreaSlots
|
|
||||||
* 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;
|
|
||||||
/**
|
|
||||||
* Remove item from hideout area and place into player inventory
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request Take item out of area request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
takeItemsFromAreaSlots(pmcData: IPmcData, request: 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;
|
|
||||||
/**
|
|
||||||
* Toggle area on/off
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request Toggle area request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
toggleArea(pmcData: IPmcData, request: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Start production for an item from hideout area
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param body Start prodution of single item request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns 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;
|
|
||||||
/**
|
|
||||||
* Adjust scav case time based on fence standing
|
|
||||||
*
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param productionTime Time to complete scav case in seconds
|
|
||||||
* @returns Adjusted scav case time in seconds
|
|
||||||
*/
|
|
||||||
protected getScavCaseTime(pmcData: IPmcData, productionTime: number): number;
|
|
||||||
/**
|
|
||||||
* Add generated scav case rewards to player profile
|
|
||||||
* @param pmcData player profile to add rewards to
|
|
||||||
* @param rewards reward items to add to profile
|
|
||||||
* @param recipieId recipie id to save into Production dict
|
|
||||||
*/
|
|
||||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipieId: string): void;
|
|
||||||
/**
|
|
||||||
* Start production of continuously created item
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request Continious production request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
continuousProductionStart(pmcData: IPmcData, request: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Take completed item out of hideout area and place into player inventory
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request Remove production from area request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
takeProduction(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Take recipie-type production out of hideout area and place into player inventory
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @param recipe Completed recipie of item
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request Remove production from area request
|
|
||||||
* @param output Output object to update
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request Get rewards from scavcase craft request
|
|
||||||
* @param output Output object to update
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Start area production for item
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request Start production request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
registerProduction(pmcData: IPmcData, request: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Get quick time event list for hideout
|
|
||||||
* // TODO - implement this
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @returns IQteData array
|
|
||||||
*/
|
|
||||||
getQteList(sessionId: string): IQteData[];
|
|
||||||
/**
|
|
||||||
* Handle HideoutQuickTimeEvent on client/game/profile/items/moving
|
|
||||||
* Called after completing workout at gym
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param pmcData Profile to adjust
|
|
||||||
* @param request QTE result object
|
|
||||||
*/
|
|
||||||
handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Record a high score from the shooting range into a player profiles overallcounters
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param pmcData Profile to update
|
|
||||||
* @param request shooting range score request
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/items/moving - HideoutImproveArea
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param pmcData profile to improve area in
|
|
||||||
* @param request improve area request data
|
|
||||||
*/
|
|
||||||
improveArea(sessionId: string, pmcData: IPmcData, request: IHideoutImproveAreaRequestData): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Function called every x seconds as part of onUpdate event
|
|
||||||
*/
|
|
||||||
update(): void;
|
|
||||||
}
|
|
@ -1,132 +0,0 @@
|
|||||||
import { ApplicationContext } from "../context/ApplicationContext";
|
|
||||||
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 { Item } from "../models/eft/common/tables/IItem";
|
|
||||||
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 { 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";
|
|
||||||
/**
|
|
||||||
* Logic for handling In Raid callbacks
|
|
||||||
*/
|
|
||||||
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 applicationContext: ApplicationContext;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected airdropConfig: IAirdropConfig;
|
|
||||||
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, applicationContext: ApplicationContext, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Save locationId to active profiles inraid object AND app context
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @param info Register player request
|
|
||||||
*/
|
|
||||||
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
|
||||||
/**
|
|
||||||
* Save profile state to disk
|
|
||||||
* Handles pmc/pscav
|
|
||||||
* @param offraidData post-raid request data
|
|
||||||
* @param sessionID Session id
|
|
||||||
*/
|
|
||||||
savePostRaidProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
|
||||||
/**
|
|
||||||
* Handle updating player profile post-pmc raid
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param offraidData post-raid data
|
|
||||||
*/
|
|
||||||
protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
|
||||||
/**
|
|
||||||
* Make changes to pmc profile after they've died in raid,
|
|
||||||
* Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items
|
|
||||||
* @param postRaidSaveRequest Post-raid save request
|
|
||||||
* @param pmcData Pmc profile
|
|
||||||
* @param insuranceEnabled Is insurance enabled
|
|
||||||
* @param preRaidGear Gear player had before raid
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Updated profile object
|
|
||||||
*/
|
|
||||||
protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData;
|
|
||||||
/**
|
|
||||||
* Adjust player characters bodypart hp post-raid
|
|
||||||
* @param postRaidSaveRequest post raid data
|
|
||||||
* @param pmcData player profile
|
|
||||||
*/
|
|
||||||
protected updatePmcHealthPostRaid(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData): void;
|
|
||||||
/**
|
|
||||||
* Reduce body part hp to % of max
|
|
||||||
* @param pmcData profile to edit
|
|
||||||
* @param multipler multipler to apply to max health
|
|
||||||
*/
|
|
||||||
protected reducePmcHealthToPercent(pmcData: IPmcData, multipler: number): void;
|
|
||||||
/**
|
|
||||||
* Handle updating the profile post-pscav raid
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param offraidData post-raid data of raid
|
|
||||||
*/
|
|
||||||
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
|
||||||
/**
|
|
||||||
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
|
||||||
* @param statusOnExit exit value from offraidData object
|
|
||||||
* @returns true if dead
|
|
||||||
*/
|
|
||||||
protected isPlayerDead(statusOnExit: string): boolean;
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
/**
|
|
||||||
* Update profile after player completes scav raid
|
|
||||||
* @param scavData Scav profile
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @param offraidData Post-raid save request
|
|
||||||
* @param pmcData Pmc profile
|
|
||||||
* @param isDead Is player dead
|
|
||||||
*/
|
|
||||||
protected handlePostRaidPlayerScavProcess(scavData: IPmcData, sessionID: string, offraidData: ISaveProgressRequestData, pmcData: IPmcData, isDead: boolean): void;
|
|
||||||
/**
|
|
||||||
* Update profile with scav karma values based on in-raid actions
|
|
||||||
* @param pmcData Pmc profile
|
|
||||||
* @param offraidData Post-raid save request
|
|
||||||
* @param scavData Scav profile
|
|
||||||
* @param sessionID Session id
|
|
||||||
*/
|
|
||||||
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData, sessionID: string): void;
|
|
||||||
/**
|
|
||||||
* Get the inraid config from configs/inraid.json
|
|
||||||
* @returns InRaid Config
|
|
||||||
*/
|
|
||||||
getInraidConfig(): IInRaidConfig;
|
|
||||||
/**
|
|
||||||
* Get airdrop config from configs/airdrop.json
|
|
||||||
* @returns Airdrop config
|
|
||||||
*/
|
|
||||||
getAirdropConfig(): IAirdropConfig;
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
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 { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
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 eventOutputHolder: EventOutputHolder;
|
|
||||||
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, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, insuranceService: InsuranceService, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Process insurance items prior to being given to player in mail
|
|
||||||
*/
|
|
||||||
processReturn(): void;
|
|
||||||
/**
|
|
||||||
* Add insurance to an item
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param body Insurance request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse object to send to client
|
|
||||||
*/
|
|
||||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Calculate insurance cost
|
|
||||||
* @param info request object
|
|
||||||
* @param sessionID session id
|
|
||||||
* @returns IGetInsuranceCostResponseData object to send to client
|
|
||||||
*/
|
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
|
||||||
}
|
|
@ -1,185 +0,0 @@
|
|||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
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 { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { FenceService } from "../services/FenceService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
export declare class InventoryController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected fenceService: FenceService;
|
|
||||||
protected presetHelper: PresetHelper;
|
|
||||||
protected inventoryHelper: InventoryHelper;
|
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
|
||||||
/**
|
|
||||||
* 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.
|
|
||||||
* @param pmcData Profile
|
|
||||||
* @param moveRequest Move request data
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
moveItem(pmcData: IPmcData, moveRequest: 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;
|
|
||||||
/**
|
|
||||||
* Add a tag to an inventory item
|
|
||||||
* @param pmcData profile with item to add tag to
|
|
||||||
* @param body tag request data
|
|
||||||
* @param sessionID session id
|
|
||||||
* @returns client response object
|
|
||||||
*/
|
|
||||||
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Bind an inventory item to the quick access menu at bottom of player screen
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param bindRequest Reqeust object
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
bindItem(pmcData: IPmcData, bindRequest: 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;
|
|
||||||
/**
|
|
||||||
* Handle ApplyInventoryChanges
|
|
||||||
* Sorts supplied items.
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request sort request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Add note to a map
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request Add marker request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Delete a map marker
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request Delete marker request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Edit an existing map marker
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request Edit marker request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Strip out characters from note string that are not: letter/numbers/unicode/spaces
|
|
||||||
* @param mapNoteText Marker text to sanitise
|
|
||||||
* @returns Sanitised map marker text
|
|
||||||
*/
|
|
||||||
protected sanitiseMapMarkerText(mapNoteText: string): string;
|
|
||||||
/**
|
|
||||||
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
|
|
||||||
* @param pmcData Profile data
|
|
||||||
* @param body open loot container request data
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
import { LocationGenerator } from "../generators/LocationGenerator";
|
|
||||||
import { LootGenerator } from "../generators/LootGenerator";
|
|
||||||
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
|
||||||
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
|
|
||||||
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
|
||||||
import { LootItem } from "../models/spt/services/LootItem";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class LocationController {
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected locationGenerator: LocationGenerator;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected lootGenerator: LootGenerator;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected airdropConfig: IAirdropConfig;
|
|
||||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer);
|
|
||||||
get(location: string): ILocationBase;
|
|
||||||
generate(name: string): ILocationBase;
|
|
||||||
generateAll(): ILocationsGenerateAllResponse;
|
|
||||||
/**
|
|
||||||
* Get loot for an airdop container
|
|
||||||
* Generates it randomly based on config/airdrop.json values
|
|
||||||
* @returns Array of LootItem
|
|
||||||
*/
|
|
||||||
getAirdropLoot(): LootItem[];
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
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 { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
|
||||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
|
||||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
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 { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
|
||||||
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 botGenerationCacheService: BotGenerationCacheService;
|
|
||||||
protected applicationContext: ApplicationContext;
|
|
||||||
protected matchConfig: IMatchConfig;
|
|
||||||
protected inraidConfig: IInRaidConfig;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, 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;
|
|
||||||
/**
|
|
||||||
* Handle /client/raid/configuration
|
|
||||||
* @param request
|
|
||||||
* @param sessionID
|
|
||||||
*/
|
|
||||||
startOfflineRaid(request: IGetRaidConfigurationRequestData, sessionID: string): void;
|
|
||||||
/**
|
|
||||||
* Convert a difficulty value from pre-raid screen to a bot difficulty
|
|
||||||
* @param botDifficulty dropdown difficulty value
|
|
||||||
* @returns bot difficulty
|
|
||||||
*/
|
|
||||||
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
|
|
||||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
export declare class NoteController {
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
constructor(eventOutputHolder: EventOutputHolder);
|
|
||||||
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
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 { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
export declare class PresetBuildController {
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
constructor(hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, saveServer: SaveServer);
|
|
||||||
getUserBuilds(sessionID: string): WeaponBuild[];
|
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
|
||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
|
||||||
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 { 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 { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
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 eventOutputHolder: EventOutputHolder;
|
|
||||||
protected traderHelper: TraderHelper;
|
|
||||||
protected dialogueHelper: DialogueHelper;
|
|
||||||
protected questHelper: QuestHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, 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[];
|
|
||||||
}
|
|
@ -1,136 +0,0 @@
|
|||||||
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 { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
|
||||||
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 { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { LocaleService } from "../services/LocaleService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PlayerService } from "../services/PlayerService";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class QuestController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
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 localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected questConfig: IQuestConfig;
|
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, 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[];
|
|
||||||
/**
|
|
||||||
* Is the quest for the opposite side the player is on
|
|
||||||
* @param side player side (usec/bear)
|
|
||||||
* @param questId questId to check
|
|
||||||
*/
|
|
||||||
protected questIsForOtherSide(side: string, questId: string): boolean;
|
|
||||||
/**
|
|
||||||
* Handle the client accepting a quest and starting it
|
|
||||||
* Send starting rewards if any to player and
|
|
||||||
* Send start notification if any to player
|
|
||||||
* @param pmcData Profile to update
|
|
||||||
* @param acceptedQuest Quest accepted
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns client response
|
|
||||||
*/
|
|
||||||
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle the client accepting a repeatable quest and starting it
|
|
||||||
* Send starting rewards if any to player and
|
|
||||||
* Send start notification if any to player
|
|
||||||
* @param pmcData Profile to update with new quest
|
|
||||||
* @param acceptedQuest Quest being accepted
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Look for an accepted quest inside player profile, return matching
|
|
||||||
* @param pmcData Profile to search through
|
|
||||||
* @param acceptedQuest Quest to search for
|
|
||||||
* @returns IRepeatableQuest
|
|
||||||
*/
|
|
||||||
protected getRepeatableQuestFromProfile(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData): IRepeatableQuest;
|
|
||||||
/**
|
|
||||||
* Update completed quest in 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 client response
|
|
||||||
*/
|
|
||||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Send a popup to player on successful completion of a quest
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param completedQuestId Completed quest id
|
|
||||||
* @param questRewards Rewards given to player
|
|
||||||
*/
|
|
||||||
protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void;
|
|
||||||
/**
|
|
||||||
* Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile
|
|
||||||
* @param pmcData Player profile to update
|
|
||||||
* @param quests Quests to look for wait conditions in
|
|
||||||
* @param completedQuestId Quest just completed
|
|
||||||
*/
|
|
||||||
protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): 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
|
|
||||||
* Update quest in profile, otherwise add fresh quest object with failed status
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @param questsToFail quests to fail
|
|
||||||
*/
|
|
||||||
protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param handoverQuestRequest handover item request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Increment a backend counter stored value by an amount,
|
|
||||||
* Create counter if it does not exist
|
|
||||||
* @param pmcData Profile to find backend counter in
|
|
||||||
* @param conditionId backend counter id to update
|
|
||||||
* @param questId quest id counter is associated with
|
|
||||||
* @param counterValue value to increment the backend counter with
|
|
||||||
*/
|
|
||||||
protected updateProfileBackendCounterValue(pmcData: IPmcData, conditionId: string, questId: string, counterValue: number): void;
|
|
||||||
}
|
|
@ -1,126 +0,0 @@
|
|||||||
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 { TraderHelper } from "../helpers/TraderHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
|
||||||
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
|
||||||
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 { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
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";
|
|
||||||
/**
|
|
||||||
* Handle RagfairCallback events
|
|
||||||
*/
|
|
||||||
export declare class RagfairController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
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 traderHelper: TraderHelper;
|
|
||||||
protected ragfairHelper: RagfairHelper;
|
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
|
||||||
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
|
||||||
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected ragfairConfig: IRagfairConfig;
|
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, 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, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer);
|
|
||||||
getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult;
|
|
||||||
/**
|
|
||||||
* Get offers for the client based on type of search being performed
|
|
||||||
* @param searchRequest Client search request data
|
|
||||||
* @param itemsToAdd
|
|
||||||
* @param traderAssorts Trader assorts
|
|
||||||
* @param pmcProfile Player profile
|
|
||||||
* @returns array of offers
|
|
||||||
*/
|
|
||||||
protected getOffersForSearchType(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
|
||||||
/**
|
|
||||||
* Get categories for the type of search being performed, linked/required/all
|
|
||||||
* @param searchRequest Client search request data
|
|
||||||
* @param offers ragfair offers to get categories for
|
|
||||||
* @returns record with tpls + counts
|
|
||||||
*/
|
|
||||||
protected getSpecificCategories(searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
|
||||||
/**
|
|
||||||
* Add Required offers to offers result
|
|
||||||
* @param searchRequest Client search request data
|
|
||||||
* @param assorts
|
|
||||||
* @param pmcProfile Player profile
|
|
||||||
* @param result Result object being sent back to client
|
|
||||||
*/
|
|
||||||
protected addRequiredOffersToResult(searchRequest: ISearchRequestData, assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData, result: IGetOffersResult): void;
|
|
||||||
/**
|
|
||||||
* Add index to all offers passed in (0-indexed)
|
|
||||||
* @param offers Offers to add index value to
|
|
||||||
*/
|
|
||||||
protected addIndexValueToOffers(offers: IRagfairOffer[]): void;
|
|
||||||
/**
|
|
||||||
* Update a trader flea offer with buy restrictions stored in the traders assort
|
|
||||||
* @param offer flea offer to update
|
|
||||||
* @param profile full profile of player
|
|
||||||
*/
|
|
||||||
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, profile: IAkiProfile): void;
|
|
||||||
/**
|
|
||||||
* Adjust ragfair offer stack count to match same value as traders assort stack count
|
|
||||||
* @param offer Flea offer to adjust
|
|
||||||
*/
|
|
||||||
protected setTraderOfferStackSize(offer: IRagfairOffer): void;
|
|
||||||
protected isLinkedSearch(info: ISearchRequestData): boolean;
|
|
||||||
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
|
||||||
update(): void;
|
|
||||||
/**
|
|
||||||
* Called when creating an offer on flea, fills values in top right corner
|
|
||||||
* @param getPriceRequest
|
|
||||||
* @returns min/avg/max values for an item based on flea offers available
|
|
||||||
*/
|
|
||||||
getItemMinAvgMaxFleaPriceValues(getPriceRequest: 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>;
|
|
||||||
getStaticPrices(): Record<string, number>;
|
|
||||||
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
|
|
||||||
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
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 { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
|
||||||
import { RepairService } from "../services/RepairService";
|
|
||||||
export declare class RepairController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected questHelper: QuestHelper;
|
|
||||||
protected traderHelper: TraderHelper;
|
|
||||||
protected paymentService: PaymentService;
|
|
||||||
protected repairHelper: RepairHelper;
|
|
||||||
protected repairService: RepairService;
|
|
||||||
protected repairConfig: IRepairConfig;
|
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService);
|
|
||||||
/**
|
|
||||||
* Repair with trader
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param body endpoint request data
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @returns item event router action
|
|
||||||
*/
|
|
||||||
traderRepair(sessionID: string, body: ITraderRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Repair with repair kit
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param body endpoint request data
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @returns item event router action
|
|
||||||
*/
|
|
||||||
repairWithKit(sessionID: string, body: IRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,264 +0,0 @@
|
|||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
|
||||||
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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
|
||||||
import { ELocationName } from "../models/enums/ELocationName";
|
|
||||||
import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
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 httpResponse: HttpResponseUtil;
|
|
||||||
protected mathUtil: MathUtil;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected presetHelper: PresetHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected profileFixerService: ProfileFixerService;
|
|
||||||
protected handbookHelper: HandbookHelper;
|
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected paymentService: PaymentService;
|
|
||||||
protected objectId: ObjectId;
|
|
||||||
protected itemFilterService: ItemFilterService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected questConfig: IQuestConfig;
|
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, handbookHelper: HandbookHelper, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, 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[];
|
|
||||||
/**
|
|
||||||
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
|
||||||
* @param repeatableConfig daily/weekly config
|
|
||||||
* @param pmcData Profile to search
|
|
||||||
* @returns IPmcDataRepeatableQuest
|
|
||||||
*/
|
|
||||||
protected getRepeatableQuestSubTypeFromProfile(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): 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: number): 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
|
|
||||||
* @param {string} side scav daily or pmc daily/weekly quest
|
|
||||||
* @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, side: 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;
|
|
||||||
/**
|
|
||||||
* Get the relevant elimination config based on the current players PMC level
|
|
||||||
* @param pmcLevel Level of PMC character
|
|
||||||
* @param repeatableConfig Main repeatable config
|
|
||||||
* @returns IEliminationConfig
|
|
||||||
*/
|
|
||||||
protected getEliminationConfigByPmcLevel(pmcLevel: number, repeatableConfig: IRepeatableQuestConfig): IEliminationConfig;
|
|
||||||
/**
|
|
||||||
* Convert a location into an quest code can read (e.g. factory4_day into 55f2d3fd4bdc2d5f408b4567)
|
|
||||||
* @param locationKey e.g factory4_day
|
|
||||||
* @returns guid
|
|
||||||
*/
|
|
||||||
protected getQuestLocationByMapId(locationKey: string): string;
|
|
||||||
/**
|
|
||||||
* 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.
|
|
||||||
* @param repeatableConfig main repeatable quest config
|
|
||||||
* @param pmcLevel level of pmc generating quest pool
|
|
||||||
* @returns IQuestTypePool
|
|
||||||
*/
|
|
||||||
generateQuestPool(repeatableConfig: IRepeatableQuestConfig, pmcLevel: number): 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(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
|
||||||
* @param repeatableQuestConfig config file
|
|
||||||
* @returns a list of rewardable items [[_tpl, itemTemplate],...]
|
|
||||||
*/
|
|
||||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig): [string, ITemplateItem][];
|
|
||||||
/**
|
|
||||||
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
|
|
||||||
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
|
||||||
* @param {string} tpl template id of item to check
|
|
||||||
* @returns boolean: true if item is valid reward
|
|
||||||
*/
|
|
||||||
isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { TradeHelper } from "../helpers/TradeHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { Upd } from "../models/eft/common/tables/IItem";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
|
||||||
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
|
||||||
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
declare class TradeController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected tradeHelper: TradeHelper;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected ragfairServer: RagfairServer;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected ragfairConfig: IRagfairConfig;
|
|
||||||
protected traderConfig: ITraderConfig;
|
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
|
||||||
confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
|
||||||
}
|
|
||||||
export { TradeController };
|
|
@ -1,52 +0,0 @@
|
|||||||
import { FenceBaseAssortGenerator } from "../generators/FenceBaseAssortGenerator";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
|
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
|
||||||
import { ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { FenceService } from "../services/FenceService";
|
|
||||||
import { TraderAssortService } from "../services/TraderAssortService";
|
|
||||||
import { TraderPurchasePersisterService } from "../services/TraderPurchasePersisterService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
export declare class TraderController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected traderAssortHelper: TraderAssortHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected traderHelper: TraderHelper;
|
|
||||||
protected traderAssortService: TraderAssortService;
|
|
||||||
protected traderPurchasePersisterService: TraderPurchasePersisterService;
|
|
||||||
protected fenceService: FenceService;
|
|
||||||
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, 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
|
|
||||||
* Fence is handled slightly differently
|
|
||||||
* @returns has run
|
|
||||||
*/
|
|
||||||
update(): boolean;
|
|
||||||
/**
|
|
||||||
* Return an array of all traders
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns array if ITraderBase objects
|
|
||||||
*/
|
|
||||||
getAllTraders(sessionID: string): ITraderBase[];
|
|
||||||
/**
|
|
||||||
* Order traders by their traderId (Ttid)
|
|
||||||
* @param traderA First trader to compare
|
|
||||||
* @param traderB Second trader to compare
|
|
||||||
* @returns 1,-1 or 0
|
|
||||||
*/
|
|
||||||
protected sortByTraderId(traderA: ITraderBase, traderB: ITraderBase): number;
|
|
||||||
getTrader(sessionID: string, traderID: string): ITraderBase;
|
|
||||||
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
|
||||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
|
||||||
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
export declare class WeatherController {
|
|
||||||
protected weatherGenerator: WeatherGenerator;
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected weatherConfig: IWeatherConfig;
|
|
||||||
constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer);
|
|
||||||
generate(): IWeatherData;
|
|
||||||
/**
|
|
||||||
* Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK)
|
|
||||||
* @returns Date object
|
|
||||||
*/
|
|
||||||
getCurrentInRaidTime(): Date;
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
|
||||||
export declare class WishlistController {
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
constructor(eventOutputHolder: EventOutputHolder);
|
|
||||||
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
|
||||||
/**
|
|
||||||
* Handle the registration of classes to be used by the Dependency Injection code
|
|
||||||
*/
|
|
||||||
export declare class Container {
|
|
||||||
static registerPostLoadTypes(container: DependencyContainer, childContainer: DependencyContainer): void;
|
|
||||||
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;
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
export interface OnLoad {
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
export interface OnUpdate {
|
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
40
Live/CWX_MasterKey/server/types/di/Router.d.ts
vendored
40
Live/CWX_MasterKey/server/types/di/Router.d.ts
vendored
@ -1,40 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
/// <reference types="node" />
|
|
||||||
import { IncomingMessage, ServerResponse } from "http";
|
|
||||||
export declare class Serializer {
|
|
||||||
serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void;
|
|
||||||
canHandle(something: string): boolean;
|
|
||||||
}
|
|
@ -1,202 +0,0 @@
|
|||||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
|
||||||
import { BotHelper } from "../helpers/BotHelper";
|
|
||||||
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { ProbabilityHelper } from "../helpers/ProbabilityHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
|
||||||
import { ITemplateItem, Slot } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { EquipmentFilterDetails, 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 { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
|
||||||
import { BotModLimits, BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
|
||||||
import { ItemBaseClassService } from "../services/ItemBaseClassService";
|
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
export declare class BotEquipmentModGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected probabilityHelper: ProbabilityHelper;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
|
||||||
protected itemBaseClassService: ItemBaseClassService;
|
|
||||||
protected itemFilterService: ItemFilterService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected botWeaponModLimitService: BotWeaponModLimitService;
|
|
||||||
protected botHelper: BotHelper;
|
|
||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Check mods are compatible and add to array
|
|
||||||
* @param equipment Equipment item to add mods to
|
|
||||||
* @param modPool Mod list to choose frm
|
|
||||||
* @param parentId parentid of item to add mod to
|
|
||||||
* @param parentTemplate template objet of item to add mods to
|
|
||||||
* @param modSpawnChances dictionary of mod items and their chance to spawn for this bot type
|
|
||||||
* @param botRole the bot role being generated for
|
|
||||||
* @param forceSpawn should this mod be forced to spawn
|
|
||||||
* @returns Item + compatible mods as an array
|
|
||||||
*/
|
|
||||||
generateModsForEquipment(equipment: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, botRole: string, forceSpawn?: boolean): Item[];
|
|
||||||
/**
|
|
||||||
* Add mods to a weapon using the provided mod pool
|
|
||||||
* @param sessionId session id
|
|
||||||
* @param weapon Weapon to add mods to
|
|
||||||
* @param modPool Pool of compatible mods to attach to weapon
|
|
||||||
* @param weaponParentId parentId of weapon
|
|
||||||
* @param parentTemplate Weapon which mods will be generated on
|
|
||||||
* @param modSpawnChances Mod spawn chances
|
|
||||||
* @param ammoTpl Ammo tpl to use when generating magazines/cartridges
|
|
||||||
* @param botRole Role of bot weapon is generated for
|
|
||||||
* @param botLevel lvel of the bot weapon is being generated for
|
|
||||||
* @param modLimits limits placed on certian mod types per gun
|
|
||||||
* @param botEquipmentRole role of bot when accessing bot.json equipment config settings
|
|
||||||
* @returns Weapon + mods array
|
|
||||||
*/
|
|
||||||
generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponParentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string, botLevel: number, modLimits: BotModLimits, botEquipmentRole: string): Item[];
|
|
||||||
/**
|
|
||||||
* Is this modslot a front or rear sight
|
|
||||||
* @param modSlot Slot to check
|
|
||||||
* @returns true if it's a front/rear sight
|
|
||||||
*/
|
|
||||||
protected modIsFrontOrRearSight(modSlot: string): boolean;
|
|
||||||
/**
|
|
||||||
* Does the provided mod details show the mod can hold a scope
|
|
||||||
* @param modSlot e.g. mod_scope, mod_mount
|
|
||||||
* @param modsParentId Parent id of mod item
|
|
||||||
* @returns true if it can hold a scope
|
|
||||||
*/
|
|
||||||
protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean;
|
|
||||||
/**
|
|
||||||
* Set all scope mod chances to 100%
|
|
||||||
* @param modSpawnChances Chances objet to update
|
|
||||||
*/
|
|
||||||
protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void;
|
|
||||||
protected sortModKeys(unsortedKeys: string[]): string[];
|
|
||||||
/**
|
|
||||||
* Get a Slot property for an item (chamber/cartridge/slot)
|
|
||||||
* @param modSlot e.g patron_in_weapon
|
|
||||||
* @param parentTemplate item template
|
|
||||||
* @returns Slot item
|
|
||||||
*/
|
|
||||||
protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot;
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param modSlot Slot mod will fit into
|
|
||||||
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
|
||||||
* @param modsParent Parent slot the item will be a part of
|
|
||||||
* @param botEquipBlacklist Blacklist to prevent mods from being picked
|
|
||||||
* @param itemModPool Pool of items to pick from
|
|
||||||
* @param weapon array with only weapon tpl in it, ready for mods to be added
|
|
||||||
* @param ammoTpl ammo tpl to use if slot requires a cartridge to be added (e.g. mod_magazine)
|
|
||||||
* @param parentTemplate Parent item the mod will go into
|
|
||||||
* @returns ITemplateItem
|
|
||||||
*/
|
|
||||||
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem];
|
|
||||||
/**
|
|
||||||
* Create a mod item with parameters as properties
|
|
||||||
* @param modId _id
|
|
||||||
* @param modTpl _tpl
|
|
||||||
* @param parentId parentId
|
|
||||||
* @param modSlot slotId
|
|
||||||
* @param modTemplate Used to add additional properites in the upd object
|
|
||||||
* @returns Item object
|
|
||||||
*/
|
|
||||||
protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item;
|
|
||||||
/**
|
|
||||||
* Get a list of containers that hold ammo
|
|
||||||
* e.g. mod_magazine / patron_in_weapon_000
|
|
||||||
* @returns string array
|
|
||||||
*/
|
|
||||||
protected getAmmoContainers(): string[];
|
|
||||||
/**
|
|
||||||
* Get a random mod from an items compatible mods Filter array
|
|
||||||
* @param modTpl ???? default value to return if nothing found
|
|
||||||
* @param parentSlot item mod will go into, used to get combatible items
|
|
||||||
* @param modSlot Slot to get mod to fill
|
|
||||||
* @param items items to ensure picked mod is compatible with
|
|
||||||
* @returns item tpl
|
|
||||||
*/
|
|
||||||
protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
|
|
||||||
/**
|
|
||||||
* Log errors if mod is not compatible with slot
|
|
||||||
* @param modToAdd template of mod to check
|
|
||||||
* @param itemSlot slot the item will be placed in
|
|
||||||
* @param modSlot slot the mod will fill
|
|
||||||
* @param parentTemplate template of the mods parent item
|
|
||||||
* @returns true if valid
|
|
||||||
*/
|
|
||||||
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean;
|
|
||||||
/**
|
|
||||||
* Find mod tpls of a provided type and add to modPool
|
|
||||||
* @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope)
|
|
||||||
* @param modTemplate db object for modItem we get compatible mods from
|
|
||||||
* @param modPool Pool of mods we are adding to
|
|
||||||
*/
|
|
||||||
protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void;
|
|
||||||
/**
|
|
||||||
* Get the possible items that fit a slot
|
|
||||||
* @param parentItemId item tpl to get compatible items for
|
|
||||||
* @param modSlot Slot item should fit in
|
|
||||||
* @param botEquipBlacklist equipment that should not be picked
|
|
||||||
* @returns array of compatible items for that slot
|
|
||||||
*/
|
|
||||||
protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[];
|
|
||||||
/**
|
|
||||||
* Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist
|
|
||||||
* @param allowedMods base mods to filter
|
|
||||||
* @param botEquipBlacklist equipment blacklist
|
|
||||||
* @param modSlot slot mods belong to
|
|
||||||
* @returns Filtered array of mod tpls
|
|
||||||
*/
|
|
||||||
protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[];
|
|
||||||
/**
|
|
||||||
* 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 items The items where the CylinderMagazine's camora are appended to
|
|
||||||
* @param modPool modPool which should include available cartrigdes
|
|
||||||
* @param parentId The CylinderMagazine's UID
|
|
||||||
* @param 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[];
|
|
||||||
/**
|
|
||||||
* Filter out non-whitelisted weapon scopes
|
|
||||||
* @param weapon Weapon scopes will be added to
|
|
||||||
* @param scopes Full scope pool
|
|
||||||
* @param botWeaponSightWhitelist whitelist of scope types by weapon base type
|
|
||||||
* @returns array of scope tpls that have been filtered
|
|
||||||
*/
|
|
||||||
protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record<string, string[]>): string[];
|
|
||||||
}
|
|
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