Update typse to match latest server for example 1

This commit is contained in:
Dev 2023-05-29 23:15:28 +01:00
parent e72f313d88
commit 34a7f5aaea
22 changed files with 142 additions and 29 deletions

View File

@ -1,6 +1,7 @@
import { DialogueController } from "../controllers/DialogueController"; import { DialogueController } from "../controllers/DialogueController";
import { OnUpdate } from "../di/OnUpdate"; import { OnUpdate } from "../di/OnUpdate";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IChatServer } from "../models/eft/dialog/IChatServer";
import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest";
import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; 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[]>; listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
listInbox(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>; 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; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>; 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 { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest"; import { IRemovePlayerFromGroupRequest } from "../models/eft/match/IRemovePlayerFromGroupRequest";
import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest"; import { ISendGroupInviteRequest } from "../models/eft/match/ISendGroupInviteRequest";
import { ITransferGroupRequest } from "../models/eft/match/ITransferGroupRequest";
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil";
@ -36,11 +37,13 @@ export declare class MatchCallbacks {
acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>; acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>;
/** Handle client/match/group/invite/cancel */ /** Handle client/match/group/invite/cancel */
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>; 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; cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>; joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
/** /**
* Handle client/match/group/status * Handle client/match/group/status
@ -49,6 +52,7 @@ export declare class MatchCallbacks {
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>; getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
deleteGroup(url: string, info: any, sessionID: string): INullResponseData; 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; removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData;
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, 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 { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
@ -20,6 +21,7 @@ import { LocalisationService } from "../services/LocalisationService";
import { OpenZoneService } from "../services/OpenZoneService"; import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileFixerService } from "../services/ProfileFixerService"; import { ProfileFixerService } from "../services/ProfileFixerService";
import { SeasonalEventService } from "../services/SeasonalEventService"; import { SeasonalEventService } from "../services/SeasonalEventService";
import { EncodingUtil } from "../utils/EncodingUtil";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil"; import { TimeUtil } from "../utils/TimeUtil";
export declare class GameController { export declare class GameController {
@ -29,6 +31,7 @@ export declare class GameController {
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected preAkiModLoader: PreAkiModLoader; protected preAkiModLoader: PreAkiModLoader;
protected httpServerHelper: HttpServerHelper; protected httpServerHelper: HttpServerHelper;
protected encodingUtil: EncodingUtil;
protected hideoutHelper: HideoutHelper; protected hideoutHelper: HideoutHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService; protected profileFixerService: ProfileFixerService;
@ -38,10 +41,11 @@ export declare class GameController {
protected seasonalEventService: SeasonalEventService; protected seasonalEventService: SeasonalEventService;
protected applicationContext: ApplicationContext; protected applicationContext: ApplicationContext;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected os: any;
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected locationConfig: ILocationConfig; 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; 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 * 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; protected logProfileDetails(fullProfile: IAkiProfile): void;
getGameConfig(sessionID: string): IGameConfigResponse; getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): IServerDetails[]; getServer(): IServerDetails[];
getCurrentGroup(sessionId: any): any; getCurrentGroup(sessionId: string): ICurrentGroupResponse;
getValidGameVersion(): ICheckVersionResponse; getValidGameVersion(): ICheckVersionResponse;
} }

View File

@ -2,6 +2,7 @@ import { DialogueHelper } from "../helpers/DialogueHelper";
import { ItemHelper } from "../helpers/ItemHelper"; import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData"; import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; 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 * Process insurance items prior to being given to player in mail
*/ */
processReturn(): void; 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 * Add insurance to an item
* @param pmcData Player profile * @param pmcData Player profile

View File

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

View File

@ -88,7 +88,7 @@ export declare class ScavCaseRewardGenerator {
*/ */
protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; 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 * @param scavCaseDetails scavcase.json values
* @returns ScavCaseRewardCountsAndPrices object * @returns ScavCaseRewardCountsAndPrices object
*/ */

View File

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

View File

@ -1,6 +1,7 @@
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { IQuestConfig } from "../models/spt/config/IQuestConfig";
@ -46,6 +47,14 @@ export declare class RagfairOfferHelper {
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
/**
* 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[]; getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/** /**
* Get offers from flea/traders specifically when building weapon preset * 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 itemsToAdd string array of item tpls to search for
* @param traderAssorts All trader assorts player can access/buy * @param traderAssorts All trader assorts player can access/buy
* @param pmcProfile Player profile * @param pmcProfile Player profile
* @returns ITraderAssort * @returns IRagfairOffer array
*/ */
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[]; 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 * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level
* @param offers Offers to check * @param offers Offers to check
* @param pmcProfile Players profile with trader loyalty levels * @param pmcProfile Players profile with trader loyalty levels
* @returns array of offer ids player cannot see
*/ */
protected getLoyaltyLockedOffers(offers: IRagfairOffer[], pmcProfile: IPmcData): string[]; 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; 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[]; 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; 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; 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; 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 { RagfairServer } from "../servers/RagfairServer";
import { FenceService } from "../services/FenceService"; import { FenceService } from "../services/FenceService";
import { PaymentService } from "../services/PaymentService"; import { PaymentService } from "../services/PaymentService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class TradeHelper { export declare class TradeHelper {
protected logger: ILogger; protected logger: ILogger;
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
@ -20,11 +21,12 @@ export declare class TradeHelper {
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected paymentService: PaymentService; protected paymentService: PaymentService;
protected fenceService: FenceService; protected fenceService: FenceService;
protected httpResponse: HttpResponseUtil;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected ragfairServer: RagfairServer; protected ragfairServer: RagfairServer;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; 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 * Buy item from flea or trader
* @param pmcData Player profile * @param pmcData Player profile
@ -38,7 +40,7 @@ export declare class TradeHelper {
/** /**
* Sell item to trader * Sell item to trader
* @param pmcData Profile to update * @param pmcData Profile to update
* @param sellRequest request data * @param sellRequest Request data
* @param sessionID Session id * @param sessionID Session id
* @returns IItemEventRouterResponse * @returns IItemEventRouterResponse
*/ */

View File

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

View File

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

View File

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

View File

@ -256,9 +256,11 @@ export interface Props {
CompressorGain?: number; CompressorGain?: number;
CutoffFreq?: number; CutoffFreq?: number;
Resonance?: number; Resonance?: number;
RolloffMultiplier?: number;
CompressorVolume?: number; CompressorVolume?: number;
AmbientVolume?: number; AmbientVolume?: number;
DryVolume?: number; DryVolume?: number;
HighFrequenciesGain?: number;
foodUseTime?: number; foodUseTime?: number;
foodEffectType?: string; foodEffectType?: string;
StimulatorBuffs?: string; StimulatorBuffs?: string;
@ -375,6 +377,7 @@ export interface Props {
ExplosionEffectType?: string; ExplosionEffectType?: string;
LinkedWeapon?: string; LinkedWeapon?: string;
UseAmmoWithoutShell?: boolean; UseAmmoWithoutShell?: boolean;
RandomLootSettings: IRandomLootSettings;
} }
export interface IHealthEffect { export interface IHealthEffect {
type: string; type: string;
@ -439,6 +442,21 @@ export interface StackSlot {
export interface StackSlotProps { export interface StackSlotProps {
filters: SlotFilter[]; 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 { export interface EffectsHealth {
Energy: EffectsHealthProps; Energy: EffectsHealthProps;
Hydration: 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; dt: string;
keyId: string; keyId: string;
raidMode: RaidMode; raidMode: RaidMode;
startInGroup: boolean; spawnPlace: string;
} }

View File

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

View File

@ -1,5 +1,10 @@
export interface IJoinMatchResult { export interface IJoinMatchResult {
maxPveCountExceeded: boolean;
profiles: IJoinMatchPlayerProfile[];
}
export interface IJoinMatchPlayerProfile {
profileid: string; profileid: string;
profileToken: string;
status: string; status: string;
sid: string; sid: string;
ip: 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; Nickname: string;
Side: string; Side: string;
Level: number; Level: number;
MemberCategory: string; MemberCategory: MemberCategory;
Ignored: boolean; Ignored: boolean;
Banned: boolean; Banned: boolean;
} }

View File

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

View File

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