forked from CWX/CWX-mods
update for 3.5.1
This commit is contained in:
parent
c05265e6bc
commit
906d96a22d
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,6 +5,9 @@ bin/
|
|||||||
obj/
|
obj/
|
||||||
*.editorconfig
|
*.editorconfig
|
||||||
|
|
||||||
|
## Rider
|
||||||
|
.idea
|
||||||
|
|
||||||
## visual studio
|
## visual studio
|
||||||
.vs
|
.vs
|
||||||
.idea
|
.idea
|
||||||
|
@ -5,7 +5,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace CWX_BushWhacker
|
namespace CWX_BushWhacker
|
||||||
{
|
{
|
||||||
[BepInPlugin("com.cwx.bushwhacker", "cwx-bushwhacker", "1.2.9")]
|
[BepInPlugin("com.cwx.bushwhacker", "cwx-bushwhacker", "1.3.0")]
|
||||||
public class BushWhacker : BaseUnityPlugin
|
public class BushWhacker : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
public void Start()
|
public void Start()
|
||||||
|
Binary file not shown.
@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<AssemblyName>CWX-BushWhacker</AssemblyName>
|
<AssemblyName>CWX-BushWhacker</AssemblyName>
|
||||||
<Version>1.2.9</Version>
|
<Version>1.3.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
using System.Reflection;
|
// using System.Reflection;
|
||||||
using System;
|
// using System;
|
||||||
using System.Collections.Generic;
|
// using System.Collections.Generic;
|
||||||
using System.Linq;
|
// using System.Linq;
|
||||||
using Aki.Reflection.Patching;
|
// using Aki.Reflection.Patching;
|
||||||
using Aki.Reflection.Utils;
|
// using Aki.Reflection.Utils;
|
||||||
using BepInEx;
|
// using BepInEx;
|
||||||
using EFT;
|
// using EFT;
|
||||||
using Comfort.Common;
|
// using Comfort.Common;
|
||||||
using JsonType;
|
// using JsonType;
|
||||||
using UnityEngine;
|
// using UnityEngine;
|
||||||
|
//
|
||||||
namespace CWX_ColourAdderPatcher
|
// namespace CWX_ColourAdderPatcher
|
||||||
{
|
// {
|
||||||
[BepInPlugin("com.cwx.ColourAdder", "cwx-ColourAdder", "1.0.0")]
|
// [BepInPlugin("com.cwx.ColourAdder", "cwx-ColourAdder", "1.0.0")]
|
||||||
public class ColourAdderPatcher : BaseUnityPlugin
|
// public class ColourAdderPatcher : BaseUnityPlugin
|
||||||
{
|
// {
|
||||||
public void Start()
|
// public void Start()
|
||||||
{
|
// {
|
||||||
var type = PatchConstants.EftTypes.Single(x => x.Name == "GClass1179")
|
// var type = PatchConstants.EftTypes.Single(x => x.Name == "GClass1179")
|
||||||
.GetField("dictionary_0");
|
// .GetField("dictionary_0");
|
||||||
// get field with name of dictionary_0 add custom
|
// // get field with name of dictionary_0 add custom
|
||||||
// dictionary.Add(TaxonomyColor.yellow, new Color32(104, 102, 40, byte.MaxValue));
|
// // dictionary.Add(TaxonomyColor.yellow, new Color32(104, 102, 40, byte.MaxValue));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
Binary file not shown.
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<Version>1.4.9</Version>
|
<Version>1.5.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.4.9")]
|
[BepInPlugin("com.CWX.DeSharpener", "CWX-DeSharpener", "1.5.0")]
|
||||||
public class DeSharpener : BaseUnityPlugin
|
public class DeSharpener : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1,23 +1,23 @@
|
|||||||
{
|
{
|
||||||
"name": "MasterKey",
|
"name": "MasterKey",
|
||||||
"author": "CWX",
|
"author": "CWX",
|
||||||
"version": "1.4.1",
|
"version": "1.4.2",
|
||||||
"license": "NCSA",
|
"license": "NCSA",
|
||||||
"main": "src/mod.js",
|
"main": "src/mod.js",
|
||||||
"akiVersion": "3.5.0",
|
"akiVersion": "3.5.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"setup": "npm i",
|
"setup": "npm i",
|
||||||
"build": "node ./packageBuild.ts"
|
"build": "node ./packageBuild.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "16.11.62",
|
"@types/node": "16.18.10",
|
||||||
"@typescript-eslint/eslint-plugin": "5.38.1",
|
"@typescript-eslint/eslint-plugin": "5.46.1",
|
||||||
"@typescript-eslint/parser": "5.38.1",
|
"@typescript-eslint/parser": "5.46.1",
|
||||||
"bestzip": "2.2.1",
|
"bestzip": "2.2.1",
|
||||||
"eslint": "8.24.0",
|
"eslint": "8.30.0",
|
||||||
"fs-extra": "10.1.0",
|
"fs-extra": "11.1.0",
|
||||||
"glob": "8.0.3",
|
"glob": "8.0.3",
|
||||||
"tsyringe": "4.7.0",
|
"tsyringe": "4.7.0",
|
||||||
"typescript": "4.8.4"
|
"typescript": "4.9.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<AssemblyName>CWX-MasterKey</AssemblyName>
|
<AssemblyName>CWX-MasterKey</AssemblyName>
|
||||||
<Version>1.4.1</Version>
|
<Version>1.4.2</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace CWX_MasterKey
|
namespace CWX_MasterKey
|
||||||
{
|
{
|
||||||
[BepInPlugin("com.CWX.MasterKey", "CWX-MasterKey", "1.4.1")]
|
[BepInPlugin("com.CWX.MasterKey", "CWX-MasterKey", "1.4.2")]
|
||||||
public class MasterKey : BaseUnityPlugin
|
public class MasterKey : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
16
Live/CWX_MasterKey/server/dist/package.json
vendored
16
Live/CWX_MasterKey/server/dist/package.json
vendored
@ -1,23 +1,23 @@
|
|||||||
{
|
{
|
||||||
"name": "MasterKey",
|
"name": "MasterKey",
|
||||||
"author": "CWX",
|
"author": "CWX",
|
||||||
"version": "1.4.1",
|
"version": "1.4.2",
|
||||||
"license": "NCSA",
|
"license": "NCSA",
|
||||||
"main": "src/mod.js",
|
"main": "src/mod.js",
|
||||||
"akiVersion": "3.5.0",
|
"akiVersion": "3.5.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"setup": "npm i",
|
"setup": "npm i",
|
||||||
"build": "node ./packageBuild.ts"
|
"build": "node ./packageBuild.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "16.11.62",
|
"@types/node": "16.18.10",
|
||||||
"@typescript-eslint/eslint-plugin": "5.38.1",
|
"@typescript-eslint/eslint-plugin": "5.46.1",
|
||||||
"@typescript-eslint/parser": "5.38.1",
|
"@typescript-eslint/parser": "5.46.1",
|
||||||
"bestzip": "2.2.1",
|
"bestzip": "2.2.1",
|
||||||
"eslint": "8.24.0",
|
"eslint": "8.30.0",
|
||||||
"fs-extra": "10.1.0",
|
"fs-extra": "11.1.0",
|
||||||
"glob": "8.0.3",
|
"glob": "8.0.3",
|
||||||
"tsyringe": "4.7.0",
|
"tsyringe": "4.7.0",
|
||||||
"typescript": "4.8.4"
|
"typescript": "4.9.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
{
|
{
|
||||||
"name": "MasterKey",
|
"name": "MasterKey",
|
||||||
"author": "CWX",
|
"author": "CWX",
|
||||||
"version": "1.4.1",
|
"version": "1.4.2",
|
||||||
"license": "NCSA",
|
"license": "NCSA",
|
||||||
"main": "src/mod.js",
|
"main": "src/mod.js",
|
||||||
"akiVersion": "3.5.0",
|
"akiVersion": "3.5.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"setup": "npm i",
|
"setup": "npm i",
|
||||||
"build": "node ./packageBuild.ts"
|
"build": "node ./packageBuild.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "16.11.62",
|
"@types/node": "16.18.10",
|
||||||
"@typescript-eslint/eslint-plugin": "5.38.1",
|
"@typescript-eslint/eslint-plugin": "5.46.1",
|
||||||
"@typescript-eslint/parser": "5.38.1",
|
"@typescript-eslint/parser": "5.46.1",
|
||||||
"bestzip": "2.2.1",
|
"bestzip": "2.2.1",
|
||||||
"eslint": "8.24.0",
|
"eslint": "8.30.0",
|
||||||
"fs-extra": "10.1.0",
|
"fs-extra": "11.1.0",
|
||||||
"glob": "8.0.3",
|
"glob": "8.0.3",
|
||||||
"tsyringe": "4.7.0",
|
"tsyringe": "4.7.0",
|
||||||
"typescript": "4.8.4"
|
"typescript": "4.9.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ declare class GameCallbacks {
|
|||||||
*/
|
*/
|
||||||
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
|
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
|
||||||
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
|
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>;
|
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/keepalive
|
* Handle client/game/keepalive
|
||||||
|
@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
|
|||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
||||||
import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData";
|
import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData";
|
||||||
|
import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest";
|
||||||
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
|
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
|
||||||
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
|
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
|
||||||
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
|
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
|
||||||
@ -64,6 +65,7 @@ export declare class ProfileCallbacks {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
|
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[]>;
|
searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData<ISearchFriendResponse[]>;
|
||||||
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
|
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
|
||||||
getAllMiniProfiles(url: string, info: any, sessionID: string): string;
|
getAllMiniProfiles(url: string, info: any, sessionID: string): string;
|
||||||
|
@ -2,7 +2,7 @@ import { OnLoad } from "../di/OnLoad";
|
|||||||
import { OnUpdate } from "../di/OnUpdate";
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
import { TraderController } from "../controllers/TraderController";
|
import { TraderController } from "../controllers/TraderController";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
import { ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class TraderCallbacks implements OnLoad, OnUpdate {
|
export declare class TraderCallbacks implements OnLoad, OnUpdate {
|
||||||
@ -13,11 +13,6 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate {
|
|||||||
onUpdate(): Promise<boolean>;
|
onUpdate(): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
||||||
/**
|
|
||||||
* Handle client/trading/api/getUserAssortPrice/trader
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getProfilePurchases(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, IBarterScheme[][]>>;
|
|
||||||
getTrader(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>;
|
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,8 @@ export declare class ApplicationContext {
|
|||||||
*
|
*
|
||||||
* const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue<IRegisterPlayerRequestData>();
|
* 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>();
|
* const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue<IStartOfflineRaidRequestData>();
|
||||||
* @param type
|
* @param type
|
||||||
* @returns
|
* @returns
|
||||||
|
@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService";
|
|||||||
import { OpenZoneService } from "../services/OpenZoneService";
|
import { OpenZoneService } from "../services/OpenZoneService";
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class GameController {
|
export declare class GameController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected preAkiModLoader: PreAkiModLoader;
|
protected preAkiModLoader: PreAkiModLoader;
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
@ -39,7 +41,7 @@ export declare class GameController {
|
|||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
protected coreConfig: ICoreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
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;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
/**
|
/**
|
||||||
* When player logs in, iterate over all active effects and reduce timer
|
* When player logs in, iterate over all active effects and reduce timer
|
||||||
@ -55,6 +57,10 @@ export declare class GameController {
|
|||||||
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
|
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
|
||||||
*/
|
*/
|
||||||
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
|
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
|
* Get a list of installed mods and save their details to the profile being used
|
||||||
* @param fullProfile Profile to add mod details to
|
* @param fullProfile Profile to add mod details to
|
||||||
@ -76,5 +82,6 @@ export declare class GameController {
|
|||||||
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
||||||
getGameConfig(sessionID: string): IGameConfigResponse;
|
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||||
getServer(): IServerDetails[];
|
getServer(): IServerDetails[];
|
||||||
|
getCurrentGroup(sessionId: any): any;
|
||||||
getValidGameVersion(): ICheckVersionResponse;
|
getValidGameVersion(): ICheckVersionResponse;
|
||||||
}
|
}
|
||||||
|
@ -61,18 +61,18 @@ export declare class InraidController {
|
|||||||
*/
|
*/
|
||||||
protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
||||||
/**
|
/**
|
||||||
* Make changes to pmc profile after they left raid dead,
|
* Make changes to pmc profile after they've died in raid,
|
||||||
* alter bodypart hp, handle insurance, delete inventory items, remove carried quest items
|
* Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items
|
||||||
* @param postRaidSaveRequest post-raid save request
|
* @param postRaidSaveRequest Post-raid save request
|
||||||
* @param pmcData pmc profile
|
* @param pmcData Pmc profile
|
||||||
* @param insuranceEnabled is insurance enabled
|
* @param insuranceEnabled Is insurance enabled
|
||||||
* @param preRaidGear gear player had before raid
|
* @param preRaidGear Gear player had before raid
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns Updated profile object
|
* @returns Updated profile object
|
||||||
*/
|
*/
|
||||||
protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData;
|
protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData;
|
||||||
/**
|
/**
|
||||||
* Adjust player characters bodypart hp if they left raid early
|
* Adjust player characters bodypart hp post-raid
|
||||||
* @param postRaidSaveRequest post raid data
|
* @param postRaidSaveRequest post raid data
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
*/
|
*/
|
||||||
|
@ -112,7 +112,14 @@ export declare class InventoryController {
|
|||||||
* @returns client response object
|
* @returns client response object
|
||||||
*/
|
*/
|
||||||
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, 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
|
* Handles examining an item
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
@ -137,9 +144,36 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
/**
|
||||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
* Add note to a map
|
||||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
* @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)
|
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
|
||||||
* @param pmcData Profile data
|
* @param pmcData Profile data
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||||
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
@ -11,6 +12,7 @@ import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateR
|
|||||||
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
|
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
|
||||||
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
|
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
|
||||||
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
@ -24,10 +26,12 @@ export declare class ProfileController {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, questHelper: QuestHelper, 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[];
|
getMiniProfiles(): IMiniProfile[];
|
||||||
getMiniProfile(sessionID: string): any;
|
getMiniProfile(sessionID: string): any;
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
getCompleteProfile(sessionID: string): IPmcData[];
|
||||||
|
@ -60,13 +60,6 @@ export declare class QuestController {
|
|||||||
* @returns client response
|
* @returns client response
|
||||||
*/
|
*/
|
||||||
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Get a quests startedMessageText key from db, if no startedMessageText key found, use description key instead
|
|
||||||
* @param startedMessageTextId startedMessageText property from IQuest
|
|
||||||
* @param questDescriptionId description property from IQuest
|
|
||||||
* @returns message id
|
|
||||||
*/
|
|
||||||
protected getMessageIdForQuestStart(startedMessageTextId: string, questDescriptionId: string): string;
|
|
||||||
/**
|
/**
|
||||||
* Handle the client accepting a repeatable quest and starting it
|
* Handle the client accepting a repeatable quest and starting it
|
||||||
* Send starting rewards if any to player and
|
* Send starting rewards if any to player and
|
||||||
@ -123,7 +116,14 @@ export declare class QuestController {
|
|||||||
* @param questsToFail quests to fail
|
* @param questsToFail quests to fail
|
||||||
*/
|
*/
|
||||||
protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void;
|
protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void;
|
||||||
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
/**
|
||||||
|
*
|
||||||
|
* @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,
|
* Increment a backend counter stored value by an amount,
|
||||||
* Create counter if it does not exist
|
* Create counter if it does not exist
|
||||||
|
@ -12,7 +12,7 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
||||||
import { ELocationName } from "../models/enums/ELocationName";
|
import { ELocationName } from "../models/enums/ELocationName";
|
||||||
import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
|
import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -159,7 +159,14 @@ export declare class RepeatableQuestController {
|
|||||||
*/
|
*/
|
||||||
generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
|
generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
|
||||||
/**
|
/**
|
||||||
* Cpnvert a location into an quest code can read (e.g. factory4_day into 55f2d3fd4bdc2d5f408b4567)
|
* 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
|
* @param locationKey e.g factory4_day
|
||||||
* @returns guid
|
* @returns guid
|
||||||
*/
|
*/
|
||||||
@ -203,10 +210,11 @@ export declare class RepeatableQuestController {
|
|||||||
* Used to create a quest pool during each cycle of repeatable quest generation. The pool will be subsequently
|
* 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
|
* 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.
|
* where you have to e.g. kill scavs in same locations.
|
||||||
*
|
* @param repeatableConfig main repeatable quest config
|
||||||
* @returns {object} the quest pool
|
* @param pmcLevel level of pmc generating quest pool
|
||||||
|
* @returns IQuestTypePool
|
||||||
*/
|
*/
|
||||||
generateQuestPool(repeatableConfig: IRepeatableQuestConfig): IQuestTypePool;
|
generateQuestPool(repeatableConfig: IRepeatableQuestConfig, pmcLevel: number): IQuestTypePool;
|
||||||
/**
|
/**
|
||||||
* Generate the reward for a mission. A reward can consist of
|
* Generate the reward for a mission. A reward can consist of
|
||||||
* - Experience
|
* - Experience
|
||||||
|
@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
||||||
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
|
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -24,8 +25,10 @@ declare class TradeController {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
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);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, 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 };
|
export { TradeController };
|
||||||
|
@ -2,27 +2,25 @@ import { FenceBaseAssortGenerator } from "../generators/FenceBaseAssortGenerator
|
|||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
|
import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
import { ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { FenceService } from "../services/FenceService";
|
import { FenceService } from "../services/FenceService";
|
||||||
import { TraderAssortService } from "../services/TraderAssortService";
|
import { TraderAssortService } from "../services/TraderAssortService";
|
||||||
import { TraderPurchasePersisterService } from "../services/TraderPurchasePersisterService";
|
import { TraderPurchasePersisterService } from "../services/TraderPurchasePersisterService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class TraderController {
|
export declare class TraderController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected traderAssortHelper: TraderAssortHelper;
|
protected traderAssortHelper: TraderAssortHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected traderAssortService: TraderAssortService;
|
protected traderAssortService: TraderAssortService;
|
||||||
protected traderPurchasePersisterService: TraderPurchasePersisterService;
|
protected traderPurchasePersisterService: TraderPurchasePersisterService;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
|
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, 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
|
* Runs when onLoad event is fired
|
||||||
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService
|
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService
|
||||||
@ -42,7 +40,13 @@ export declare class TraderController {
|
|||||||
* @returns array if ITraderBase objects
|
* @returns array if ITraderBase objects
|
||||||
*/
|
*/
|
||||||
getAllTraders(sessionID: string): ITraderBase[];
|
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;
|
getTrader(sessionID: string, traderID: string): ITraderBase;
|
||||||
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
||||||
getPurchasesData(sessionID: string, traderID: string): Record<string, IBarterScheme[][]>;
|
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||||
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
||||||
import { BotModLimits, BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
import { BotModLimits, BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
||||||
|
import { ItemBaseClassService } from "../services/ItemBaseClassService";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
@ -28,6 +29,7 @@ export declare class BotEquipmentModGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||||
|
protected itemBaseClassService: ItemBaseClassService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected botWeaponModLimitService: BotWeaponModLimitService;
|
protected botWeaponModLimitService: BotWeaponModLimitService;
|
||||||
@ -38,7 +40,7 @@ export declare class BotEquipmentModGenerator {
|
|||||||
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer);
|
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
|
* Check mods are compatible and add to array
|
||||||
* @param equipment Equipment item to add mods to
|
* @param equipment Equipment item to add mods to
|
||||||
|
@ -14,12 +14,14 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
|
|||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
import { BotInventoryGenerator } from "./BotInventoryGenerator";
|
import { BotInventoryGenerator } from "./BotInventoryGenerator";
|
||||||
import { BotLevelGenerator } from "./BotLevelGenerator";
|
import { BotLevelGenerator } from "./BotLevelGenerator";
|
||||||
export declare class BotGenerator {
|
export declare class BotGenerator {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -32,7 +34,7 @@ export declare class BotGenerator {
|
|||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Generate a player scav bot object
|
* Generate a player scav bot object
|
||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -18,6 +19,7 @@ export declare class BotLootGenerator {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
@ -27,7 +29,7 @@ export declare class BotLootGenerator {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Add loot to bots containers
|
* Add loot to bots containers
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -94,19 +96,6 @@ export declare class BotLootGenerator {
|
|||||||
* @returns true if item has reached spawn limit
|
* @returns true if item has reached spawn limit
|
||||||
*/
|
*/
|
||||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||||
/**
|
|
||||||
* Is the item an ammo box
|
|
||||||
* @param props props of the item to check
|
|
||||||
* @returns true if item is an ammo box
|
|
||||||
*/
|
|
||||||
protected isAmmoBox(props: Props): boolean;
|
|
||||||
/**
|
|
||||||
* Create an object that contains the ammo stack for an ammo box
|
|
||||||
* @param parentId ammo box id
|
|
||||||
* @param props ammo box props
|
|
||||||
* @returns Item object
|
|
||||||
*/
|
|
||||||
protected createAmmoForAmmoBox(parentId: string, props: Props): Item;
|
|
||||||
/**
|
/**
|
||||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc is this a PMC
|
||||||
|
@ -140,26 +140,27 @@ export declare class BotWeaponGenerator {
|
|||||||
protected getWeaponCaliber(weaponTemplate: ITemplateItem): string;
|
protected getWeaponCaliber(weaponTemplate: ITemplateItem): string;
|
||||||
/**
|
/**
|
||||||
* Fill existing magazines to full, while replacing their contents with specified ammo
|
* Fill existing magazines to full, while replacing their contents with specified ammo
|
||||||
* @param weaponMods
|
* @param weaponMods Weapon with children
|
||||||
* @param magazine
|
* @param magazine Magazine item
|
||||||
* @param ammoTpl
|
* @param cartridgeTpl Cartridge to insert into magazine
|
||||||
*/
|
*/
|
||||||
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
|
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void;
|
||||||
/**
|
/**
|
||||||
* Add desired ammo tpl as item to weaponmods array, placed as child to UBGL
|
* Add desired ammo tpl as item to weaponmods array, placed as child to UBGL
|
||||||
* @param weaponMods
|
* @param weaponMods Weapon with children
|
||||||
* @param ubglMod
|
* @param ubglMod UBGL item
|
||||||
* @param ubglAmmoTpl
|
* @param ubglAmmoTpl Grenade ammo tpl
|
||||||
*/
|
*/
|
||||||
protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void;
|
protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void;
|
||||||
/**
|
/**
|
||||||
* Add cartridge item to weapon Item array, if it already exists, update
|
* Add cartridge item to weapon Item array, if it already exists, update
|
||||||
* @param weaponMods Weapon items array to amend
|
* @param weaponWithMods Weapon items array to amend
|
||||||
* @param magazine magazine item details we're adding cartridges to
|
* @param magazine magazine item details we're adding cartridges to
|
||||||
* @param chosenAmmo cartridge to put into the magazine
|
* @param chosenAmmoTpl cartridge to put into the magazine
|
||||||
* @param newStackSize how many cartridges should go into the magazine
|
* @param newStackSize how many cartridges should go into the magazine
|
||||||
|
* @param magazineTemplate magazines db template
|
||||||
*/
|
*/
|
||||||
protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void;
|
protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void;
|
||||||
/**
|
/**
|
||||||
* Fill each Camora with a bullet
|
* Fill each Camora with a bullet
|
||||||
* @param weaponMods Weapon mods to find and update camora mod(s) from
|
* @param weaponMods Weapon mods to find and update camora mod(s) from
|
||||||
|
@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -34,6 +34,15 @@ export declare class LocationGenerator {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Choose loot to put into a static container
|
||||||
|
* @param containerIn
|
||||||
|
* @param staticForced
|
||||||
|
* @param staticLootDist
|
||||||
|
* @param staticAmmoDist
|
||||||
|
* @param locationName Name of the map to generate static loot for
|
||||||
|
* @returns IStaticContainerProps
|
||||||
|
*/
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
@ -52,5 +61,25 @@ export declare class LocationGenerator {
|
|||||||
* @param name of map currently generating forced loot for
|
* @param name of map currently generating forced loot for
|
||||||
*/
|
*/
|
||||||
protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void;
|
protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void;
|
||||||
protected createItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
|
/**
|
||||||
|
* Create array of item (with child items) and return
|
||||||
|
* @param chosenComposedKey Key we want to look up items for
|
||||||
|
* @param spawnPoint Dynamic spawn point item we want will be placed in
|
||||||
|
* @returns IContainerItem
|
||||||
|
*/
|
||||||
|
protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem;
|
||||||
|
/**
|
||||||
|
* Replace the _id value for base item + all children items parentid value
|
||||||
|
* @param itemWithChildren Item with mods to update
|
||||||
|
* @param newId new id to add on chidren of base item
|
||||||
|
*/
|
||||||
|
protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void;
|
||||||
|
/**
|
||||||
|
* Find an item in array by its _tpl, handle differently if chosenTpl is a weapon
|
||||||
|
* @param items Items array to search
|
||||||
|
* @param chosenTpl Tpl we want to get item with
|
||||||
|
* @returns Item object
|
||||||
|
*/
|
||||||
|
protected getItemInArray(items: Item[], chosenTpl: string): Item;
|
||||||
|
protected createStaticLootItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -15,6 +16,7 @@ export declare class PMCLootGenerator {
|
|||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected pocketLootPool: string[];
|
protected pocketLootPool: string[];
|
||||||
|
protected vestLootPool: string[];
|
||||||
protected backpackLootPool: string[];
|
protected backpackLootPool: string[];
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService);
|
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService);
|
||||||
@ -23,6 +25,18 @@ export declare class PMCLootGenerator {
|
|||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
*/
|
*/
|
||||||
generatePMCPocketLootPool(): string[];
|
generatePMCPocketLootPool(): string[];
|
||||||
|
/**
|
||||||
|
* Create an array of loot items a PMC can have in their vests
|
||||||
|
* @returns string array of tpls
|
||||||
|
*/
|
||||||
|
generatePMCVestLootPool(): string[];
|
||||||
|
/**
|
||||||
|
* Check if item has a width/hide that lets it fit into a 1x2 slot
|
||||||
|
* 1x1 / 1x2 / 2x1
|
||||||
|
* @param item Item to check size of
|
||||||
|
* @returns true if it fits
|
||||||
|
*/
|
||||||
|
protected itemFitsInto1By2Slot(item: ITemplateItem): boolean;
|
||||||
/**
|
/**
|
||||||
* Create an array of loot items a PMC can have in their backpack
|
* Create an array of loot items a PMC can have in their backpack
|
||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { QuestStatus } from "../models/enums/QuestStatus";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
@ -15,12 +16,22 @@ export declare class AssortHelper {
|
|||||||
/**
|
/**
|
||||||
* Remove assorts from a trader that have not been unlocked yet
|
* Remove assorts from a trader that have not been unlocked yet
|
||||||
* @param pmcProfile player profile
|
* @param pmcProfile player profile
|
||||||
* @param traderId traders id
|
* @param traderId traders id the assort belongs to
|
||||||
* @param assort assort items from a trader
|
* @param traderAssorts All assort items from same trader
|
||||||
* @param mergedQuestAssorts An object of quest assort to quest id unlocks for all traders
|
* @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders
|
||||||
* @returns assort items minus locked quest assorts
|
* @returns assort items minus locked quest assorts
|
||||||
*/
|
*/
|
||||||
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort, mergedQuestAssorts: Record<string, Record<string, string>>, flea?: boolean): ITraderAssort;
|
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record<string, Record<string, string>>, flea?: boolean): ITraderAssort;
|
||||||
|
/**
|
||||||
|
* Get a quest id + the statuses quest can be in to unlock assort
|
||||||
|
* @param mergedQuestAssorts quest assorts to search for assort id
|
||||||
|
* @param assortId Assort to look for linked quest id
|
||||||
|
* @returns quest id + array of quest status the assort should show for
|
||||||
|
*/
|
||||||
|
protected getQuestIdAndStatusThatShowAssort(mergedQuestAssorts: Record<string, Record<string, string>>, assortId: string): {
|
||||||
|
questId: string;
|
||||||
|
status: QuestStatus[];
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Remove assorts from a trader that have not been unlocked yet
|
* Remove assorts from a trader that have not been unlocked yet
|
||||||
* @param pmcProfile player profile
|
* @param pmcProfile player profile
|
||||||
|
@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper {
|
|||||||
/**
|
/**
|
||||||
* TODO - move into BotGeneratorHelper, this is not the class for it
|
* TODO - move into BotGeneratorHelper, this is not the class for it
|
||||||
* Adds an item with all its children into specified equipmentSlots, wherever it fits.
|
* Adds an item with all its children into specified equipmentSlots, wherever it fits.
|
||||||
* @param equipmentSlots
|
* @param equipmentSlots Slot to add item+children into
|
||||||
* @param parentId
|
* @param parentId
|
||||||
* @param parentTpl
|
* @param parentTpl
|
||||||
* @param itemWithChildren
|
* @param itemWithChildren Item to add
|
||||||
* @param inventory
|
* @param inventory Inventory to add item+children into
|
||||||
* @returns a `boolean` indicating item was added
|
* @returns a `boolean` indicating item was added
|
||||||
*/
|
*/
|
||||||
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean;
|
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean;
|
||||||
|
@ -140,8 +140,21 @@ export declare class HideoutHelper {
|
|||||||
* @returns coin slot count
|
* @returns coin slot count
|
||||||
*/
|
*/
|
||||||
protected getBTCSlots(pmcData: IPmcData): number;
|
protected getBTCSlots(pmcData: IPmcData): number;
|
||||||
|
/**
|
||||||
|
* Get a count of bitcoins player miner can hold
|
||||||
|
*/
|
||||||
protected getManagementSkillsSlots(): number;
|
protected getManagementSkillsSlots(): number;
|
||||||
protected hasManagementSkillSlots(pmcData: IPmcData): boolean;
|
/**
|
||||||
|
* Does profile have elite hideout management skill
|
||||||
|
* @param pmcData Profile to look at
|
||||||
|
* @returns True if profile has skill
|
||||||
|
*/
|
||||||
|
protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Get the hideout management skill from player profile
|
||||||
|
* @param pmcData Profile to look at
|
||||||
|
* @returns Hideout management skill object
|
||||||
|
*/
|
||||||
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
||||||
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
||||||
/**
|
/**
|
||||||
|
@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Victim } from "../models/eft/common/tables/IBotBase";
|
import { Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { InventoryHelper } from "./InventoryHelper";
|
import { InventoryHelper } from "./InventoryHelper";
|
||||||
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { PaymentHelper } from "./PaymentHelper";
|
import { PaymentHelper } from "./PaymentHelper";
|
||||||
export declare class InRaidHelper {
|
export declare class InRaidHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService);
|
protected configServer: ConfigServer;
|
||||||
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Should quest items be removed from player inventory on death
|
||||||
|
* @returns True if items should be removed from inventory
|
||||||
|
*/
|
||||||
|
removeQuestItemsOnDeath(): boolean;
|
||||||
/**
|
/**
|
||||||
* Check an array of items and add an upd object to money items with a stack count of 1
|
* Check an array of items and add an upd object to money items with a stack count of 1
|
||||||
* Single stack money items have no upd object and thus no StackObjectsCount, causing issues
|
* Single stack money items have no upd object and thus no StackObjectsCount, causing issues
|
||||||
@ -83,7 +94,7 @@ export declare class InRaidHelper {
|
|||||||
* Remove equipped items from pre-raid
|
* Remove equipped items from pre-raid
|
||||||
* Add new items found in raid to profile
|
* Add new items found in raid to profile
|
||||||
* Store insurance items in profile
|
* Store insurance items in profile
|
||||||
* @param sessionID
|
* @param sessionID Session id
|
||||||
* @param pmcData Profile to update
|
* @param pmcData Profile to update
|
||||||
* @param postRaidProfile Profile returned by client after a raid
|
* @param postRaidProfile Profile returned by client after a raid
|
||||||
* @returns Updated profile
|
* @returns Updated profile
|
||||||
@ -94,15 +105,21 @@ export declare class InRaidHelper {
|
|||||||
* Used post-raid to remove items after death
|
* Used post-raid to remove items after death
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns Player profile with pmc inventory cleared
|
|
||||||
*/
|
*/
|
||||||
deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData;
|
deleteInventory(pmcData: IPmcData, sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Get items in vest/pocket/backpack inventory containers (excluding children)
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Item array
|
||||||
|
*/
|
||||||
|
protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[];
|
||||||
/**
|
/**
|
||||||
* Does the provided items slotId mean its kept on the player after death
|
* Does the provided items slotId mean its kept on the player after death
|
||||||
* @param slotId slotid of item to check
|
* @pmcData Player profile
|
||||||
|
* @itemToCheck Item to check should be kept
|
||||||
* @returns true if item is kept after death
|
* @returns true if item is kept after death
|
||||||
*/
|
*/
|
||||||
isItemKeptAfterDeath(slotId: string): boolean;
|
protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean;
|
||||||
/**
|
/**
|
||||||
* Return the equipped items from a players inventory
|
* Return the equipped items from a players inventory
|
||||||
* @param items Players inventory to search through
|
* @param items Players inventory to search through
|
||||||
|
@ -61,12 +61,12 @@ export declare class InventoryHelper {
|
|||||||
/**
|
/**
|
||||||
* Add ammo to ammo boxes
|
* Add ammo to ammo boxes
|
||||||
* @param itemToAdd Item to check is ammo box
|
* @param itemToAdd Item to check is ammo box
|
||||||
* @param toDo
|
* @param parentId Ammo box parent id
|
||||||
* @param output IItemEventRouterResponse object
|
* @param output IItemEventRouterResponse object
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param pmcData Profile to add ammobox to
|
* @param pmcData Profile to add ammobox to
|
||||||
*/
|
*/
|
||||||
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void;
|
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param assortItems Items to add to inventory
|
* @param assortItems Items to add to inventory
|
||||||
@ -111,7 +111,13 @@ export declare class InventoryHelper {
|
|||||||
/**
|
/**
|
||||||
* Internal helper function to move item within the same profile_f.
|
* Internal helper function to move item within the same profile_f.
|
||||||
*/
|
*/
|
||||||
moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void;
|
moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void;
|
||||||
|
/**
|
||||||
|
* Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param itemBeingMoved item being moved
|
||||||
|
*/
|
||||||
|
protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void;
|
||||||
/**
|
/**
|
||||||
* Internal helper function to handle cartridges in inventory if any of them exist.
|
* Internal helper function to handle cartridges in inventory if any of them exist.
|
||||||
*/
|
*/
|
||||||
|
@ -193,31 +193,53 @@ declare class ItemHelper {
|
|||||||
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
||||||
/**
|
/**
|
||||||
* WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do
|
* WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do
|
||||||
* @param {string} tpl
|
* @param {string} tpl Items tpl to check parents of
|
||||||
* @param {Array} tplsToCheck
|
* @param {Array} tplsToCheck Tpl values to check if parents of item match
|
||||||
* @returns boolean
|
* @returns boolean Match found
|
||||||
*/
|
*/
|
||||||
doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean;
|
doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Return true if item is a quest item
|
* Check if item is quest item
|
||||||
* @param {string} tpl
|
* @param tpl Items tpl to check quest status of
|
||||||
* @returns boolean
|
* @returns true if item is flagged as quest item
|
||||||
*/
|
*/
|
||||||
isQuestItem(tpl: string): boolean;
|
isQuestItem(tpl: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Get the inventory size of an item
|
* Get the inventory size of an item
|
||||||
* @param items
|
* @param items Item with children
|
||||||
* @param rootItemId
|
* @param rootItemId
|
||||||
* @returns ItemSize object (width and height)
|
* @returns ItemSize object (width and height)
|
||||||
*/
|
*/
|
||||||
getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize;
|
getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize;
|
||||||
/**
|
/**
|
||||||
* Get a random cartridge from an items Filter property
|
* Get a random cartridge from an items Filter property
|
||||||
* @param item
|
* @param item Db item template to look up Cartridge filter values from
|
||||||
* @returns
|
* @returns Caliber of cartridge
|
||||||
*/
|
*/
|
||||||
getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string;
|
getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string;
|
||||||
createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, caliber?: string): Item;
|
/**
|
||||||
|
* Add cartridges to the ammo box with correct max stack sizes
|
||||||
|
* @param ammoBox Box to add cartridges to
|
||||||
|
* @param ammoBoxDetails Item template from items db
|
||||||
|
*/
|
||||||
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Add child items (cartridges) to a magazine
|
||||||
|
* @param magazine Magazine to add child items to
|
||||||
|
* @param magTemplate Db template of magazine
|
||||||
|
* @param staticAmmoDist Cartridge distribution
|
||||||
|
* @param caliber Caliber of cartridge to add to magazine
|
||||||
|
* @param minSizePercent % the magazine must be filled to
|
||||||
|
*/
|
||||||
|
fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, caliber?: string, minSizePercent?: number): void;
|
||||||
|
/**
|
||||||
|
* Add child items to a magazine of a specific cartridge
|
||||||
|
* @param magazine Magazine to add child items to
|
||||||
|
* @param magTemplate Db template of magazine
|
||||||
|
* @param cartridgeTpl Cartridge to add to magazine
|
||||||
|
* @param minSizePercent % the magazine must be filled to
|
||||||
|
*/
|
||||||
|
fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void;
|
||||||
protected getRandomValidCaliber(magTemplate: ITemplateItem): string;
|
protected getRandomValidCaliber(magTemplate: ITemplateItem): string;
|
||||||
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): string;
|
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): string;
|
||||||
/**
|
/**
|
||||||
|
@ -20,7 +20,12 @@ export declare class ProfileHelper {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService);
|
||||||
resetProfileQuestCondition(sessionID: string, conditionId: string): void;
|
/**
|
||||||
|
* Remove/reset started quest condtions in player profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param conditionIds Condition ids that need to be reset/removed
|
||||||
|
*/
|
||||||
|
resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void;
|
||||||
/**
|
/**
|
||||||
* Get all profiles from server
|
* Get all profiles from server
|
||||||
* @returns Dictionary of profiles
|
* @returns Dictionary of profiles
|
||||||
|
@ -40,7 +40,7 @@ export declare class QuestHelper {
|
|||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get status of a quest by quest id
|
* Get status of a quest in player profile by its id
|
||||||
* @param pmcData Profile to search
|
* @param pmcData Profile to search
|
||||||
* @param questID Quest id to look up
|
* @param questID Quest id to look up
|
||||||
* @returns QuestStatus enum
|
* @returns QuestStatus enum
|
||||||
@ -160,6 +160,13 @@ export declare class QuestHelper {
|
|||||||
* @returns IQuest object
|
* @returns IQuest object
|
||||||
*/
|
*/
|
||||||
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
||||||
|
/**
|
||||||
|
* Get a quests startedMessageText key from db, if no startedMessageText key found, use description key instead
|
||||||
|
* @param startedMessageTextId startedMessageText property from IQuest
|
||||||
|
* @param questDescriptionId description property from IQuest
|
||||||
|
* @returns message id
|
||||||
|
*/
|
||||||
|
getMessageIdForQuestStart(startedMessageTextId: string, questDescriptionId: string): string;
|
||||||
/**
|
/**
|
||||||
* Get the locale Id from locale db for a quest message
|
* Get the locale Id from locale db for a quest message
|
||||||
* @param questMessageId Quest message id to look up
|
* @param questMessageId Quest message id to look up
|
||||||
@ -204,7 +211,7 @@ export declare class QuestHelper {
|
|||||||
* @param itemTpl item tpl to look for
|
* @param itemTpl item tpl to look for
|
||||||
* @returns 'FindItem' condition id
|
* @returns 'FindItem' condition id
|
||||||
*/
|
*/
|
||||||
getFindItemIdForQuestHandIn(itemTpl: string): string;
|
getFindItemIdForQuestHandIn(itemTpl: string): string[];
|
||||||
/**
|
/**
|
||||||
* Add all quests to a profile with the provided statuses
|
* Add all quests to a profile with the provided statuses
|
||||||
* @param pmcProfile profile to update
|
* @param pmcProfile profile to update
|
||||||
|
@ -47,7 +47,22 @@ export declare class RagfairOfferHelper {
|
|||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
|
||||||
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||||
getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
/**
|
||||||
|
* Get offers from flea/traders specifically when building weapon preset
|
||||||
|
* @param searchRequest Search request data
|
||||||
|
* @param itemsToAdd string array of item tpls to search for
|
||||||
|
* @param traderAssorts All trader assorts player can access/buy
|
||||||
|
* @param pmcProfile Player profile
|
||||||
|
* @returns ITraderAssort
|
||||||
|
*/
|
||||||
|
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||||
|
/**
|
||||||
|
* Check if offer item is quest locked for current player by looking at sptQuestLocked property in traders barter_scheme
|
||||||
|
* @param offer Offer to check is quest locked
|
||||||
|
* @param traderAssorts all trader assorts for player
|
||||||
|
* @returns true if quest locked
|
||||||
|
*/
|
||||||
|
traderOfferItemQuestLocked(offer: IRagfairOffer, traderAssorts: Record<string, ITraderAssort>): boolean;
|
||||||
/**
|
/**
|
||||||
* Has a traders offer ran out of stock to sell to player
|
* Has a traders offer ran out of stock to sell to player
|
||||||
* @param offer Offer to check stock of
|
* @param offer Offer to check stock of
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
import { FenceLevel } from "../models/eft/common/IGlobals";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader";
|
||||||
import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader";
|
|
||||||
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -12,16 +10,12 @@ import { LocalisationService } from "../services/LocalisationService";
|
|||||||
import { PlayerService } from "../services/PlayerService";
|
import { PlayerService } from "../services/PlayerService";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
import { HandbookHelper } from "./HandbookHelper";
|
import { HandbookHelper } from "./HandbookHelper";
|
||||||
import { ItemHelper } from "./ItemHelper";
|
|
||||||
import { PaymentHelper } from "./PaymentHelper";
|
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
export declare class TraderHelper {
|
export declare class TraderHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected playerService: PlayerService;
|
protected playerService: PlayerService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
@ -31,7 +25,7 @@ export declare class TraderHelper {
|
|||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
/** Dictionary of item tpl and the highest trader rouble price */
|
/** Dictionary of item tpl and the highest trader rouble price */
|
||||||
protected highestTraderPriceItems: Record<string, number>;
|
protected highestTraderPriceItems: Record<string, number>;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||||
getTrader(traderID: string, sessionID: string): ITraderBase;
|
getTrader(traderID: string, sessionID: string): ITraderBase;
|
||||||
getTraderAssortsById(traderId: string): ITraderAssort;
|
getTraderAssortsById(traderId: string): ITraderAssort;
|
||||||
/**
|
/**
|
||||||
@ -48,62 +42,6 @@ export declare class TraderHelper {
|
|||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
*/
|
*/
|
||||||
setTraderUnlockedState(traderId: string, status: boolean, sessionId: string): void;
|
setTraderUnlockedState(traderId: string, status: boolean, sessionId: string): void;
|
||||||
/**
|
|
||||||
* Get a list of items and their prices from player inventory that can be sold to a trader
|
|
||||||
* @param traderID trader id being traded with
|
|
||||||
* @param sessionID session id
|
|
||||||
* @returns IBarterScheme[][]
|
|
||||||
*/
|
|
||||||
getPurchasesData(traderID: string, sessionID: string): Record<string, IBarterScheme[][]>;
|
|
||||||
/**
|
|
||||||
* Should item be skipped when selling to trader according to its sell categories and other checks
|
|
||||||
* @param pmcData Profile
|
|
||||||
* @param item Item to be checked is sellable to trader
|
|
||||||
* @param sellCategory categories trader will buy
|
|
||||||
* @param traderId Trader item is being checked can be sold to
|
|
||||||
* @returns true if should NOT be sold to trader
|
|
||||||
*/
|
|
||||||
protected isItemUnSellableToTrader(pmcData: IPmcData, item: Item, sellCategory: string[], traderId: string): boolean;
|
|
||||||
/**
|
|
||||||
* Check if item has durability so low it precludes it from being sold to the trader (inclusive)
|
|
||||||
* @param item Item to check durability of
|
|
||||||
* @param traderId Trader item is sold to
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
protected itemIsBelowSellableDurabilityThreshhold(item: Item, traderId: string): boolean;
|
|
||||||
/**
|
|
||||||
* Get the percentage threshold value a trader will buy armor/weapons above
|
|
||||||
* @param traderId Trader to look up
|
|
||||||
* @returns percentage
|
|
||||||
*/
|
|
||||||
protected getTraderDurabiltyPurchaseThreshold(traderId: string): number;
|
|
||||||
/**
|
|
||||||
* Get the price of passed in item and all of its attached children (mods)
|
|
||||||
* Take into account bonuses/adjustments e.g. discounts
|
|
||||||
* @param pmcData profile data
|
|
||||||
* @param item item to calculate price of
|
|
||||||
* @param buyPriceCoefficient
|
|
||||||
* @param fenceInfo fence data
|
|
||||||
* @param traderBase trader details
|
|
||||||
* @param currencyTpl Currency to get price as
|
|
||||||
* @returns price of item + children
|
|
||||||
*/
|
|
||||||
protected getAdjustedItemPrice(pmcData: IPmcData, item: Item, buyPriceCoefficient: number, fenceInfo: FenceLevel, traderBase: ITraderBase, currencyTpl: string): number;
|
|
||||||
/**
|
|
||||||
* Get the raw price of item+child items from handbook without any modification
|
|
||||||
* @param pmcData profile data
|
|
||||||
* @param item item to calculate price of
|
|
||||||
* @returns price as number
|
|
||||||
*/
|
|
||||||
protected getRawItemPrice(pmcData: IPmcData, item: Item): number;
|
|
||||||
/**
|
|
||||||
* Get discount modifier for desired trader
|
|
||||||
* @param trader Trader to get discount for
|
|
||||||
* @param buyPriceCoefficient
|
|
||||||
* @param fenceInfo fence info, needed if getting fence modifier value
|
|
||||||
* @returns discount modifier value
|
|
||||||
*/
|
|
||||||
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel): number;
|
|
||||||
/**
|
/**
|
||||||
* Add standing to a trader and level them up if exp goes over level threshold
|
* Add standing to a trader and level them up if exp goes over level threshold
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -129,13 +67,6 @@ export declare class TraderHelper {
|
|||||||
* @returns Time in seconds
|
* @returns Time in seconds
|
||||||
*/
|
*/
|
||||||
getTraderUpdateSeconds(traderId: string): number;
|
getTraderUpdateSeconds(traderId: string): number;
|
||||||
/**
|
|
||||||
* check if an item is allowed to be sold to a trader
|
|
||||||
* @param categoriesTraderBuys array of allowed categories
|
|
||||||
* @param tplToCheck itemTpl of inventory
|
|
||||||
* @returns boolean if item can be sold to trader
|
|
||||||
*/
|
|
||||||
doesTraderBuyItem(categoriesTraderBuys: string[], tplToCheck: string): boolean;
|
|
||||||
getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel;
|
getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel;
|
||||||
/**
|
/**
|
||||||
* Store the purchase of an assort from a trader in the player profile
|
* Store the purchase of an assort from a trader in the player profile
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
import { IModLoader } from "../models/spt/mod/IModLoader";
|
import { IModLoader } from "../models/spt/mod/IModLoader";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { VFS } from "../utils/VFS";
|
import { VFS } from "../utils/VFS";
|
||||||
import { BundleLoader } from "./BundleLoader";
|
import { BundleLoader } from "./BundleLoader";
|
||||||
import { ModTypeCheck } from "./ModTypeCheck";
|
import { ModTypeCheck } from "./ModTypeCheck";
|
||||||
import { PreAkiModLoader } from "./PreAkiModLoader";
|
import { PreAkiModLoader } from "./PreAkiModLoader";
|
||||||
export declare class PostAkiModLoader implements IModLoader {
|
export declare class PostAkiModLoader implements IModLoader {
|
||||||
|
protected logger: ILogger;
|
||||||
protected bundleLoader: BundleLoader;
|
protected bundleLoader: BundleLoader;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
protected preAkiModLoader: PreAkiModLoader;
|
protected preAkiModLoader: PreAkiModLoader;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected modTypeCheck: ModTypeCheck;
|
protected modTypeCheck: ModTypeCheck;
|
||||||
constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck);
|
||||||
getModPath(mod: string): string;
|
getModPath(mod: string): string;
|
||||||
load(): Promise<void>;
|
load(): Promise<void>;
|
||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { ModTypeCheck } from "./ModTypeCheck";
|
import { ModTypeCheck } from "./ModTypeCheck";
|
||||||
import { PreAkiModLoader } from "./PreAkiModLoader";
|
import { PreAkiModLoader } from "./PreAkiModLoader";
|
||||||
export declare class PostDBModLoader implements OnLoad {
|
export declare class PostDBModLoader implements OnLoad {
|
||||||
|
protected logger: ILogger;
|
||||||
protected preAkiModLoader: PreAkiModLoader;
|
protected preAkiModLoader: PreAkiModLoader;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected modTypeCheck: ModTypeCheck;
|
protected modTypeCheck: ModTypeCheck;
|
||||||
constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck);
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
getModPath(mod: string): string;
|
getModPath(mod: string): string;
|
||||||
|
@ -70,6 +70,7 @@ export interface Config {
|
|||||||
EventType: string[];
|
EventType: string[];
|
||||||
WalkSpeed: xyz;
|
WalkSpeed: xyz;
|
||||||
SprintSpeed: xyz;
|
SprintSpeed: xyz;
|
||||||
|
SquadSettings: ISquadSettings;
|
||||||
SkillEnduranceWeightThreshold: number;
|
SkillEnduranceWeightThreshold: number;
|
||||||
TeamSearchingTimeout: number;
|
TeamSearchingTimeout: number;
|
||||||
Insurance: Insurance;
|
Insurance: Insurance;
|
||||||
@ -803,6 +804,11 @@ export interface RestrictionsInRaid {
|
|||||||
TemplateId: string;
|
TemplateId: string;
|
||||||
Value: number;
|
Value: number;
|
||||||
}
|
}
|
||||||
|
export interface ISquadSettings {
|
||||||
|
CountOfRequestsToOnePlayer: number;
|
||||||
|
SecondsForExpiredRequest: number;
|
||||||
|
SendRequestDelaySeconds: number;
|
||||||
|
}
|
||||||
export interface Insurance {
|
export interface Insurance {
|
||||||
MaxStorageTimeInHour: number;
|
MaxStorageTimeInHour: number;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { Item } from "./tables/IItem";
|
||||||
export interface ILooseLoot {
|
export interface ILooseLoot {
|
||||||
spawnpointCount: SpawnpointCount;
|
spawnpointCount: SpawnpointCount;
|
||||||
spawnpointsForced: SpawnpointsForced[];
|
spawnpointsForced: SpawnpointsForced[];
|
||||||
@ -24,10 +25,6 @@ export interface SpawnpointTemplate {
|
|||||||
Root: any;
|
Root: any;
|
||||||
Items: Item[];
|
Items: Item[];
|
||||||
}
|
}
|
||||||
export interface Item {
|
|
||||||
_id: string;
|
|
||||||
_tpl?: string;
|
|
||||||
}
|
|
||||||
export interface Spawnpoint {
|
export interface Spawnpoint {
|
||||||
locationId: string;
|
locationId: string;
|
||||||
probability: number;
|
probability: number;
|
||||||
@ -40,6 +37,9 @@ export interface Xyz {
|
|||||||
z: number;
|
z: number;
|
||||||
}
|
}
|
||||||
export interface ItemDistribution {
|
export interface ItemDistribution {
|
||||||
tpl: string;
|
composedKey: ComposedKey;
|
||||||
relativeProbability: number;
|
relativeProbability: number;
|
||||||
}
|
}
|
||||||
|
export interface ComposedKey {
|
||||||
|
key: string;
|
||||||
|
}
|
||||||
|
@ -120,9 +120,7 @@ export interface Inventory {
|
|||||||
sortingTable: string;
|
sortingTable: string;
|
||||||
questRaidItems: string;
|
questRaidItems: string;
|
||||||
questStashItems: string;
|
questStashItems: string;
|
||||||
fastPanel: FastPanel;
|
fastPanel: Record<string, string>;
|
||||||
}
|
|
||||||
export interface FastPanel {
|
|
||||||
}
|
}
|
||||||
export interface Skills {
|
export interface Skills {
|
||||||
Common: Common[];
|
Common: Common[];
|
||||||
|
@ -46,7 +46,7 @@ export interface AvailableForProps {
|
|||||||
parentId: string;
|
parentId: string;
|
||||||
isEncoded: boolean;
|
isEncoded: boolean;
|
||||||
dynamicLocale: boolean;
|
dynamicLocale: boolean;
|
||||||
value?: number;
|
value?: string | number;
|
||||||
compareMethod?: string;
|
compareMethod?: string;
|
||||||
visibilityConditions?: VisibilityCondition[];
|
visibilityConditions?: VisibilityCondition[];
|
||||||
target?: string | string[];
|
target?: string | string[];
|
||||||
|
@ -20,4 +20,5 @@ export interface Requirement {
|
|||||||
areaType?: number;
|
areaType?: number;
|
||||||
requiredLevel?: number;
|
requiredLevel?: number;
|
||||||
resource?: number;
|
resource?: number;
|
||||||
|
questId?: string;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
export interface IEndOfflineRaidRequestData {
|
export interface IEndOfflineRaidRequestData {
|
||||||
crc: number;
|
crc: number;
|
||||||
exitStatus: string;
|
exitStatus: string;
|
||||||
exitName: any;
|
exitName: string;
|
||||||
raidSeconds: number;
|
raidSeconds: number;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
export interface IGetRaidConfigurationRequestData {
|
export interface IGetRaidConfigurationRequestData {
|
||||||
|
keyId: string;
|
||||||
|
side: string;
|
||||||
|
location: string;
|
||||||
timeVariant: string;
|
timeVariant: string;
|
||||||
raidMode: string;
|
raidMode: string;
|
||||||
metabolismDisabled: boolean;
|
metabolismDisabled: boolean;
|
||||||
@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData {
|
|||||||
timeAndWeatherSettings: TimeAndWeatherSettings;
|
timeAndWeatherSettings: TimeAndWeatherSettings;
|
||||||
botSettings: BotSettings;
|
botSettings: BotSettings;
|
||||||
wavesSettings: WavesSettings;
|
wavesSettings: WavesSettings;
|
||||||
location: string;
|
|
||||||
}
|
}
|
||||||
export interface TimeAndWeatherSettings {
|
export interface TimeAndWeatherSettings {
|
||||||
isRandomTime: boolean;
|
isRandomTime: boolean;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { Upd } from "../common/tables/IItem";
|
||||||
export interface IPresetBuildActionRequestData {
|
export interface IPresetBuildActionRequestData {
|
||||||
Action: string;
|
Action: string;
|
||||||
id: string;
|
id: string;
|
||||||
@ -12,14 +13,3 @@ export interface Item {
|
|||||||
parentId?: string;
|
parentId?: string;
|
||||||
slotId?: string;
|
slotId?: string;
|
||||||
}
|
}
|
||||||
export interface Upd {
|
|
||||||
Repairable: Repairable;
|
|
||||||
FireMode: FireMode;
|
|
||||||
}
|
|
||||||
export interface Repairable {
|
|
||||||
MaxDurability: number;
|
|
||||||
Durability: number;
|
|
||||||
}
|
|
||||||
export interface FireMode {
|
|
||||||
FireMode: string;
|
|
||||||
}
|
|
||||||
|
3
Live/CWX_MasterKey/server/types/models/eft/profile/IGetProfileSettingsRequest.d.ts
vendored
Normal file
3
Live/CWX_MasterKey/server/types/models/eft/profile/IGetProfileSettingsRequest.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface IGetProfileSettingsRequest {
|
||||||
|
squadInviteRestriction: boolean;
|
||||||
|
}
|
@ -19,5 +19,6 @@ export declare enum ConfigTypes {
|
|||||||
SCAVCASE = "aki-scavcase",
|
SCAVCASE = "aki-scavcase",
|
||||||
TRADER = "aki-trader",
|
TRADER = "aki-trader",
|
||||||
WEATHER = "aki-weather",
|
WEATHER = "aki-weather",
|
||||||
SEASONAL_EVENT = "aki-seasonalevents"
|
SEASONAL_EVENT = "aki-seasonalevents",
|
||||||
|
LOST_ON_DEATH = "aki-lostondeath"
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import { IEmptyRequestData } from "../../eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../../eft/common/IEmptyRequestData";
|
||||||
import { IBarterScheme, ITraderAssort, ITraderBase } from "../../eft/common/tables/ITrader";
|
import { ITraderAssort, ITraderBase } from "../../eft/common/tables/ITrader";
|
||||||
import { IGetBodyResponseData } from "../../eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../../eft/httpResponse/IGetBodyResponseData";
|
||||||
export interface ITraderCallbacks {
|
export interface ITraderCallbacks {
|
||||||
load(): void;
|
load(): void;
|
||||||
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
||||||
getProfilePurchases(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, IBarterScheme[][]>>;
|
|
||||||
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
||||||
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
||||||
update(): boolean;
|
update(): boolean;
|
||||||
|
@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig {
|
|||||||
kind: "aki-http";
|
kind: "aki-http";
|
||||||
ip: string;
|
ip: string;
|
||||||
port: number;
|
port: number;
|
||||||
|
logRequests: boolean;
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas
|
|||||||
import { IBaseConfig } from "./IBaseConfig";
|
import { IBaseConfig } from "./IBaseConfig";
|
||||||
export interface ILocationConfig extends IBaseConfig {
|
export interface ILocationConfig extends IBaseConfig {
|
||||||
kind: "aki-location";
|
kind: "aki-location";
|
||||||
fixEmptyBotWaves: boolean;
|
fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings;
|
||||||
fixRoguesTakingAllSpawnsOnLighthouse: boolean;
|
rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings;
|
||||||
lighthouseRogueSpawnTimeSeconds: number;
|
splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings;
|
||||||
looseLootMultiplier: LootMultiplier;
|
looseLootMultiplier: LootMultiplier;
|
||||||
staticLootMultiplier: LootMultiplier;
|
staticLootMultiplier: LootMultiplier;
|
||||||
customWaves: CustomWaves;
|
customWaves: CustomWaves;
|
||||||
@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
openZones: Record<string, string[]>;
|
openZones: Record<string, string[]>;
|
||||||
/** Key = map id, value = item tpls that should only have one forced loot spawn position */
|
/** Key = map id, value = item tpls that should only have one forced loot spawn position */
|
||||||
forcedLootSingleSpawnById: Record<string, string[]>;
|
forcedLootSingleSpawnById: Record<string, string[]>;
|
||||||
|
/** How many attempts should be taken to fit an item into a container before giving up */
|
||||||
|
fitLootIntoContainerAttempts: number;
|
||||||
|
}
|
||||||
|
export interface IFixEmptyBotWavesSettings {
|
||||||
|
enabled: boolean;
|
||||||
|
ignoreMaps: string[];
|
||||||
|
}
|
||||||
|
export interface IRogueLighthouseSpawnTimeSettings {
|
||||||
|
enabled: boolean;
|
||||||
|
waitTimeSeconds: number;
|
||||||
|
}
|
||||||
|
export interface ISplitWaveSettings {
|
||||||
|
enabled: boolean;
|
||||||
|
ignoreMaps: string[];
|
||||||
|
waveSizeThreshold: number;
|
||||||
}
|
}
|
||||||
export interface CustomWaves {
|
export interface CustomWaves {
|
||||||
boss: Record<string, BossLocationSpawn[]>;
|
boss: Record<string, BossLocationSpawn[]>;
|
||||||
|
21
Live/CWX_MasterKey/server/types/models/spt/config/ILostOnDeathConfig.d.ts
vendored
Normal file
21
Live/CWX_MasterKey/server/types/models/spt/config/ILostOnDeathConfig.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { IBaseConfig } from "./IBaseConfig";
|
||||||
|
export interface ILostOnDeathConfig extends IBaseConfig {
|
||||||
|
kind: "aki-lostondeath";
|
||||||
|
equipment: Equipment;
|
||||||
|
specialSlotItems: boolean;
|
||||||
|
questItems: boolean;
|
||||||
|
}
|
||||||
|
export interface Equipment {
|
||||||
|
ArmBand: boolean;
|
||||||
|
Headwear: boolean;
|
||||||
|
Earpiece: boolean;
|
||||||
|
FaceCover: boolean;
|
||||||
|
ArmorVest: boolean;
|
||||||
|
Eyewear: boolean;
|
||||||
|
TacticalVest: boolean;
|
||||||
|
Backpack: boolean;
|
||||||
|
Holster: boolean;
|
||||||
|
FirstPrimaryWeapon: boolean;
|
||||||
|
SecondPrimaryWeapon: boolean;
|
||||||
|
Scabbard: boolean;
|
||||||
|
}
|
@ -1,5 +1,8 @@
|
|||||||
import { MinMax } from "../../common/MinMax";
|
import { MinMax } from "../../common/MinMax";
|
||||||
export interface IPmcConfig {
|
export interface IPmcConfig {
|
||||||
|
vestLoot: SlotLootSettings;
|
||||||
|
pocketLoot: SlotLootSettings;
|
||||||
|
backpackLoot: SlotLootSettings;
|
||||||
dynamicLoot: DynamicLoot;
|
dynamicLoot: DynamicLoot;
|
||||||
useDifficultyOverride: boolean;
|
useDifficultyOverride: boolean;
|
||||||
difficulty: string;
|
difficulty: string;
|
||||||
@ -22,8 +25,11 @@ export interface PmcTypes {
|
|||||||
usec: string;
|
usec: string;
|
||||||
bear: string;
|
bear: string;
|
||||||
}
|
}
|
||||||
export interface DynamicLoot {
|
export interface SlotLootSettings {
|
||||||
whitelist: string[];
|
whitelist: string[];
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
moneyStackLimits: Record<string, number>;
|
moneyStackLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
|
export interface DynamicLoot {
|
||||||
|
moneyStackLimits: Record<string, number>;
|
||||||
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { MinMax } from "../../../models/common/MinMax";
|
||||||
import { ELocationName } from "../../enums/ELocationName";
|
import { ELocationName } from "../../enums/ELocationName";
|
||||||
import { IBaseConfig } from "./IBaseConfig";
|
import { IBaseConfig } from "./IBaseConfig";
|
||||||
export interface IQuestConfig extends IBaseConfig {
|
export interface IQuestConfig extends IBaseConfig {
|
||||||
@ -50,7 +51,7 @@ export interface ITraderWhitelist {
|
|||||||
export interface IRepeatableQuestTypesConfig {
|
export interface IRepeatableQuestTypesConfig {
|
||||||
Exploration: IExploration;
|
Exploration: IExploration;
|
||||||
Completion: ICompletion;
|
Completion: ICompletion;
|
||||||
Elimination: IElimination;
|
Elimination: IEliminationConfig[];
|
||||||
}
|
}
|
||||||
export interface IExploration {
|
export interface IExploration {
|
||||||
maxExtracts: number;
|
maxExtracts: number;
|
||||||
@ -68,7 +69,8 @@ export interface ICompletion {
|
|||||||
useWhitelist: boolean;
|
useWhitelist: boolean;
|
||||||
useBlacklist: boolean;
|
useBlacklist: boolean;
|
||||||
}
|
}
|
||||||
export interface IElimination {
|
export interface IEliminationConfig {
|
||||||
|
levelRange: MinMax;
|
||||||
targets: ITarget[];
|
targets: ITarget[];
|
||||||
bodyPartProb: number;
|
bodyPartProb: number;
|
||||||
bodyParts: IBodyPart[];
|
bodyParts: IBodyPart[];
|
||||||
@ -80,11 +82,6 @@ export interface IElimination {
|
|||||||
maxKills: number;
|
maxKills: number;
|
||||||
minKills: number;
|
minKills: number;
|
||||||
}
|
}
|
||||||
export interface IProbabilityObject {
|
|
||||||
key: string;
|
|
||||||
relativeProbability: number;
|
|
||||||
data?: any;
|
|
||||||
}
|
|
||||||
export interface ITarget extends IProbabilityObject {
|
export interface ITarget extends IProbabilityObject {
|
||||||
data: IBossInfo;
|
data: IBossInfo;
|
||||||
}
|
}
|
||||||
@ -94,3 +91,8 @@ export interface IBossInfo {
|
|||||||
export interface IBodyPart extends IProbabilityObject {
|
export interface IBodyPart extends IProbabilityObject {
|
||||||
data: string[];
|
data: string[];
|
||||||
}
|
}
|
||||||
|
export interface IProbabilityObject {
|
||||||
|
key: string;
|
||||||
|
relativeProbability: number;
|
||||||
|
data?: any;
|
||||||
|
}
|
||||||
|
@ -30,6 +30,8 @@ export interface Reputation {
|
|||||||
}
|
}
|
||||||
export interface Dynamic {
|
export interface Dynamic {
|
||||||
purchasesAreFoundInRaid: boolean;
|
purchasesAreFoundInRaid: boolean;
|
||||||
|
/** Use the highest trader price for an offer if its greater than the price in templates/prices.json */
|
||||||
|
useTraderPriceForOffersIfHigher: boolean;
|
||||||
barter: Barter;
|
barter: Barter;
|
||||||
offerAdjustment: OfferAdjustment;
|
offerAdjustment: OfferAdjustment;
|
||||||
expiredOfferThreshold: number;
|
expiredOfferThreshold: number;
|
||||||
|
@ -3,9 +3,8 @@ import { IBaseConfig } from "./IBaseConfig";
|
|||||||
export interface ITraderConfig extends IBaseConfig {
|
export interface ITraderConfig extends IBaseConfig {
|
||||||
kind: "aki-trader";
|
kind: "aki-trader";
|
||||||
updateTime: UpdateTime[];
|
updateTime: UpdateTime[];
|
||||||
|
purchasesAreFoundInRaid: boolean;
|
||||||
updateTimeDefault: number;
|
updateTimeDefault: number;
|
||||||
/** What % of max durability an item needs to sell to a trader*/
|
|
||||||
durabilityPurchaseThreshhold: Record<string, number>;
|
|
||||||
traderPriceMultipler: number;
|
traderPriceMultipler: number;
|
||||||
persistPurchaseDataInProfile: boolean;
|
persistPurchaseDataInProfile: boolean;
|
||||||
fence: FenceConfig;
|
fence: FenceConfig;
|
||||||
|
@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase {
|
|||||||
fleaPriceRoubles: number;
|
fleaPriceRoubles: number;
|
||||||
/** Price of the item in the handbook */
|
/** Price of the item in the handbook */
|
||||||
handbookPriceRoubles: number;
|
handbookPriceRoubles: number;
|
||||||
|
/** Handbook ParentId for the new item */
|
||||||
|
handbookParentId: string;
|
||||||
/**
|
/**
|
||||||
* A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr)
|
* A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr)
|
||||||
* If a language is not included, the first item in the array will be used in its place
|
* If a language is not included, the first item in the array will be used in its place
|
||||||
|
@ -63,8 +63,16 @@ export declare class InsuranceService {
|
|||||||
* @param offraidData post-raid request object
|
* @param offraidData post-raid request object
|
||||||
* @param preRaidGear gear player wore prior to raid
|
* @param preRaidGear gear player wore prior to raid
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
* @param playerDied did the player die in raid
|
||||||
|
*/
|
||||||
|
storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void;
|
||||||
|
/**
|
||||||
|
* Store insured items on pmc death inside insurance array in player profile
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param offraidData Player gear post-raid
|
||||||
|
* @param preRaidGear Player gear before raid
|
||||||
|
* @param sessionID Session id
|
||||||
*/
|
*/
|
||||||
storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void;
|
|
||||||
storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void;
|
storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void;
|
||||||
/**
|
/**
|
||||||
* Add gear item to InsuredItems array in player profile
|
* Add gear item to InsuredItems array in player profile
|
||||||
|
Binary file not shown.
@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<AssemblyName>CWX-WeatherPatcher</AssemblyName>
|
<AssemblyName>CWX-WeatherPatcher</AssemblyName>
|
||||||
<Version>2.4.9</Version>
|
<Version>2.5.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -3,7 +3,7 @@ using EFT.Weather;
|
|||||||
|
|
||||||
namespace CWX_WeatherPatcher
|
namespace CWX_WeatherPatcher
|
||||||
{
|
{
|
||||||
[BepInPlugin("com.CWX.WeatherPatcher", "CWX-WeatherPatcher", "2.4.9")]
|
[BepInPlugin("com.CWX.WeatherPatcher", "CWX-WeatherPatcher", "2.5.0")]
|
||||||
public class WeatherPatcher : BaseUnityPlugin
|
public class WeatherPatcher : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user