Update types for 3.5.7

This commit is contained in:
Dev 2023-05-30 10:48:07 +01:00
parent 34a7f5aaea
commit 7b6f0d7191
396 changed files with 2556 additions and 522 deletions

View File

@ -1,6 +1,7 @@
import { DialogueController } from "../controllers/DialogueController";
import { OnUpdate } from "../di/OnUpdate";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
import { IChatServer } from "../models/eft/dialog/IChatServer";
import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest";
import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest";
@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate {
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData<IFriendRequestSendResponse>;
acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;

View File

@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest";
import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest";
import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest";
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
@ -36,11 +37,13 @@ export declare class MatchCallbacks {
acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>;
/** Handle client/match/group/invite/cancel */
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>;
/** Handle client/match/group/transfer */
transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData<boolean>;
cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
/**
* Handle client/match/group/status
@ -49,6 +52,7 @@ export declare class MatchCallbacks {
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData;
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;

View File

@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IPmcData } from "../models/eft/common/IPmcData";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService";
import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileFixerService } from "../services/ProfileFixerService";
import { SeasonalEventService } from "../services/SeasonalEventService";
import { EncodingUtil } from "../utils/EncodingUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class GameController {
@ -29,6 +31,7 @@ export declare class GameController {
protected timeUtil: TimeUtil;
protected preAkiModLoader: PreAkiModLoader;
protected httpServerHelper: HttpServerHelper;
protected encodingUtil: EncodingUtil;
protected hideoutHelper: HideoutHelper;
protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService;
@ -38,10 +41,11 @@ export declare class GameController {
protected seasonalEventService: SeasonalEventService;
protected applicationContext: ApplicationContext;
protected configServer: ConfigServer;
protected os: any;
protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig;
protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, 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;
/**
* BSG have two values for shotgun dispersion, we make sure both have the same value
@ -91,6 +95,6 @@ export declare class GameController {
protected logProfileDetails(fullProfile: IAkiProfile): void;
getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): IServerDetails[];
getCurrentGroup(sessionId: any): any;
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
getValidGameVersion(): ICheckVersionResponse;
}

View File

@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
@ -35,6 +36,14 @@ export declare class InsuranceController {
* Process insurance items prior to being given to player in mail
*/
processReturn(): void;
/**
* Should the passed in item be removed from player inventory
* @param insuredItem Insurued item to roll to lose
* @param traderId Trader the item was insured by
* @param itemsBeingDeleted All items to remove from player
* @returns True if item should be removed
*/
protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean;
/**
* Add insurance to an item
* @param pmcData Player profile

View File

@ -38,8 +38,7 @@ export declare class MatchController {
getProfile(info: IGetProfileRequestData): IPmcData[];
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
deleteGroup(info: any): void;
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
protected getMatch(location: string): any;
joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult;
getGroupStatus(info: IGetGroupStatusRequestData): any;
/**
* Handle /client/raid/configuration

View File

@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator {
*/
protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[];
/**
* Gathers the reward options from config and scavcase.json into a single object
* Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object
* @param scavCaseDetails scavcase.json values
* @returns ScavCaseRewardCountsAndPrices object
*/

View File

@ -105,6 +105,7 @@ declare class ItemHelper {
* @returns bool - is valid + template item object as array
*/
getItem(tpl: string): [boolean, ITemplateItem];
isItemInDb(tpl: string): boolean;
/**
* get normalized value (0-1) based on item condition
* @param item

View File

@ -1,6 +1,7 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
@ -46,6 +47,14 @@ export declare class RagfairOfferHelper {
protected ragfairConfig: IRagfairConfig;
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);
/**
* Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
* @param searchRequest
* @param itemsToAdd
* @param traderAssorts Trader assorts
* @param pmcProfile Player profile
* @returns Offers the player should see
*/
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
* Get offers from flea/traders specifically when building weapon preset
@ -53,7 +62,7 @@ export declare class RagfairOfferHelper {
* @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
* @returns IRagfairOffer array
*/
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
@ -79,11 +88,49 @@ export declare class RagfairOfferHelper {
* Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level
* @param offers Offers to check
* @param pmcProfile Players profile with trader loyalty levels
* @returns array of offer ids player cannot see
*/
protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[];
/**
* Process all player-listed flea offers for a desired profile
* @param sessionID Session id to process offers for
* @returns true = complete
*/
processOffersOnProfile(sessionID: string): boolean;
/**
* Add amount to players ragfair rating
* @param sessionId Profile to update
* @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier)
*/
increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void;
/**
* Return all offers a player has listed on a desired profile
* @param sessionID Session id
* @returns Array of ragfair offers
*/
protected getProfileOffers(sessionID: string): IRagfairOffer[];
/**
* Delete an offer from a desired profile
* @param sessionID Session id of profile to delete offer from
* @param offerId Offer id to delete
*/
protected deleteOfferByOfferId(sessionID: string, offerId: string): void;
/**
* Complete the selling of players' offer
* @param sessionID Session id
* @param offer Sold offer details
* @param boughtAmount Amount item was purchased for
* @returns Client response
*/
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
/**
* Should a ragfair offer be visible to the player
* @param info Search request
* @param itemsToAdd ?
* @param traderAssorts Trader assort items
* @param offer The flea offer
* @param pmcProfile Player profile
* @returns True = should be shown to player
*/
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
}

View File

@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer";
import { RagfairServer } from "../servers/RagfairServer";
import { FenceService } from "../services/FenceService";
import { PaymentService } from "../services/PaymentService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class TradeHelper {
protected logger: ILogger;
protected eventOutputHolder: EventOutputHolder;
@ -20,11 +21,12 @@ export declare class TradeHelper {
protected itemHelper: ItemHelper;
protected paymentService: PaymentService;
protected fenceService: FenceService;
protected httpResponse: HttpResponseUtil;
protected inventoryHelper: InventoryHelper;
protected ragfairServer: RagfairServer;
protected configServer: ConfigServer;
protected traderConfig: ITraderConfig;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
/**
* Buy item from flea or trader
* @param pmcData Player profile
@ -38,7 +40,7 @@ export declare class TradeHelper {
/**
* Sell item to trader
* @param pmcData Profile to update
* @param sellRequest request data
* @param sellRequest Request data
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/

View File

@ -956,9 +956,11 @@ export interface Endurance {
MovementAction: number;
SprintAction: number;
GainPerFatigueStack: number;
DependentSkillRatios: IDependentSkillRatio[];
QTELevelMultipliers: Record<string, Record<string, number>>;
}
export interface Strength {
DependentSkillRatios: IDependentSkillRatio[];
SprintActionMin: number;
SprintActionMax: number;
MovementActionMin: number;
@ -969,6 +971,10 @@ export interface Strength {
FistfightAction: number;
ThrowAction: number;
}
export interface IDependentSkillRatio {
Ratio: number;
SkillId: string;
}
export interface IQTELevelMultiplier {
Level: number;
Multiplier: number;

View File

@ -49,7 +49,10 @@ export interface ILocationBase {
OldSpawn: boolean;
OpenZones: string;
Preview: Preview;
RequiredPlayerLevel: number;
RequiredPlayerLevel?: number;
RequiredPlayerLevelMin?: number;
RequiredPlayerLevelMax?: number;
MinPlayerLvlAccessKeys: number;
PmcMaxPlayersInGroup: number;
ScavMaxPlayersInGroup: number;
Rules: string;

View File

@ -258,7 +258,7 @@ export interface LastPlayerStateInfo {
Nickname: string;
Side: string;
Level: number;
MemberCategory: string;
MemberCategory: MemberCategory;
}
export interface BackendCounter {
id: string;
@ -273,6 +273,7 @@ export interface Hideout {
Production: Record<string, Productive>;
Areas: HideoutArea[];
Improvements: Record<string, IHideoutImprovement>;
Seed: number;
sptUpdateLastRunTimestamp: number;
}
export interface IHideoutImprovement {

View File

@ -256,9 +256,11 @@ export interface Props {
CompressorGain?: number;
CutoffFreq?: number;
Resonance?: number;
RolloffMultiplier?: number;
CompressorVolume?: number;
AmbientVolume?: number;
DryVolume?: number;
HighFrequenciesGain?: number;
foodUseTime?: number;
foodEffectType?: string;
StimulatorBuffs?: string;
@ -375,6 +377,7 @@ export interface Props {
ExplosionEffectType?: string;
LinkedWeapon?: string;
UseAmmoWithoutShell?: boolean;
RandomLootSettings: IRandomLootSettings;
}
export interface IHealthEffect {
type: string;
@ -439,6 +442,21 @@ export interface StackSlot {
export interface StackSlotProps {
filters: SlotFilter[];
}
export interface IRandomLootSettings {
allowToSpawnIdenticalItems: boolean;
allowToSpawnQuestItems: boolean;
countByRarity: any[];
excluded: IRandomLootExcluded;
filters: any[];
findInRaid: boolean;
maxCount: number;
minCount: number;
}
export interface IRandomLootExcluded {
categoryTemplates: any[];
rarity: string[];
templates: any[];
}
export interface EffectsHealth {
Energy: EffectsHealthProps;
Hydration: EffectsHealthProps;

View File

@ -0,0 +1,3 @@
export interface IAcceptFriendRequestData {
request_id: string;
}

View File

@ -0,0 +1,17 @@
import { MemberCategory } from "../../../models/enums/MemberCategory";
export interface ICurrentGroupResponse {
squad: any[];
}
export interface ICurrentGroupSquadMember {
_id: string;
aid: string;
info: ICurrentGroupMemberInfo;
isLeader: boolean;
isReady: boolean;
}
export interface ICurrentGroupMemberInfo {
Nickname: string;
Side: string;
Level: string;
MemberCategory: MemberCategory;
}

View File

@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData {
dt: string;
keyId: string;
raidMode: RaidMode;
startInGroup: boolean;
spawnPlace: string;
}

View File

@ -1,9 +1,6 @@
export interface IJoinMatchRequestData {
location: string;
savage: boolean;
dt: string;
groupid: string;
servers: Server[];
keyId: string;
}
export interface Server {
ping: number;

View File

@ -1,5 +1,10 @@
export interface IJoinMatchResult {
maxPveCountExceeded: boolean;
profiles: IJoinMatchPlayerProfile[];
}
export interface IJoinMatchPlayerProfile {
profileid: string;
profileToken: string;
status: string;
sid: string;
ip: string;

View File

@ -0,0 +1,3 @@
export interface ITransferGroupRequest {
aidToChange: string;
}

View File

@ -104,7 +104,7 @@ export interface IUpdatableChatMember {
Nickname: string;
Side: string;
Level: number;
MemberCategory: string;
MemberCategory: MemberCategory;
Ignored: boolean;
Banned: boolean;
}

View File

@ -1,7 +1,7 @@
export interface ScavCaseRewardCountsAndPrices {
common: RewardCountAndPriceDetails;
rare: RewardCountAndPriceDetails;
superrare: RewardCountAndPriceDetails;
Common: RewardCountAndPriceDetails;
Rare: RewardCountAndPriceDetails;
Superrare: RewardCountAndPriceDetails;
}
export interface RewardCountAndPriceDetails {
minCount: number;

View File

@ -73,14 +73,6 @@ export declare class InsuranceService {
* @returns Hashtable
*/
protected createItemHashTable(items: Item[]): Record<string, Item>;
/**
* 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
*/
storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void;
/**
* Add gear item to InsuredItems array in player profile
* @param pmcData profile to store item in

View File

@ -1,6 +1,7 @@
import { DialogueController } from "../controllers/DialogueController";
import { OnUpdate } from "../di/OnUpdate";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
import { IChatServer } from "../models/eft/dialog/IChatServer";
import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest";
import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest";
@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate {
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData<IFriendRequestSendResponse>;
acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;

View File

@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest";
import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest";
import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest";
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
@ -36,11 +37,13 @@ export declare class MatchCallbacks {
acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>;
/** Handle client/match/group/invite/cancel */
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>;
/** Handle client/match/group/transfer */
transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData<boolean>;
cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
/**
* Handle client/match/group/status
@ -49,6 +52,7 @@ export declare class MatchCallbacks {
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData;
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;

View File

@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IPmcData } from "../models/eft/common/IPmcData";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService";
import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileFixerService } from "../services/ProfileFixerService";
import { SeasonalEventService } from "../services/SeasonalEventService";
import { EncodingUtil } from "../utils/EncodingUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class GameController {
@ -29,6 +31,7 @@ export declare class GameController {
protected timeUtil: TimeUtil;
protected preAkiModLoader: PreAkiModLoader;
protected httpServerHelper: HttpServerHelper;
protected encodingUtil: EncodingUtil;
protected hideoutHelper: HideoutHelper;
protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService;
@ -38,10 +41,11 @@ export declare class GameController {
protected seasonalEventService: SeasonalEventService;
protected applicationContext: ApplicationContext;
protected configServer: ConfigServer;
protected os: any;
protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig;
protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, 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;
/**
* BSG have two values for shotgun dispersion, we make sure both have the same value
@ -91,6 +95,6 @@ export declare class GameController {
protected logProfileDetails(fullProfile: IAkiProfile): void;
getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): IServerDetails[];
getCurrentGroup(sessionId: any): any;
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
getValidGameVersion(): ICheckVersionResponse;
}

View File

@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
@ -35,6 +36,14 @@ export declare class InsuranceController {
* Process insurance items prior to being given to player in mail
*/
processReturn(): void;
/**
* Should the passed in item be removed from player inventory
* @param insuredItem Insurued item to roll to lose
* @param traderId Trader the item was insured by
* @param itemsBeingDeleted All items to remove from player
* @returns True if item should be removed
*/
protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean;
/**
* Add insurance to an item
* @param pmcData Player profile

View File

@ -38,8 +38,7 @@ export declare class MatchController {
getProfile(info: IGetProfileRequestData): IPmcData[];
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
deleteGroup(info: any): void;
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
protected getMatch(location: string): any;
joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult;
getGroupStatus(info: IGetGroupStatusRequestData): any;
/**
* Handle /client/raid/configuration

View File

@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator {
*/
protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[];
/**
* Gathers the reward options from config and scavcase.json into a single object
* Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object
* @param scavCaseDetails scavcase.json values
* @returns ScavCaseRewardCountsAndPrices object
*/

View File

@ -105,6 +105,7 @@ declare class ItemHelper {
* @returns bool - is valid + template item object as array
*/
getItem(tpl: string): [boolean, ITemplateItem];
isItemInDb(tpl: string): boolean;
/**
* get normalized value (0-1) based on item condition
* @param item

View File

@ -1,6 +1,7 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
@ -46,6 +47,14 @@ export declare class RagfairOfferHelper {
protected ragfairConfig: IRagfairConfig;
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);
/**
* Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
* @param searchRequest
* @param itemsToAdd
* @param traderAssorts Trader assorts
* @param pmcProfile Player profile
* @returns Offers the player should see
*/
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
* Get offers from flea/traders specifically when building weapon preset
@ -53,7 +62,7 @@ export declare class RagfairOfferHelper {
* @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
* @returns IRagfairOffer array
*/
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
@ -79,11 +88,49 @@ export declare class RagfairOfferHelper {
* Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level
* @param offers Offers to check
* @param pmcProfile Players profile with trader loyalty levels
* @returns array of offer ids player cannot see
*/
protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[];
/**
* Process all player-listed flea offers for a desired profile
* @param sessionID Session id to process offers for
* @returns true = complete
*/
processOffersOnProfile(sessionID: string): boolean;
/**
* Add amount to players ragfair rating
* @param sessionId Profile to update
* @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier)
*/
increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void;
/**
* Return all offers a player has listed on a desired profile
* @param sessionID Session id
* @returns Array of ragfair offers
*/
protected getProfileOffers(sessionID: string): IRagfairOffer[];
/**
* Delete an offer from a desired profile
* @param sessionID Session id of profile to delete offer from
* @param offerId Offer id to delete
*/
protected deleteOfferByOfferId(sessionID: string, offerId: string): void;
/**
* Complete the selling of players' offer
* @param sessionID Session id
* @param offer Sold offer details
* @param boughtAmount Amount item was purchased for
* @returns Client response
*/
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
/**
* Should a ragfair offer be visible to the player
* @param info Search request
* @param itemsToAdd ?
* @param traderAssorts Trader assort items
* @param offer The flea offer
* @param pmcProfile Player profile
* @returns True = should be shown to player
*/
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
}

View File

@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer";
import { RagfairServer } from "../servers/RagfairServer";
import { FenceService } from "../services/FenceService";
import { PaymentService } from "../services/PaymentService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class TradeHelper {
protected logger: ILogger;
protected eventOutputHolder: EventOutputHolder;
@ -20,11 +21,12 @@ export declare class TradeHelper {
protected itemHelper: ItemHelper;
protected paymentService: PaymentService;
protected fenceService: FenceService;
protected httpResponse: HttpResponseUtil;
protected inventoryHelper: InventoryHelper;
protected ragfairServer: RagfairServer;
protected configServer: ConfigServer;
protected traderConfig: ITraderConfig;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
/**
* Buy item from flea or trader
* @param pmcData Player profile
@ -38,7 +40,7 @@ export declare class TradeHelper {
/**
* Sell item to trader
* @param pmcData Profile to update
* @param sellRequest request data
* @param sellRequest Request data
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/

View File

@ -956,9 +956,11 @@ export interface Endurance {
MovementAction: number;
SprintAction: number;
GainPerFatigueStack: number;
DependentSkillRatios: IDependentSkillRatio[];
QTELevelMultipliers: Record<string, Record<string, number>>;
}
export interface Strength {
DependentSkillRatios: IDependentSkillRatio[];
SprintActionMin: number;
SprintActionMax: number;
MovementActionMin: number;
@ -969,6 +971,10 @@ export interface Strength {
FistfightAction: number;
ThrowAction: number;
}
export interface IDependentSkillRatio {
Ratio: number;
SkillId: string;
}
export interface IQTELevelMultiplier {
Level: number;
Multiplier: number;

View File

@ -49,7 +49,10 @@ export interface ILocationBase {
OldSpawn: boolean;
OpenZones: string;
Preview: Preview;
RequiredPlayerLevel: number;
RequiredPlayerLevel?: number;
RequiredPlayerLevelMin?: number;
RequiredPlayerLevelMax?: number;
MinPlayerLvlAccessKeys: number;
PmcMaxPlayersInGroup: number;
ScavMaxPlayersInGroup: number;
Rules: string;

View File

@ -258,7 +258,7 @@ export interface LastPlayerStateInfo {
Nickname: string;
Side: string;
Level: number;
MemberCategory: string;
MemberCategory: MemberCategory;
}
export interface BackendCounter {
id: string;
@ -273,6 +273,7 @@ export interface Hideout {
Production: Record<string, Productive>;
Areas: HideoutArea[];
Improvements: Record<string, IHideoutImprovement>;
Seed: number;
sptUpdateLastRunTimestamp: number;
}
export interface IHideoutImprovement {

View File

@ -256,9 +256,11 @@ export interface Props {
CompressorGain?: number;
CutoffFreq?: number;
Resonance?: number;
RolloffMultiplier?: number;
CompressorVolume?: number;
AmbientVolume?: number;
DryVolume?: number;
HighFrequenciesGain?: number;
foodUseTime?: number;
foodEffectType?: string;
StimulatorBuffs?: string;
@ -375,6 +377,7 @@ export interface Props {
ExplosionEffectType?: string;
LinkedWeapon?: string;
UseAmmoWithoutShell?: boolean;
RandomLootSettings: IRandomLootSettings;
}
export interface IHealthEffect {
type: string;
@ -439,6 +442,21 @@ export interface StackSlot {
export interface StackSlotProps {
filters: SlotFilter[];
}
export interface IRandomLootSettings {
allowToSpawnIdenticalItems: boolean;
allowToSpawnQuestItems: boolean;
countByRarity: any[];
excluded: IRandomLootExcluded;
filters: any[];
findInRaid: boolean;
maxCount: number;
minCount: number;
}
export interface IRandomLootExcluded {
categoryTemplates: any[];
rarity: string[];
templates: any[];
}
export interface EffectsHealth {
Energy: EffectsHealthProps;
Hydration: EffectsHealthProps;

View File

@ -0,0 +1,3 @@
export interface IAcceptFriendRequestData {
request_id: string;
}

View File

@ -0,0 +1,17 @@
import { MemberCategory } from "../../../models/enums/MemberCategory";
export interface ICurrentGroupResponse {
squad: any[];
}
export interface ICurrentGroupSquadMember {
_id: string;
aid: string;
info: ICurrentGroupMemberInfo;
isLeader: boolean;
isReady: boolean;
}
export interface ICurrentGroupMemberInfo {
Nickname: string;
Side: string;
Level: string;
MemberCategory: MemberCategory;
}

View File

@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData {
dt: string;
keyId: string;
raidMode: RaidMode;
startInGroup: boolean;
spawnPlace: string;
}

View File

@ -1,9 +1,6 @@
export interface IJoinMatchRequestData {
location: string;
savage: boolean;
dt: string;
groupid: string;
servers: Server[];
keyId: string;
}
export interface Server {
ping: number;

View File

@ -1,5 +1,10 @@
export interface IJoinMatchResult {
maxPveCountExceeded: boolean;
profiles: IJoinMatchPlayerProfile[];
}
export interface IJoinMatchPlayerProfile {
profileid: string;
profileToken: string;
status: string;
sid: string;
ip: string;

View File

@ -0,0 +1,3 @@
export interface ITransferGroupRequest {
aidToChange: string;
}

View File

@ -104,7 +104,7 @@ export interface IUpdatableChatMember {
Nickname: string;
Side: string;
Level: number;
MemberCategory: string;
MemberCategory: MemberCategory;
Ignored: boolean;
Banned: boolean;
}

View File

@ -1,7 +1,7 @@
export interface ScavCaseRewardCountsAndPrices {
common: RewardCountAndPriceDetails;
rare: RewardCountAndPriceDetails;
superrare: RewardCountAndPriceDetails;
Common: RewardCountAndPriceDetails;
Rare: RewardCountAndPriceDetails;
Superrare: RewardCountAndPriceDetails;
}
export interface RewardCountAndPriceDetails {
minCount: number;

View File

@ -73,14 +73,6 @@ export declare class InsuranceService {
* @returns Hashtable
*/
protected createItemHashTable(items: Item[]): Record<string, Item>;
/**
* 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
*/
storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void;
/**
* Add gear item to InsuredItems array in player profile
* @param pmcData profile to store item in

View File

@ -1,6 +1,7 @@
import { DialogueController } from "../controllers/DialogueController";
import { OnUpdate } from "../di/OnUpdate";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
import { IChatServer } from "../models/eft/dialog/IChatServer";
import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest";
import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest";
@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate {
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData<IFriendRequestSendResponse>;
acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;

View File

@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest";
import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest";
import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest";
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
@ -36,11 +37,13 @@ export declare class MatchCallbacks {
acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>;
/** Handle client/match/group/invite/cancel */
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>;
/** Handle client/match/group/transfer */
transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData<boolean>;
cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
/**
* Handle client/match/group/status
@ -49,6 +52,7 @@ export declare class MatchCallbacks {
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData;
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;

View File

@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IPmcData } from "../models/eft/common/IPmcData";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService";
import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileFixerService } from "../services/ProfileFixerService";
import { SeasonalEventService } from "../services/SeasonalEventService";
import { EncodingUtil } from "../utils/EncodingUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class GameController {
@ -29,6 +31,7 @@ export declare class GameController {
protected timeUtil: TimeUtil;
protected preAkiModLoader: PreAkiModLoader;
protected httpServerHelper: HttpServerHelper;
protected encodingUtil: EncodingUtil;
protected hideoutHelper: HideoutHelper;
protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService;
@ -38,10 +41,11 @@ export declare class GameController {
protected seasonalEventService: SeasonalEventService;
protected applicationContext: ApplicationContext;
protected configServer: ConfigServer;
protected os: any;
protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig;
protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, 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;
/**
* BSG have two values for shotgun dispersion, we make sure both have the same value
@ -91,6 +95,6 @@ export declare class GameController {
protected logProfileDetails(fullProfile: IAkiProfile): void;
getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): IServerDetails[];
getCurrentGroup(sessionId: any): any;
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
getValidGameVersion(): ICheckVersionResponse;
}

View File

@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
@ -35,6 +36,14 @@ export declare class InsuranceController {
* Process insurance items prior to being given to player in mail
*/
processReturn(): void;
/**
* Should the passed in item be removed from player inventory
* @param insuredItem Insurued item to roll to lose
* @param traderId Trader the item was insured by
* @param itemsBeingDeleted All items to remove from player
* @returns True if item should be removed
*/
protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean;
/**
* Add insurance to an item
* @param pmcData Player profile

View File

@ -38,8 +38,7 @@ export declare class MatchController {
getProfile(info: IGetProfileRequestData): IPmcData[];
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
deleteGroup(info: any): void;
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
protected getMatch(location: string): any;
joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult;
getGroupStatus(info: IGetGroupStatusRequestData): any;
/**
* Handle /client/raid/configuration

View File

@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator {
*/
protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[];
/**
* Gathers the reward options from config and scavcase.json into a single object
* Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object
* @param scavCaseDetails scavcase.json values
* @returns ScavCaseRewardCountsAndPrices object
*/

View File

@ -105,6 +105,7 @@ declare class ItemHelper {
* @returns bool - is valid + template item object as array
*/
getItem(tpl: string): [boolean, ITemplateItem];
isItemInDb(tpl: string): boolean;
/**
* get normalized value (0-1) based on item condition
* @param item

View File

@ -1,6 +1,7 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
@ -46,6 +47,14 @@ export declare class RagfairOfferHelper {
protected ragfairConfig: IRagfairConfig;
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);
/**
* Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
* @param searchRequest
* @param itemsToAdd
* @param traderAssorts Trader assorts
* @param pmcProfile Player profile
* @returns Offers the player should see
*/
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
* Get offers from flea/traders specifically when building weapon preset
@ -53,7 +62,7 @@ export declare class RagfairOfferHelper {
* @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
* @returns IRagfairOffer array
*/
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
@ -79,11 +88,49 @@ export declare class RagfairOfferHelper {
* Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level
* @param offers Offers to check
* @param pmcProfile Players profile with trader loyalty levels
* @returns array of offer ids player cannot see
*/
protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[];
/**
* Process all player-listed flea offers for a desired profile
* @param sessionID Session id to process offers for
* @returns true = complete
*/
processOffersOnProfile(sessionID: string): boolean;
/**
* Add amount to players ragfair rating
* @param sessionId Profile to update
* @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier)
*/
increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void;
/**
* Return all offers a player has listed on a desired profile
* @param sessionID Session id
* @returns Array of ragfair offers
*/
protected getProfileOffers(sessionID: string): IRagfairOffer[];
/**
* Delete an offer from a desired profile
* @param sessionID Session id of profile to delete offer from
* @param offerId Offer id to delete
*/
protected deleteOfferByOfferId(sessionID: string, offerId: string): void;
/**
* Complete the selling of players' offer
* @param sessionID Session id
* @param offer Sold offer details
* @param boughtAmount Amount item was purchased for
* @returns Client response
*/
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
/**
* Should a ragfair offer be visible to the player
* @param info Search request
* @param itemsToAdd ?
* @param traderAssorts Trader assort items
* @param offer The flea offer
* @param pmcProfile Player profile
* @returns True = should be shown to player
*/
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
}

View File

@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer";
import { RagfairServer } from "../servers/RagfairServer";
import { FenceService } from "../services/FenceService";
import { PaymentService } from "../services/PaymentService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class TradeHelper {
protected logger: ILogger;
protected eventOutputHolder: EventOutputHolder;
@ -20,11 +21,12 @@ export declare class TradeHelper {
protected itemHelper: ItemHelper;
protected paymentService: PaymentService;
protected fenceService: FenceService;
protected httpResponse: HttpResponseUtil;
protected inventoryHelper: InventoryHelper;
protected ragfairServer: RagfairServer;
protected configServer: ConfigServer;
protected traderConfig: ITraderConfig;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
/**
* Buy item from flea or trader
* @param pmcData Player profile
@ -38,7 +40,7 @@ export declare class TradeHelper {
/**
* Sell item to trader
* @param pmcData Profile to update
* @param sellRequest request data
* @param sellRequest Request data
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/

View File

@ -956,9 +956,11 @@ export interface Endurance {
MovementAction: number;
SprintAction: number;
GainPerFatigueStack: number;
DependentSkillRatios: IDependentSkillRatio[];
QTELevelMultipliers: Record<string, Record<string, number>>;
}
export interface Strength {
DependentSkillRatios: IDependentSkillRatio[];
SprintActionMin: number;
SprintActionMax: number;
MovementActionMin: number;
@ -969,6 +971,10 @@ export interface Strength {
FistfightAction: number;
ThrowAction: number;
}
export interface IDependentSkillRatio {
Ratio: number;
SkillId: string;
}
export interface IQTELevelMultiplier {
Level: number;
Multiplier: number;

View File

@ -49,7 +49,10 @@ export interface ILocationBase {
OldSpawn: boolean;
OpenZones: string;
Preview: Preview;
RequiredPlayerLevel: number;
RequiredPlayerLevel?: number;
RequiredPlayerLevelMin?: number;
RequiredPlayerLevelMax?: number;
MinPlayerLvlAccessKeys: number;
PmcMaxPlayersInGroup: number;
ScavMaxPlayersInGroup: number;
Rules: string;

View File

@ -258,7 +258,7 @@ export interface LastPlayerStateInfo {
Nickname: string;
Side: string;
Level: number;
MemberCategory: string;
MemberCategory: MemberCategory;
}
export interface BackendCounter {
id: string;
@ -273,6 +273,7 @@ export interface Hideout {
Production: Record<string, Productive>;
Areas: HideoutArea[];
Improvements: Record<string, IHideoutImprovement>;
Seed: number;
sptUpdateLastRunTimestamp: number;
}
export interface IHideoutImprovement {

View File

@ -256,9 +256,11 @@ export interface Props {
CompressorGain?: number;
CutoffFreq?: number;
Resonance?: number;
RolloffMultiplier?: number;
CompressorVolume?: number;
AmbientVolume?: number;
DryVolume?: number;
HighFrequenciesGain?: number;
foodUseTime?: number;
foodEffectType?: string;
StimulatorBuffs?: string;
@ -375,6 +377,7 @@ export interface Props {
ExplosionEffectType?: string;
LinkedWeapon?: string;
UseAmmoWithoutShell?: boolean;
RandomLootSettings: IRandomLootSettings;
}
export interface IHealthEffect {
type: string;
@ -439,6 +442,21 @@ export interface StackSlot {
export interface StackSlotProps {
filters: SlotFilter[];
}
export interface IRandomLootSettings {
allowToSpawnIdenticalItems: boolean;
allowToSpawnQuestItems: boolean;
countByRarity: any[];
excluded: IRandomLootExcluded;
filters: any[];
findInRaid: boolean;
maxCount: number;
minCount: number;
}
export interface IRandomLootExcluded {
categoryTemplates: any[];
rarity: string[];
templates: any[];
}
export interface EffectsHealth {
Energy: EffectsHealthProps;
Hydration: EffectsHealthProps;

View File

@ -0,0 +1,3 @@
export interface IAcceptFriendRequestData {
request_id: string;
}

View File

@ -0,0 +1,17 @@
import { MemberCategory } from "../../../models/enums/MemberCategory";
export interface ICurrentGroupResponse {
squad: any[];
}
export interface ICurrentGroupSquadMember {
_id: string;
aid: string;
info: ICurrentGroupMemberInfo;
isLeader: boolean;
isReady: boolean;
}
export interface ICurrentGroupMemberInfo {
Nickname: string;
Side: string;
Level: string;
MemberCategory: MemberCategory;
}

View File

@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData {
dt: string;
keyId: string;
raidMode: RaidMode;
startInGroup: boolean;
spawnPlace: string;
}

View File

@ -1,9 +1,6 @@
export interface IJoinMatchRequestData {
location: string;
savage: boolean;
dt: string;
groupid: string;
servers: Server[];
keyId: string;
}
export interface Server {
ping: number;

View File

@ -1,5 +1,10 @@
export interface IJoinMatchResult {
maxPveCountExceeded: boolean;
profiles: IJoinMatchPlayerProfile[];
}
export interface IJoinMatchPlayerProfile {
profileid: string;
profileToken: string;
status: string;
sid: string;
ip: string;

View File

@ -0,0 +1,3 @@
export interface ITransferGroupRequest {
aidToChange: string;
}

View File

@ -104,7 +104,7 @@ export interface IUpdatableChatMember {
Nickname: string;
Side: string;
Level: number;
MemberCategory: string;
MemberCategory: MemberCategory;
Ignored: boolean;
Banned: boolean;
}

View File

@ -1,7 +1,7 @@
export interface ScavCaseRewardCountsAndPrices {
common: RewardCountAndPriceDetails;
rare: RewardCountAndPriceDetails;
superrare: RewardCountAndPriceDetails;
Common: RewardCountAndPriceDetails;
Rare: RewardCountAndPriceDetails;
Superrare: RewardCountAndPriceDetails;
}
export interface RewardCountAndPriceDetails {
minCount: number;

View File

@ -73,14 +73,6 @@ export declare class InsuranceService {
* @returns Hashtable
*/
protected createItemHashTable(items: Item[]): Record<string, Item>;
/**
* 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
*/
storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void;
/**
* Add gear item to InsuredItems array in player profile
* @param pmcData profile to store item in

View File

@ -1,6 +1,7 @@
import { DialogueController } from "../controllers/DialogueController";
import { OnUpdate } from "../di/OnUpdate";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
import { IChatServer } from "../models/eft/dialog/IChatServer";
import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest";
import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest";
@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate {
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData<IFriendRequestSendResponse>;
acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;

View File

@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest";
import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest";
import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest";
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
@ -36,11 +37,13 @@ export declare class MatchCallbacks {
acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>;
/** Handle client/match/group/invite/cancel */
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>;
/** Handle client/match/group/transfer */
transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData<boolean>;
cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
/**
* Handle client/match/group/status
@ -49,6 +52,7 @@ export declare class MatchCallbacks {
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData;
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;

View File

@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IPmcData } from "../models/eft/common/IPmcData";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService";
import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileFixerService } from "../services/ProfileFixerService";
import { SeasonalEventService } from "../services/SeasonalEventService";
import { EncodingUtil } from "../utils/EncodingUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class GameController {
@ -29,6 +31,7 @@ export declare class GameController {
protected timeUtil: TimeUtil;
protected preAkiModLoader: PreAkiModLoader;
protected httpServerHelper: HttpServerHelper;
protected encodingUtil: EncodingUtil;
protected hideoutHelper: HideoutHelper;
protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService;
@ -38,10 +41,11 @@ export declare class GameController {
protected seasonalEventService: SeasonalEventService;
protected applicationContext: ApplicationContext;
protected configServer: ConfigServer;
protected os: any;
protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig;
protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, 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;
/**
* BSG have two values for shotgun dispersion, we make sure both have the same value
@ -91,6 +95,6 @@ export declare class GameController {
protected logProfileDetails(fullProfile: IAkiProfile): void;
getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): IServerDetails[];
getCurrentGroup(sessionId: any): any;
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
getValidGameVersion(): ICheckVersionResponse;
}

View File

@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
@ -35,6 +36,14 @@ export declare class InsuranceController {
* Process insurance items prior to being given to player in mail
*/
processReturn(): void;
/**
* Should the passed in item be removed from player inventory
* @param insuredItem Insurued item to roll to lose
* @param traderId Trader the item was insured by
* @param itemsBeingDeleted All items to remove from player
* @returns True if item should be removed
*/
protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean;
/**
* Add insurance to an item
* @param pmcData Player profile

View File

@ -38,8 +38,7 @@ export declare class MatchController {
getProfile(info: IGetProfileRequestData): IPmcData[];
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
deleteGroup(info: any): void;
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
protected getMatch(location: string): any;
joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult;
getGroupStatus(info: IGetGroupStatusRequestData): any;
/**
* Handle /client/raid/configuration

View File

@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator {
*/
protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[];
/**
* Gathers the reward options from config and scavcase.json into a single object
* Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object
* @param scavCaseDetails scavcase.json values
* @returns ScavCaseRewardCountsAndPrices object
*/

View File

@ -105,6 +105,7 @@ declare class ItemHelper {
* @returns bool - is valid + template item object as array
*/
getItem(tpl: string): [boolean, ITemplateItem];
isItemInDb(tpl: string): boolean;
/**
* get normalized value (0-1) based on item condition
* @param item

View File

@ -1,6 +1,7 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
@ -46,6 +47,14 @@ export declare class RagfairOfferHelper {
protected ragfairConfig: IRagfairConfig;
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);
/**
* Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
* @param searchRequest
* @param itemsToAdd
* @param traderAssorts Trader assorts
* @param pmcProfile Player profile
* @returns Offers the player should see
*/
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
* Get offers from flea/traders specifically when building weapon preset
@ -53,7 +62,7 @@ export declare class RagfairOfferHelper {
* @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
* @returns IRagfairOffer array
*/
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
@ -79,11 +88,49 @@ export declare class RagfairOfferHelper {
* Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level
* @param offers Offers to check
* @param pmcProfile Players profile with trader loyalty levels
* @returns array of offer ids player cannot see
*/
protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[];
/**
* Process all player-listed flea offers for a desired profile
* @param sessionID Session id to process offers for
* @returns true = complete
*/
processOffersOnProfile(sessionID: string): boolean;
/**
* Add amount to players ragfair rating
* @param sessionId Profile to update
* @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier)
*/
increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void;
/**
* Return all offers a player has listed on a desired profile
* @param sessionID Session id
* @returns Array of ragfair offers
*/
protected getProfileOffers(sessionID: string): IRagfairOffer[];
/**
* Delete an offer from a desired profile
* @param sessionID Session id of profile to delete offer from
* @param offerId Offer id to delete
*/
protected deleteOfferByOfferId(sessionID: string, offerId: string): void;
/**
* Complete the selling of players' offer
* @param sessionID Session id
* @param offer Sold offer details
* @param boughtAmount Amount item was purchased for
* @returns Client response
*/
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
/**
* Should a ragfair offer be visible to the player
* @param info Search request
* @param itemsToAdd ?
* @param traderAssorts Trader assort items
* @param offer The flea offer
* @param pmcProfile Player profile
* @returns True = should be shown to player
*/
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
}

View File

@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer";
import { RagfairServer } from "../servers/RagfairServer";
import { FenceService } from "../services/FenceService";
import { PaymentService } from "../services/PaymentService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class TradeHelper {
protected logger: ILogger;
protected eventOutputHolder: EventOutputHolder;
@ -20,11 +21,12 @@ export declare class TradeHelper {
protected itemHelper: ItemHelper;
protected paymentService: PaymentService;
protected fenceService: FenceService;
protected httpResponse: HttpResponseUtil;
protected inventoryHelper: InventoryHelper;
protected ragfairServer: RagfairServer;
protected configServer: ConfigServer;
protected traderConfig: ITraderConfig;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
/**
* Buy item from flea or trader
* @param pmcData Player profile
@ -38,7 +40,7 @@ export declare class TradeHelper {
/**
* Sell item to trader
* @param pmcData Profile to update
* @param sellRequest request data
* @param sellRequest Request data
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/

View File

@ -956,9 +956,11 @@ export interface Endurance {
MovementAction: number;
SprintAction: number;
GainPerFatigueStack: number;
DependentSkillRatios: IDependentSkillRatio[];
QTELevelMultipliers: Record<string, Record<string, number>>;
}
export interface Strength {
DependentSkillRatios: IDependentSkillRatio[];
SprintActionMin: number;
SprintActionMax: number;
MovementActionMin: number;
@ -969,6 +971,10 @@ export interface Strength {
FistfightAction: number;
ThrowAction: number;
}
export interface IDependentSkillRatio {
Ratio: number;
SkillId: string;
}
export interface IQTELevelMultiplier {
Level: number;
Multiplier: number;

View File

@ -49,7 +49,10 @@ export interface ILocationBase {
OldSpawn: boolean;
OpenZones: string;
Preview: Preview;
RequiredPlayerLevel: number;
RequiredPlayerLevel?: number;
RequiredPlayerLevelMin?: number;
RequiredPlayerLevelMax?: number;
MinPlayerLvlAccessKeys: number;
PmcMaxPlayersInGroup: number;
ScavMaxPlayersInGroup: number;
Rules: string;

View File

@ -258,7 +258,7 @@ export interface LastPlayerStateInfo {
Nickname: string;
Side: string;
Level: number;
MemberCategory: string;
MemberCategory: MemberCategory;
}
export interface BackendCounter {
id: string;
@ -273,6 +273,7 @@ export interface Hideout {
Production: Record<string, Productive>;
Areas: HideoutArea[];
Improvements: Record<string, IHideoutImprovement>;
Seed: number;
sptUpdateLastRunTimestamp: number;
}
export interface IHideoutImprovement {

View File

@ -256,9 +256,11 @@ export interface Props {
CompressorGain?: number;
CutoffFreq?: number;
Resonance?: number;
RolloffMultiplier?: number;
CompressorVolume?: number;
AmbientVolume?: number;
DryVolume?: number;
HighFrequenciesGain?: number;
foodUseTime?: number;
foodEffectType?: string;
StimulatorBuffs?: string;
@ -375,6 +377,7 @@ export interface Props {
ExplosionEffectType?: string;
LinkedWeapon?: string;
UseAmmoWithoutShell?: boolean;
RandomLootSettings: IRandomLootSettings;
}
export interface IHealthEffect {
type: string;
@ -439,6 +442,21 @@ export interface StackSlot {
export interface StackSlotProps {
filters: SlotFilter[];
}
export interface IRandomLootSettings {
allowToSpawnIdenticalItems: boolean;
allowToSpawnQuestItems: boolean;
countByRarity: any[];
excluded: IRandomLootExcluded;
filters: any[];
findInRaid: boolean;
maxCount: number;
minCount: number;
}
export interface IRandomLootExcluded {
categoryTemplates: any[];
rarity: string[];
templates: any[];
}
export interface EffectsHealth {
Energy: EffectsHealthProps;
Hydration: EffectsHealthProps;

View File

@ -0,0 +1,3 @@
export interface IAcceptFriendRequestData {
request_id: string;
}

View File

@ -0,0 +1,17 @@
import { MemberCategory } from "../../../models/enums/MemberCategory";
export interface ICurrentGroupResponse {
squad: any[];
}
export interface ICurrentGroupSquadMember {
_id: string;
aid: string;
info: ICurrentGroupMemberInfo;
isLeader: boolean;
isReady: boolean;
}
export interface ICurrentGroupMemberInfo {
Nickname: string;
Side: string;
Level: string;
MemberCategory: MemberCategory;
}

View File

@ -5,5 +5,5 @@ export interface IGetGroupStatusRequestData {
dt: string;
keyId: string;
raidMode: RaidMode;
startInGroup: boolean;
spawnPlace: string;
}

View File

@ -1,9 +1,6 @@
export interface IJoinMatchRequestData {
location: string;
savage: boolean;
dt: string;
groupid: string;
servers: Server[];
keyId: string;
}
export interface Server {
ping: number;

View File

@ -1,5 +1,10 @@
export interface IJoinMatchResult {
maxPveCountExceeded: boolean;
profiles: IJoinMatchPlayerProfile[];
}
export interface IJoinMatchPlayerProfile {
profileid: string;
profileToken: string;
status: string;
sid: string;
ip: string;

View File

@ -0,0 +1,3 @@
export interface ITransferGroupRequest {
aidToChange: string;
}

View File

@ -104,7 +104,7 @@ export interface IUpdatableChatMember {
Nickname: string;
Side: string;
Level: number;
MemberCategory: string;
MemberCategory: MemberCategory;
Ignored: boolean;
Banned: boolean;
}

View File

@ -1,7 +1,7 @@
export interface ScavCaseRewardCountsAndPrices {
common: RewardCountAndPriceDetails;
rare: RewardCountAndPriceDetails;
superrare: RewardCountAndPriceDetails;
Common: RewardCountAndPriceDetails;
Rare: RewardCountAndPriceDetails;
Superrare: RewardCountAndPriceDetails;
}
export interface RewardCountAndPriceDetails {
minCount: number;

View File

@ -73,14 +73,6 @@ export declare class InsuranceService {
* @returns Hashtable
*/
protected createItemHashTable(items: Item[]): Record<string, Item>;
/**
* 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
*/
storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void;
/**
* Add gear item to InsuredItems array in player profile
* @param pmcData profile to store item in

View File

@ -1,6 +1,7 @@
import { DialogueController } from "../controllers/DialogueController";
import { OnUpdate } from "../di/OnUpdate";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
import { IChatServer } from "../models/eft/dialog/IChatServer";
import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest";
import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest";
@ -61,6 +62,7 @@ export declare class DialogueCallbacks implements OnUpdate {
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData<IFriendRequestSendResponse>;
acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;

View File

@ -16,6 +16,7 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest";
import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest";
import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest";
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
@ -36,11 +37,13 @@ export declare class MatchCallbacks {
acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>;
/** Handle client/match/group/invite/cancel */
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>;
/** Handle client/match/group/transfer */
transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData<boolean>;
cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
/**
* Handle client/match/group/status
@ -49,6 +52,7 @@ export declare class MatchCallbacks {
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData;
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;

View File

@ -6,6 +6,7 @@ import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IPmcData } from "../models/eft/common/IPmcData";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService";
import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileFixerService } from "../services/ProfileFixerService";
import { SeasonalEventService } from "../services/SeasonalEventService";
import { EncodingUtil } from "../utils/EncodingUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class GameController {
@ -29,6 +31,7 @@ export declare class GameController {
protected timeUtil: TimeUtil;
protected preAkiModLoader: PreAkiModLoader;
protected httpServerHelper: HttpServerHelper;
protected encodingUtil: EncodingUtil;
protected hideoutHelper: HideoutHelper;
protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService;
@ -38,10 +41,11 @@ export declare class GameController {
protected seasonalEventService: SeasonalEventService;
protected applicationContext: ApplicationContext;
protected configServer: ConfigServer;
protected os: any;
protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig;
protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, 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;
/**
* BSG have two values for shotgun dispersion, we make sure both have the same value
@ -91,6 +95,6 @@ export declare class GameController {
protected logProfileDetails(fullProfile: IAkiProfile): void;
getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): IServerDetails[];
getCurrentGroup(sessionId: any): any;
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
getValidGameVersion(): ICheckVersionResponse;
}

View File

@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
@ -35,6 +36,14 @@ export declare class InsuranceController {
* Process insurance items prior to being given to player in mail
*/
processReturn(): void;
/**
* Should the passed in item be removed from player inventory
* @param insuredItem Insurued item to roll to lose
* @param traderId Trader the item was insured by
* @param itemsBeingDeleted All items to remove from player
* @returns True if item should be removed
*/
protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean;
/**
* Add insurance to an item
* @param pmcData Player profile

View File

@ -38,8 +38,7 @@ export declare class MatchController {
getProfile(info: IGetProfileRequestData): IPmcData[];
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
deleteGroup(info: any): void;
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
protected getMatch(location: string): any;
joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult;
getGroupStatus(info: IGetGroupStatusRequestData): any;
/**
* Handle /client/raid/configuration

View File

@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator {
*/
protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[];
/**
* Gathers the reward options from config and scavcase.json into a single object
* Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object
* @param scavCaseDetails scavcase.json values
* @returns ScavCaseRewardCountsAndPrices object
*/

View File

@ -105,6 +105,7 @@ declare class ItemHelper {
* @returns bool - is valid + template item object as array
*/
getItem(tpl: string): [boolean, ITemplateItem];
isItemInDb(tpl: string): boolean;
/**
* get normalized value (0-1) based on item condition
* @param item

View File

@ -1,6 +1,7 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
@ -46,6 +47,14 @@ export declare class RagfairOfferHelper {
protected ragfairConfig: IRagfairConfig;
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);
/**
* Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
* @param searchRequest
* @param itemsToAdd
* @param traderAssorts Trader assorts
* @param pmcProfile Player profile
* @returns Offers the player should see
*/
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
* Get offers from flea/traders specifically when building weapon preset
@ -53,7 +62,7 @@ export declare class RagfairOfferHelper {
* @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
* @returns IRagfairOffer array
*/
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
@ -79,11 +88,49 @@ export declare class RagfairOfferHelper {
* Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level
* @param offers Offers to check
* @param pmcProfile Players profile with trader loyalty levels
* @returns array of offer ids player cannot see
*/
protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[];
/**
* Process all player-listed flea offers for a desired profile
* @param sessionID Session id to process offers for
* @returns true = complete
*/
processOffersOnProfile(sessionID: string): boolean;
/**
* Add amount to players ragfair rating
* @param sessionId Profile to update
* @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier)
*/
increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void;
/**
* Return all offers a player has listed on a desired profile
* @param sessionID Session id
* @returns Array of ragfair offers
*/
protected getProfileOffers(sessionID: string): IRagfairOffer[];
/**
* Delete an offer from a desired profile
* @param sessionID Session id of profile to delete offer from
* @param offerId Offer id to delete
*/
protected deleteOfferByOfferId(sessionID: string, offerId: string): void;
/**
* Complete the selling of players' offer
* @param sessionID Session id
* @param offer Sold offer details
* @param boughtAmount Amount item was purchased for
* @returns Client response
*/
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
/**
* Should a ragfair offer be visible to the player
* @param info Search request
* @param itemsToAdd ?
* @param traderAssorts Trader assort items
* @param offer The flea offer
* @param pmcProfile Player profile
* @returns True = should be shown to player
*/
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
}

View File

@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer";
import { RagfairServer } from "../servers/RagfairServer";
import { FenceService } from "../services/FenceService";
import { PaymentService } from "../services/PaymentService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class TradeHelper {
protected logger: ILogger;
protected eventOutputHolder: EventOutputHolder;
@ -20,11 +21,12 @@ export declare class TradeHelper {
protected itemHelper: ItemHelper;
protected paymentService: PaymentService;
protected fenceService: FenceService;
protected httpResponse: HttpResponseUtil;
protected inventoryHelper: InventoryHelper;
protected ragfairServer: RagfairServer;
protected configServer: ConfigServer;
protected traderConfig: ITraderConfig;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
/**
* Buy item from flea or trader
* @param pmcData Player profile
@ -38,7 +40,7 @@ export declare class TradeHelper {
/**
* Sell item to trader
* @param pmcData Profile to update
* @param sellRequest request data
* @param sellRequest Request data
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/

View File

@ -956,9 +956,11 @@ export interface Endurance {
MovementAction: number;
SprintAction: number;
GainPerFatigueStack: number;
DependentSkillRatios: IDependentSkillRatio[];
QTELevelMultipliers: Record<string, Record<string, number>>;
}
export interface Strength {
DependentSkillRatios: IDependentSkillRatio[];
SprintActionMin: number;
SprintActionMax: number;
MovementActionMin: number;
@ -969,6 +971,10 @@ export interface Strength {
FistfightAction: number;
ThrowAction: number;
}
export interface IDependentSkillRatio {
Ratio: number;
SkillId: string;
}
export interface IQTELevelMultiplier {
Level: number;
Multiplier: number;

View File

@ -49,7 +49,10 @@ export interface ILocationBase {
OldSpawn: boolean;
OpenZones: string;
Preview: Preview;
RequiredPlayerLevel: number;
RequiredPlayerLevel?: number;
RequiredPlayerLevelMin?: number;
RequiredPlayerLevelMax?: number;
MinPlayerLvlAccessKeys: number;
PmcMaxPlayersInGroup: number;
ScavMaxPlayersInGroup: number;
Rules: string;

View File

@ -258,7 +258,7 @@ export interface LastPlayerStateInfo {
Nickname: string;
Side: string;
Level: number;
MemberCategory: string;
MemberCategory: MemberCategory;
}
export interface BackendCounter {
id: string;
@ -273,6 +273,7 @@ export interface Hideout {
Production: Record<string, Productive>;
Areas: HideoutArea[];
Improvements: Record<string, IHideoutImprovement>;
Seed: number;
sptUpdateLastRunTimestamp: number;
}
export interface IHideoutImprovement {

Some files were not shown because too many files have changed in this diff Show More