Updated types
This commit is contained in:
parent
67f4aea3f2
commit
8251c88f22
@ -34,7 +34,7 @@ export declare class BotCallbacks {
|
|||||||
* Handle singleplayer/settings/bot/maxCap
|
* Handle singleplayer/settings/bot/maxCap
|
||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getBotCap(): string;
|
getBotCap(url: string, info: any, sessionID: string): string;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/settings/bot/getBotBehaviours
|
* Handle singleplayer/settings/bot/getBotBehaviours
|
||||||
* @returns string
|
* @returns string
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { HideoutController } from "@spt/controllers/HideoutController";
|
import { HideoutController } from "@spt/controllers/HideoutController";
|
||||||
import { RagfairController } from "@spt/controllers/RagfairController";
|
import { RagfairController } from "@spt/controllers/RagfairController";
|
||||||
|
import { TraderHelper } from "@spt/helpers/TraderHelper";
|
||||||
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
||||||
import { IGlobals } from "@spt/models/eft/common/IGlobals";
|
import { IGlobals } from "@spt/models/eft/common/IGlobals";
|
||||||
import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem";
|
import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem";
|
||||||
@ -13,15 +14,18 @@ import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyRespo
|
|||||||
import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase";
|
import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
||||||
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
/**
|
/**
|
||||||
* Handle client requests
|
* Handle client requests
|
||||||
*/
|
*/
|
||||||
export declare class DataCallbacks {
|
export declare class DataCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
protected databaseService: DatabaseService;
|
protected databaseService: DatabaseService;
|
||||||
protected ragfairController: RagfairController;
|
protected ragfairController: RagfairController;
|
||||||
protected hideoutController: HideoutController;
|
protected hideoutController: HideoutController;
|
||||||
constructor(httpResponse: HttpResponseUtil, databaseService: DatabaseService, ragfairController: RagfairController, hideoutController: HideoutController);
|
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, traderHelper: TraderHelper, databaseService: DatabaseService, ragfairController: RagfairController, hideoutController: HideoutController);
|
||||||
/**
|
/**
|
||||||
* Handle client/settings
|
* Handle client/settings
|
||||||
* @returns ISettingsBase
|
* @returns ISettingsBase
|
||||||
|
@ -102,7 +102,7 @@ export declare class BotController {
|
|||||||
*/
|
*/
|
||||||
protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise<void>;
|
protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Generate a single bot and store it in the cache
|
* Generate a single bot and store in the cache
|
||||||
* @param botGenerationDetails the bot details to generate the bot with
|
* @param botGenerationDetails the bot details to generate the bot with
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param cacheKey the cache key to store the bot with
|
* @param cacheKey the cache key to store the bot with
|
||||||
@ -125,8 +125,9 @@ export declare class BotController {
|
|||||||
/**
|
/**
|
||||||
* Get the max number of bots allowed on a map
|
* Get the max number of bots allowed on a map
|
||||||
* Looks up location player is entering when getting cap value
|
* Looks up location player is entering when getting cap value
|
||||||
|
* @param location The map location cap was requested for
|
||||||
* @returns cap number
|
* @returns cap number
|
||||||
*/
|
*/
|
||||||
getBotCap(): number;
|
getBotCap(location: string): number;
|
||||||
getAiBotBrainTypes(): any;
|
getAiBotBrainTypes(): any;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ export declare class LauncherController {
|
|||||||
* @returns Dictionary of profile types with related descriptive text
|
* @returns Dictionary of profile types with related descriptive text
|
||||||
*/
|
*/
|
||||||
protected getProfileDescriptions(): Record<string, string>;
|
protected getProfileDescriptions(): Record<string, string>;
|
||||||
find(sessionIdKey: string): Info;
|
find(sessionId: string): Info;
|
||||||
login(info: ILoginRequestData): string;
|
login(info: ILoginRequestData): string;
|
||||||
register(info: IRegisterData): string;
|
register(info: IRegisterData): string;
|
||||||
protected createAccount(info: IRegisterData): string;
|
protected createAccount(info: IRegisterData): string;
|
||||||
|
@ -10,6 +10,7 @@ import { IMiniProfile } from "@spt/models/eft/launcher/IMiniProfile";
|
|||||||
import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData";
|
import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData";
|
||||||
import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest";
|
import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest";
|
||||||
import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse";
|
import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse";
|
||||||
|
import { IGetProfileSettingsRequest } from "@spt/models/eft/profile/IGetProfileSettingsRequest";
|
||||||
import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData";
|
import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData";
|
||||||
import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData";
|
import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData";
|
||||||
import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData";
|
import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData";
|
||||||
@ -25,11 +26,13 @@ import { LocalisationService } from "@spt/services/LocalisationService";
|
|||||||
import { MailSendService } from "@spt/services/MailSendService";
|
import { MailSendService } from "@spt/services/MailSendService";
|
||||||
import { ProfileFixerService } from "@spt/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt/services/ProfileFixerService";
|
||||||
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
||||||
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
export declare class ProfileController {
|
export declare class ProfileController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
|
protected cloner: ICloner;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected databaseService: DatabaseService;
|
protected databaseService: DatabaseService;
|
||||||
@ -45,7 +48,7 @@ export declare class ProfileController {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected defaultInventoryTpl: string;
|
protected defaultInventoryTpl: string;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, cloner: ICloner, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
||||||
/**
|
/**
|
||||||
* Handle /launcher/profiles
|
* Handle /launcher/profiles
|
||||||
*/
|
*/
|
||||||
@ -53,7 +56,7 @@ export declare class ProfileController {
|
|||||||
/**
|
/**
|
||||||
* Handle launcher/profile/info
|
* Handle launcher/profile/info
|
||||||
*/
|
*/
|
||||||
getMiniProfile(sessionID: string): any;
|
getMiniProfile(sessionID: string): IMiniProfile;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/list
|
* Handle client/game/profile/list
|
||||||
*/
|
*/
|
||||||
@ -117,4 +120,8 @@ export declare class ProfileController {
|
|||||||
*/
|
*/
|
||||||
getProfileStatus(sessionId: string): GetProfileStatusResponseData;
|
getProfileStatus(sessionId: string): GetProfileStatusResponseData;
|
||||||
getOtherProfile(sessionId: string, request: IGetOtherProfileRequest): IGetOtherProfileResponse;
|
getOtherProfile(sessionId: string, request: IGetOtherProfileRequest): IGetOtherProfileResponse;
|
||||||
|
/**
|
||||||
|
* Handle client/profile/settings
|
||||||
|
*/
|
||||||
|
setChosenProfileIcon(sessionId: string, request: IGetProfileSettingsRequest): void;
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,7 @@ export declare class QuestController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
protected createAcceptedQuestClientResponse(sessionID: string, pmcData: IPmcData, repeatableQuestProfile: IRepeatableQuest): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Look for an accepted quest inside player profile, return matching
|
* Look for an accepted quest inside player profile, return matching
|
||||||
* @param pmcData Profile to search through
|
* @param pmcData Profile to search through
|
||||||
|
@ -2,7 +2,6 @@ import { RepeatableQuestGenerator } from "@spt/generators/RepeatableQuestGenerat
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "@spt/helpers/QuestHelper";
|
import { QuestHelper } from "@spt/helpers/QuestHelper";
|
||||||
import { RepeatableQuestHelper } from "@spt/helpers/RepeatableQuestHelper";
|
import { RepeatableQuestHelper } from "@spt/helpers/RepeatableQuestHelper";
|
||||||
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
|
||||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
|
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -62,12 +61,31 @@ export declare class RepeatableQuestController {
|
|||||||
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
||||||
* The new quests generated are again persisted in profile.RepeatableQuests
|
* The new quests generated are again persisted in profile.RepeatableQuests
|
||||||
*
|
*
|
||||||
* @param {string} _info Request from client
|
|
||||||
* @param {string} sessionID Player's session id
|
* @param {string} sessionID Player's session id
|
||||||
*
|
*
|
||||||
* @returns {array} Array of "repeatableQuestObjects" as described above
|
* @returns {array} Array of "repeatableQuestObjects" as described above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* Check if a repeatable quest type (daily/weekly) is active for the given profile
|
||||||
|
* @param repeatableConfig Repeatable quest config
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns True if profile is allowed to access dailies
|
||||||
|
*/
|
||||||
|
protected canProfileAccessRepeatableQuests(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Does player have daily scav quests unlocked
|
||||||
|
* @param pmcData Player profile to check
|
||||||
|
* @returns True if unlocked
|
||||||
|
*/
|
||||||
|
protected playerHasDailyScavQuestsUnlocked(pmcData: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Does player have daily pmc quests unlocked
|
||||||
|
* @param pmcData Player profile to check
|
||||||
|
* @param repeatableConfig Config of daily type to check
|
||||||
|
* @returns True if unlocked
|
||||||
|
*/
|
||||||
|
protected playerHasDailyPmcQuestsUnlocked(pmcData: IPmcData, repeatableConfig: IRepeatableQuestConfig): boolean;
|
||||||
/**
|
/**
|
||||||
* Get the number of quests to generate - takes into account charisma state of player
|
* Get the number of quests to generate - takes into account charisma state of player
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
@ -99,10 +117,10 @@ export declare class RepeatableQuestController {
|
|||||||
/**
|
/**
|
||||||
* Return the locations this PMC is allowed to get daily quests for based on their level
|
* Return the locations this PMC is allowed to get daily quests for based on their level
|
||||||
* @param locations The original list of locations
|
* @param locations The original list of locations
|
||||||
* @param pmcLevel The level of the player PMC
|
* @param pmcLevel The players level
|
||||||
* @returns A filtered list of locations that allow the player PMC level to access it
|
* @returns A filtered list of locations that allow the player PMC level to access it
|
||||||
*/
|
*/
|
||||||
protected getAllowedLocations(locations: Record<ELocationName, string[]>, pmcLevel: number): Partial<Record<ELocationName, string[]>>;
|
protected getAllowedLocationsForPmcLevel(locations: Record<ELocationName, string[]>, pmcLevel: number): Partial<Record<ELocationName, string[]>>;
|
||||||
/**
|
/**
|
||||||
* Return true if the given pmcLevel is allowed on the given location
|
* Return true if the given pmcLevel is allowed on the given location
|
||||||
* @param location The location name to check
|
* @param location The location name to check
|
||||||
@ -113,6 +131,12 @@ export declare class RepeatableQuestController {
|
|||||||
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Handle RepeatableQuestChange event
|
* Handle RepeatableQuestChange event
|
||||||
|
*
|
||||||
|
* Replace a players repeatable quest
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param changeRequest Request object
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
||||||
|
@ -5,7 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { Appearance, Health, IBotType } from "@spt/models/eft/common/tables/IBotType";
|
import { Appearance, Health, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
|
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
|
||||||
@ -13,6 +13,7 @@ import { ILogger } from "@spt/models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService";
|
import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
|
import { ItemFilterService } from "@spt/services/ItemFilterService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
||||||
import { ICloner } from "@spt/utils/cloners/ICloner";
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
@ -34,11 +35,12 @@ export declare class BotGenerator {
|
|||||||
protected botDifficultyHelper: BotDifficultyHelper;
|
protected botDifficultyHelper: BotDifficultyHelper;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected cloner: ICloner;
|
protected cloner: ICloner;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner);
|
||||||
/**
|
/**
|
||||||
* Generate a player scav bot object
|
* Generate a player scav bot object
|
||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
@ -54,6 +56,14 @@ export declare class BotGenerator {
|
|||||||
* @returns constructed bot
|
* @returns constructed bot
|
||||||
*/
|
*/
|
||||||
prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase;
|
prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Get a clone of the default bot base object and adjust its role/side/difficulty values
|
||||||
|
* @param botRole Role bot should have
|
||||||
|
* @param botSide Side bot should have
|
||||||
|
* @param difficulty Difficult bot should have
|
||||||
|
* @returns Cloned bot base
|
||||||
|
*/
|
||||||
|
protected getPreparedBotBase(botRole: string, botSide: string, difficulty: string): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Get a clone of the database\bots\base.json file
|
* Get a clone of the database\bots\base.json file
|
||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
@ -62,12 +72,17 @@ export declare class BotGenerator {
|
|||||||
/**
|
/**
|
||||||
* Create a IBotBase object with equipment/loot/exp etc
|
* Create a IBotBase object with equipment/loot/exp etc
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param bot bots base file
|
* @param bot Bots base file
|
||||||
* @param botJsonTemplate Bot template from db/bots/x.json
|
* @param botJsonTemplate Bot template from db/bots/x.json
|
||||||
* @param botGenerationDetails details on how to generate the bot
|
* @param botGenerationDetails details on how to generate the bot
|
||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Remove items from item.json/lootableItemBlacklist from bots inventory
|
||||||
|
* @param botInventory Bot to filter
|
||||||
|
*/
|
||||||
|
protected removeBlacklistedLootFromBotTemplate(botInventory: Inventory): void;
|
||||||
/**
|
/**
|
||||||
* Choose various appearance settings for a bot using weights
|
* Choose various appearance settings for a bot using weights
|
||||||
* @param bot Bot to adjust
|
* @param bot Bot to adjust
|
||||||
@ -80,10 +95,12 @@ export declare class BotGenerator {
|
|||||||
* @param botJsonTemplate x.json from database
|
* @param botJsonTemplate x.json from database
|
||||||
* @param botGenerationDetails
|
* @param botGenerationDetails
|
||||||
* @param botRole role of bot e.g. assault
|
* @param botRole role of bot e.g. assault
|
||||||
* @param sessionId profile session id
|
* @param sessionId OPTIONAL: profile session id
|
||||||
* @returns Nickname for bot
|
* @returns Nickname for bot
|
||||||
*/
|
*/
|
||||||
protected generateBotNickname(botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails, botRole: string, sessionId?: string): string;
|
protected generateBotNickname(botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails, botRole: string, sessionId?: string): string;
|
||||||
|
protected shouldSimulatePlayerScavName(botRole: string, isPlayerScav: boolean): boolean;
|
||||||
|
protected addPlayerScavNameSimulationSuffix(nickname: string): string;
|
||||||
/**
|
/**
|
||||||
* Log the number of PMCs generated to the debug console
|
* Log the number of PMCs generated to the debug console
|
||||||
* @param output Generated bot array, ready to send to client
|
* @param output Generated bot array, ready to send to client
|
||||||
@ -110,12 +127,17 @@ export declare class BotGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getSkillsWithRandomisedProgressValue(skills: Record<string, IBaseSkill>, isCommonSkills: boolean): IBaseSkill[];
|
protected getSkillsWithRandomisedProgressValue(skills: Record<string, IBaseSkill>, isCommonSkills: boolean): IBaseSkill[];
|
||||||
/**
|
/**
|
||||||
* Generate a random Id for a bot and apply to bots _id and aid value
|
* Generate an id+aid for a bot and apply
|
||||||
* @param bot bot to update
|
* @param bot bot to update
|
||||||
* @returns updated IBotBase object
|
* @returns updated IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateId(bot: IBotBase): void;
|
protected addIdsToBot(bot: IBotBase): void;
|
||||||
protected generateInventoryID(profile: IBotBase): void;
|
/**
|
||||||
|
* Update a profiles profile.Inventory.equipment value with a freshly generated one
|
||||||
|
* Update all inventory items that make use of this value too
|
||||||
|
* @param profile Profile to update
|
||||||
|
*/
|
||||||
|
protected generateInventoryId(profile: IBotBase): void;
|
||||||
/**
|
/**
|
||||||
* Randomise a bots game version and account category
|
* Randomise a bots game version and account category
|
||||||
* Chooses from all the game versions (standard, eod etc)
|
* Chooses from all the game versions (standard, eod etc)
|
||||||
|
@ -60,7 +60,7 @@ export declare class BotLootGenerator {
|
|||||||
/**
|
/**
|
||||||
* Force healing items onto bot to ensure they can heal in-raid
|
* Force healing items onto bot to ensure they can heal in-raid
|
||||||
* @param botInventory Inventory to add items to
|
* @param botInventory Inventory to add items to
|
||||||
* @param botRole Role of bot (sptBear/sptUsec)
|
* @param botRole Role of bot (pmcBEAR/pmcUSEC)
|
||||||
*/
|
*/
|
||||||
protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void;
|
protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void;
|
||||||
/**
|
/**
|
||||||
|
@ -9,6 +9,7 @@ import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
|
|||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
|
import { ItemFilterService } from "@spt/services/ItemFilterService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
||||||
import { ICloner } from "@spt/utils/cloners/ICloner";
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
@ -37,14 +38,15 @@ export declare class LocationGenerator {
|
|||||||
protected containerHelper: ContainerHelper;
|
protected containerHelper: ContainerHelper;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected cloner: ICloner;
|
protected cloner: ICloner;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseService: DatabaseService, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
|
constructor(logger: ILogger, databaseService: DatabaseService, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner);
|
||||||
/**
|
/**
|
||||||
* Create an array of container objects with randomised loot
|
* Create an array of container objects with randomised loot
|
||||||
* @param locationBase Map base to generate containers for
|
* @param locationBase Map base to generate containers for
|
||||||
* @param staticAmmoDist Static ammo distribution - database.loot.staticAmmo
|
* @param staticAmmoDist Static ammo distribution
|
||||||
* @returns Array of container objects
|
* @returns Array of container objects
|
||||||
*/
|
*/
|
||||||
generateStaticContainers(locationBase: ILocationBase, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): SpawnpointTemplate[];
|
generateStaticContainers(locationBase: ILocationBase, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): SpawnpointTemplate[];
|
||||||
|
@ -4,7 +4,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper";
|
|||||||
import { Item } from "@spt/models/eft/common/tables/IItem";
|
import { Item } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { IQuestReward, IQuestRewards } from "@spt/models/eft/common/tables/IQuest";
|
import { IQuestReward, IQuestRewards } from "@spt/models/eft/common/tables/IQuest";
|
||||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig";
|
import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig, IRewardScaling } from "@spt/models/spt/config/IQuestConfig";
|
||||||
|
import { IQuestRewardValues } from "@spt/models/spt/repeatable/IQuestRewardValues";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
@ -52,6 +53,29 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
*/
|
*/
|
||||||
generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards;
|
generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards;
|
||||||
|
protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues;
|
||||||
|
/**
|
||||||
|
* Get an array of items + stack size to give to player as reward that fit inside of a rouble budget
|
||||||
|
* @param itemPool All possible items to choose rewards from
|
||||||
|
* @param maxItemCount Total number of items to reward
|
||||||
|
* @param itemRewardBudget Rouble buget all item rewards must fit in
|
||||||
|
* @param repeatableConfig config for quest type
|
||||||
|
* @returns Items and stack size
|
||||||
|
*/
|
||||||
|
protected getRewardableItemsFromPoolWithinBudget(itemPool: ITemplateItem[], maxItemCount: number, itemRewardBudget: number, repeatableConfig: IRepeatableQuestConfig): {
|
||||||
|
item: ITemplateItem;
|
||||||
|
stackSize: number;
|
||||||
|
}[];
|
||||||
|
/**
|
||||||
|
* Choose a random Weapon preset that fits inside of a rouble amount limit
|
||||||
|
* @param roublesBudget
|
||||||
|
* @param rewardIndex
|
||||||
|
* @returns IQuestReward
|
||||||
|
*/
|
||||||
|
protected getRandomWeaponPresetWithinBudget(roublesBudget: number, rewardIndex: number): {
|
||||||
|
weapon: IQuestReward;
|
||||||
|
price: number;
|
||||||
|
} | undefined;
|
||||||
/**
|
/**
|
||||||
* @param rewardItems List of reward items to filter
|
* @param rewardItems List of reward items to filter
|
||||||
* @param roublesBudget The budget remaining for rewards
|
* @param roublesBudget The budget remaining for rewards
|
||||||
@ -62,21 +86,31 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
/**
|
/**
|
||||||
* Get a randomised number a reward items stack size should be based on its handbook price
|
* Get a randomised number a reward items stack size should be based on its handbook price
|
||||||
* @param item Reward item to get stack size for
|
* @param item Reward item to get stack size for
|
||||||
* @returns Stack size value
|
* @returns matching stack size for the passed in items price
|
||||||
*/
|
*/
|
||||||
protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number;
|
protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number;
|
||||||
/**
|
/**
|
||||||
* Should reward item have stack size increased (25% chance)
|
* Should reward item have stack size increased (25% chance)
|
||||||
* @param item Item to possibly increase stack size of
|
* @param item Item to increase reward stack size of
|
||||||
* @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking
|
* @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking
|
||||||
* @returns True if it should
|
* @param randomChanceToPass Additional randomised chance of passing
|
||||||
|
* @returns True if items stack size can be increased
|
||||||
|
*/
|
||||||
|
protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number, randomChanceToPass?: number): boolean;
|
||||||
|
/**
|
||||||
|
* Get a count of cartridges that fits the rouble budget amount provided
|
||||||
|
* e.g. how many M80s for 50,000 roubles
|
||||||
|
* @param itemSelected Cartridge
|
||||||
|
* @param roublesBudget Rouble budget
|
||||||
|
* @param rewardNumItems
|
||||||
|
* @returns Count that fits budget (min 1)
|
||||||
*/
|
*/
|
||||||
protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean;
|
|
||||||
protected calculateAmmoStackSizeThatFitsBudget(itemSelected: ITemplateItem, roublesBudget: number, rewardNumItems: number): number;
|
protected calculateAmmoStackSizeThatFitsBudget(itemSelected: ITemplateItem, roublesBudget: number, rewardNumItems: number): number;
|
||||||
/**
|
/**
|
||||||
* Select a number of items that have a colelctive value of the passed in parameter
|
* Select a number of items that have a colelctive value of the passed in parameter
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
* @param roublesBudget Total value of items to return
|
* @param roublesBudget Total value of items to return
|
||||||
|
* @param traderId Id of the trader who will give player reward
|
||||||
* @returns Array of reward items that fit budget
|
* @returns Array of reward items that fit budget
|
||||||
*/
|
*/
|
||||||
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[];
|
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[];
|
||||||
@ -86,12 +120,18 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
* @param {string} tpl ItemId of the rewarded item
|
* @param {string} tpl ItemId of the rewarded item
|
||||||
* @param {integer} value Amount of items to give
|
* @param {integer} value Amount of items to give
|
||||||
* @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index
|
* @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index
|
||||||
|
* @param preset Optional array of preset items
|
||||||
* @returns {object} Object of "Reward"-item-type
|
* @returns {object} Object of "Reward"-item-type
|
||||||
*/
|
*/
|
||||||
protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward;
|
protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward;
|
||||||
/**
|
/**
|
||||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
* Picks rewardable items from items.json
|
||||||
|
* This means they must:
|
||||||
|
* - Fit into the inventory
|
||||||
|
* - Shouldn't be keys
|
||||||
|
* - Have a price greater than 0
|
||||||
* @param repeatableQuestConfig Config file
|
* @param repeatableQuestConfig Config file
|
||||||
|
* @param traderId Id of trader who will give reward to player
|
||||||
* @returns List of rewardable items [[_tpl, itemTemplate],...]
|
* @returns List of rewardable items [[_tpl, itemTemplate],...]
|
||||||
*/
|
*/
|
||||||
getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][];
|
getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][];
|
||||||
@ -102,5 +142,5 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
* @returns True if item is valid reward
|
* @returns True if item is valid reward
|
||||||
*/
|
*/
|
||||||
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean;
|
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean;
|
||||||
protected addMoneyReward(traderId: string, rewards: IQuestRewards, rewardRoubles: number, rewardIndex: number): void;
|
protected getMoneyReward(traderId: string, rewardRoubles: number, rewardIndex: number): IQuestReward;
|
||||||
}
|
}
|
||||||
|
@ -21,8 +21,8 @@ export declare class BotDifficultyHelper {
|
|||||||
* Get a difficulty object modified to handle fighting other PMCs
|
* Get a difficulty object modified to handle fighting other PMCs
|
||||||
* @param pmcType 'bear or 'usec'
|
* @param pmcType 'bear or 'usec'
|
||||||
* @param difficulty easy / normal / hard / impossible
|
* @param difficulty easy / normal / hard / impossible
|
||||||
* @param usecType sptUsec
|
* @param usecType pmcUSEC
|
||||||
* @param bearType sptBear
|
* @param bearType pmcBEAR
|
||||||
* @returns Difficulty object
|
* @returns Difficulty object
|
||||||
*/
|
*/
|
||||||
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
|
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
|
||||||
|
@ -56,12 +56,12 @@ export declare class BotHelper {
|
|||||||
*/
|
*/
|
||||||
getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined;
|
getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined;
|
||||||
/**
|
/**
|
||||||
* Choose between sptBear and sptUsec at random based on the % defined in pmcConfig.isUsec
|
* Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec
|
||||||
* @returns pmc role
|
* @returns pmc role
|
||||||
*/
|
*/
|
||||||
getRandomizedPmcRole(): string;
|
getRandomizedPmcRole(): string;
|
||||||
/**
|
/**
|
||||||
* Get the corresponding side when sptBear or sptUsec is passed in
|
* Get the corresponding side when pmcBEAR or pmcUSEC is passed in
|
||||||
* @param botRole role to get side for
|
* @param botRole role to get side for
|
||||||
* @returns side (usec/bear)
|
* @returns side (usec/bear)
|
||||||
*/
|
*/
|
||||||
|
@ -416,7 +416,7 @@ export declare class ItemHelper {
|
|||||||
/**
|
/**
|
||||||
* Get the name of an item from the locale file using the item tpl
|
* Get the name of an item from the locale file using the item tpl
|
||||||
* @param itemTpl Tpl of item to get name of
|
* @param itemTpl Tpl of item to get name of
|
||||||
* @returns Name of item
|
* @returns Full name, short name if not found
|
||||||
*/
|
*/
|
||||||
getItemName(itemTpl: string): string;
|
getItemName(itemTpl: string): string;
|
||||||
/**
|
/**
|
||||||
|
@ -42,10 +42,10 @@ export declare class ProfileHelper {
|
|||||||
getProfiles(): Record<string, ISptProfile>;
|
getProfiles(): Record<string, ISptProfile>;
|
||||||
/**
|
/**
|
||||||
* Get the pmc and scav profiles as an array by profile id
|
* Get the pmc and scav profiles as an array by profile id
|
||||||
* @param sessionID
|
* @param sessionId
|
||||||
* @returns Array of IPmcData objects
|
* @returns Array of IPmcData objects
|
||||||
*/
|
*/
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
getCompleteProfile(sessionId: string): IPmcData[];
|
||||||
/**
|
/**
|
||||||
* Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen
|
* Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen
|
||||||
* Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using
|
* Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using
|
||||||
@ -58,12 +58,12 @@ export declare class ProfileHelper {
|
|||||||
* @param scavProfile post-raid scav profile
|
* @param scavProfile post-raid scav profile
|
||||||
* @returns Updated profile array
|
* @returns Updated profile array
|
||||||
*/
|
*/
|
||||||
protected postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[];
|
protected postRaidXpWorkaroundFix(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, output: IPmcData[]): IPmcData[];
|
||||||
/**
|
/**
|
||||||
* Check if a nickname is used by another profile loaded by the server
|
* Check if a nickname is used by another profile loaded by the server
|
||||||
* @param nicknameRequest nickname request object
|
* @param nicknameRequest nickname request object
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns True if already used
|
* @returns True if already in use
|
||||||
*/
|
*/
|
||||||
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||||
protected profileHasInfoProperty(profile: ISptProfile): boolean;
|
protected profileHasInfoProperty(profile: ISptProfile): boolean;
|
||||||
@ -79,10 +79,10 @@ export declare class ProfileHelper {
|
|||||||
* @param pmcId Profile id to find
|
* @param pmcId Profile id to find
|
||||||
* @returns IPmcData
|
* @returns IPmcData
|
||||||
*/
|
*/
|
||||||
getProfileByPmcId(pmcId: string): IPmcData;
|
getProfileByPmcId(pmcId: string): IPmcData | undefined;
|
||||||
/**
|
/**
|
||||||
* Get the experiecne for the given level
|
* Get experience value for given level
|
||||||
* @param level level to get xp for
|
* @param level Level to get xp for
|
||||||
* @returns Number of xp points for level
|
* @returns Number of xp points for level
|
||||||
*/
|
*/
|
||||||
getExperience(level: number): number;
|
getExperience(level: number): number;
|
||||||
@ -105,9 +105,9 @@ export declare class ProfileHelper {
|
|||||||
*/
|
*/
|
||||||
getPmcProfile(sessionID: string): IPmcData | undefined;
|
getPmcProfile(sessionID: string): IPmcData | undefined;
|
||||||
/**
|
/**
|
||||||
* Is this user id the logged in player
|
* Is given user id a player
|
||||||
* @param userId Id to test
|
* @param userId Id to validate
|
||||||
* @returns True is the current player
|
* @returns True is a player
|
||||||
*/
|
*/
|
||||||
isPlayer(userId: string): boolean;
|
isPlayer(userId: string): boolean;
|
||||||
/**
|
/**
|
||||||
@ -127,7 +127,6 @@ export declare class ProfileHelper {
|
|||||||
* @returns True if profile is to be wiped of data/progress
|
* @returns True if profile is to be wiped of data/progress
|
||||||
*/
|
*/
|
||||||
protected isWiped(sessionID: string): boolean;
|
protected isWiped(sessionID: string): boolean;
|
||||||
protected getServerVersion(): string;
|
|
||||||
/**
|
/**
|
||||||
* Iterate over player profile inventory items and find the secure container and remove it
|
* Iterate over player profile inventory items and find the secure container and remove it
|
||||||
* @param profile Profile to remove secure container from
|
* @param profile Profile to remove secure container from
|
||||||
@ -139,15 +138,17 @@ export declare class ProfileHelper {
|
|||||||
* Store giftid in profile spt object
|
* Store giftid in profile spt object
|
||||||
* @param playerId Player to add gift flag to
|
* @param playerId Player to add gift flag to
|
||||||
* @param giftId Gift player received
|
* @param giftId Gift player received
|
||||||
|
* @param maxCount Limit of how many of this gift a player can have
|
||||||
*/
|
*/
|
||||||
addGiftReceivedFlagToProfile(playerId: string, giftId: string): void;
|
flagGiftReceivedInProfile(playerId: string, giftId: string, maxCount: number): void;
|
||||||
/**
|
/**
|
||||||
* Check if profile has recieved a gift by id
|
* Check if profile has recieved a gift by id
|
||||||
* @param playerId Player profile to check for gift
|
* @param playerId Player profile to check for gift
|
||||||
* @param giftId Gift to check for
|
* @param giftId Gift to check for
|
||||||
|
* @param maxGiftCount Max times gift can be given to player
|
||||||
* @returns True if player has recieved gift previously
|
* @returns True if player has recieved gift previously
|
||||||
*/
|
*/
|
||||||
playerHasRecievedGift(playerId: string, giftId: string): boolean;
|
playerHasRecievedMaxNumberOfGift(playerId: string, giftId: string, maxGiftCount: number): boolean;
|
||||||
/**
|
/**
|
||||||
* Find Stat in profile counters and increment by one
|
* Find Stat in profile counters and increment by one
|
||||||
* @param counters Counters to search for key
|
* @param counters Counters to search for key
|
||||||
@ -189,4 +190,11 @@ export declare class ProfileHelper {
|
|||||||
* @param rowsToAdd How many rows to give profile
|
* @param rowsToAdd How many rows to give profile
|
||||||
*/
|
*/
|
||||||
addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void;
|
addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void;
|
||||||
|
playerIsFleaBanned(pmcProfile: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Add an achievement to player profile
|
||||||
|
* @param pmcProfile Profile to add achievement to
|
||||||
|
* @param achievementId Id of achievement to add
|
||||||
|
*/
|
||||||
|
addAchievementToProfile(pmcProfile: IPmcData, achievementId: string): void;
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ export declare class RagfairOfferHelper {
|
|||||||
* @param pmcProfile Player profile
|
* @param pmcProfile Player profile
|
||||||
* @returns True = should be shown to player
|
* @returns True = should be shown to player
|
||||||
*/
|
*/
|
||||||
isDisplayableOffer(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
isDisplayableOffer(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData, playerIsFleaBanned?: boolean): boolean;
|
||||||
isDisplayableOfferThatNeedsItem(searchRequest: ISearchRequestData, offer: IRagfairOffer): boolean;
|
isDisplayableOfferThatNeedsItem(searchRequest: ISearchRequestData, offer: IRagfairOffer): boolean;
|
||||||
/**
|
/**
|
||||||
* Does the passed in item have a condition property
|
* Does the passed in item have a condition property
|
||||||
|
@ -59,10 +59,11 @@ export declare class TradeHelper {
|
|||||||
/**
|
/**
|
||||||
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
|
* @param pmcData Profile making the purchase
|
||||||
* @param traderId Trader assort is purchased from
|
* @param traderId Trader assort is purchased from
|
||||||
* @param assortBeingPurchased the item from trader being bought
|
* @param assortBeingPurchased the item from trader being bought
|
||||||
* @param assortId Id of assort being purchased
|
* @param assortId Id of assort being purchased
|
||||||
* @param count How many of the item are being bought
|
* @param count How many of the item are being bought
|
||||||
*/
|
*/
|
||||||
protected checkPurchaseIsWithinTraderItemLimit(sessionId: string, traderId: string, assortBeingPurchased: Item, assortId: string, count: number): void;
|
protected checkPurchaseIsWithinTraderItemLimit(sessionId: string, pmcData: IPmcData, traderId: string, assortBeingPurchased: Item, assortId: string, count: number): void;
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,6 @@ export declare class TraderHelper {
|
|||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
/** Dictionary of item tpl and the highest trader sell rouble price */
|
/** Dictionary of item tpl and the highest trader sell rouble price */
|
||||||
protected highestTraderPriceItems?: Record<string, number>;
|
protected highestTraderPriceItems?: Record<string, number>;
|
||||||
/** Dictionary of item tpl and the highest trader buy back rouble price */
|
|
||||||
protected highestTraderBuyPriceItems?: Record<string, number>;
|
|
||||||
constructor(logger: ILogger, databaseService: DatabaseService, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, itemHelper: ItemHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, randomUtil: RandomUtil, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseService: DatabaseService, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, itemHelper: ItemHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get a trader base object, update profile to reflect players current standing in profile
|
* Get a trader base object, update profile to reflect players current standing in profile
|
||||||
@ -133,6 +131,13 @@ export declare class TraderHelper {
|
|||||||
}[];
|
}[];
|
||||||
traderId: string;
|
traderId: string;
|
||||||
}, itemPurchased: Item): void;
|
}, itemPurchased: Item): void;
|
||||||
|
/**
|
||||||
|
* EoD and Unheard get a 20% bonus to personal trader limit purchases
|
||||||
|
* @param buyRestrictionMax Existing value from trader item
|
||||||
|
* @param gameVersion Profiles game version
|
||||||
|
* @returns buyRestrictionMax value
|
||||||
|
*/
|
||||||
|
getAccountTypeAdjustedTraderPurchaseLimit(buyRestrictionMax: number, gameVersion: string): number;
|
||||||
/**
|
/**
|
||||||
* Get the highest rouble price for an item from traders
|
* Get the highest rouble price for an item from traders
|
||||||
* UNUSED
|
* UNUSED
|
||||||
|
@ -31,7 +31,6 @@ export interface IConfig {
|
|||||||
TradingUnlimitedItems: boolean;
|
TradingUnlimitedItems: boolean;
|
||||||
MaxLoyaltyLevelForAll: boolean;
|
MaxLoyaltyLevelForAll: boolean;
|
||||||
GlobalLootChanceModifier: number;
|
GlobalLootChanceModifier: number;
|
||||||
GlobalLootChanceModifierPvE: number;
|
|
||||||
GraphicSettings: IGraphicSettings;
|
GraphicSettings: IGraphicSettings;
|
||||||
TimeBeforeDeploy: number;
|
TimeBeforeDeploy: number;
|
||||||
TimeBeforeDeployLocal: number;
|
TimeBeforeDeployLocal: number;
|
||||||
@ -49,6 +48,7 @@ export interface IConfig {
|
|||||||
BotsEnabled: boolean;
|
BotsEnabled: boolean;
|
||||||
BufferZone: IBufferZone;
|
BufferZone: IBufferZone;
|
||||||
ArmorMaterials: IArmorMaterials;
|
ArmorMaterials: IArmorMaterials;
|
||||||
|
ArenaEftTransferSettings: IArenaEftTransferSettings;
|
||||||
LegsOverdamage: number;
|
LegsOverdamage: number;
|
||||||
HandsOverdamage: number;
|
HandsOverdamage: number;
|
||||||
StomachOverdamage: number;
|
StomachOverdamage: number;
|
||||||
@ -76,6 +76,7 @@ export interface IConfig {
|
|||||||
SkillPointsBeforeFatigue: number;
|
SkillPointsBeforeFatigue: number;
|
||||||
SkillFatigueReset: number;
|
SkillFatigueReset: number;
|
||||||
DiscardLimitsEnabled: boolean;
|
DiscardLimitsEnabled: boolean;
|
||||||
|
EnvironmentSettings: IEnvironmentSetting2;
|
||||||
EventSettings: IEventSettings;
|
EventSettings: IEventSettings;
|
||||||
FavoriteItemsSettings: IFavoriteItemsSettings;
|
FavoriteItemsSettings: IFavoriteItemsSettings;
|
||||||
VaultingSettings: IVaultingSettings;
|
VaultingSettings: IVaultingSettings;
|
||||||
@ -102,6 +103,12 @@ export interface IConfig {
|
|||||||
Ballistic: IBallistic;
|
Ballistic: IBallistic;
|
||||||
RepairSettings: IRepairSettings;
|
RepairSettings: IRepairSettings;
|
||||||
}
|
}
|
||||||
|
export interface IEnvironmentSetting2 {
|
||||||
|
EnvironmentUIData: IEnvironmentUIData;
|
||||||
|
}
|
||||||
|
export interface IEnvironmentUIData {
|
||||||
|
TheUnheardEditionEnvironmentUiType: string[];
|
||||||
|
}
|
||||||
export interface IBodyPartColliderSettings {
|
export interface IBodyPartColliderSettings {
|
||||||
BackHead: IBodyPartColliderPart;
|
BackHead: IBodyPartColliderPart;
|
||||||
Ears: IBodyPartColliderPart;
|
Ears: IBodyPartColliderPart;
|
||||||
@ -178,8 +185,12 @@ export interface IItemsCommonSettings {
|
|||||||
ItemRemoveAfterInterruptionTime: number;
|
ItemRemoveAfterInterruptionTime: number;
|
||||||
}
|
}
|
||||||
export interface ITradingSettings {
|
export interface ITradingSettings {
|
||||||
|
BuyRestrictionMaxBonus: Record<string, IBuyRestrictionMaxBonus>;
|
||||||
BuyoutRestrictions: IBuyoutRestrictions;
|
BuyoutRestrictions: IBuyoutRestrictions;
|
||||||
}
|
}
|
||||||
|
export interface IBuyRestrictionMaxBonus {
|
||||||
|
multiplier: number;
|
||||||
|
}
|
||||||
export interface IBuyoutRestrictions {
|
export interface IBuyoutRestrictions {
|
||||||
MinDurability: number;
|
MinDurability: number;
|
||||||
MinFoodDrinkResource: number;
|
MinFoodDrinkResource: number;
|
||||||
@ -381,6 +392,17 @@ export interface IBodyParts {
|
|||||||
Feet: string;
|
Feet: string;
|
||||||
Hands: string;
|
Hands: string;
|
||||||
}
|
}
|
||||||
|
export interface IArenaEftTransferSettings {
|
||||||
|
ArenaEftTransferSettings: ArenaEftTransferSettings;
|
||||||
|
}
|
||||||
|
export interface ArenaEftTransferSettings {
|
||||||
|
ArenaManagerReputationTaxMultiplier: number;
|
||||||
|
CharismaTaxMultiplier: number;
|
||||||
|
CreditPriceTaxMultiplier: number;
|
||||||
|
RubTaxMultiplier: number;
|
||||||
|
TransferLimitsByGameEdition: Record<string, number>;
|
||||||
|
TransferLimitsSettings: Record<string, number>;
|
||||||
|
}
|
||||||
export interface IArmorMaterials {
|
export interface IArmorMaterials {
|
||||||
UHMWPE: IArmorType;
|
UHMWPE: IArmorType;
|
||||||
Aramid: IArmorType;
|
Aramid: IArmorType;
|
||||||
@ -802,6 +824,7 @@ export interface IMaxActiveOfferCount {
|
|||||||
from: number;
|
from: number;
|
||||||
to: number;
|
to: number;
|
||||||
count: number;
|
count: number;
|
||||||
|
countForSpecialEditions: number;
|
||||||
}
|
}
|
||||||
export interface IMaxSumForRarity {
|
export interface IMaxSumForRarity {
|
||||||
Common: IRarityMaxSum;
|
Common: IRarityMaxSum;
|
||||||
|
@ -35,9 +35,17 @@ export interface IBotBase {
|
|||||||
CoopExtractCounts: Record<string, number>;
|
CoopExtractCounts: Record<string, number>;
|
||||||
SurvivorClass: SurvivorClass;
|
SurvivorClass: SurvivorClass;
|
||||||
WishList: string[];
|
WishList: string[];
|
||||||
|
moneyTransferLimitData: IMoneyTransferLimits;
|
||||||
/** SPT specific property used during bot generation in raid */
|
/** SPT specific property used during bot generation in raid */
|
||||||
sptIsPmc?: boolean;
|
sptIsPmc?: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IMoneyTransferLimits {
|
||||||
|
/** TODO: Implement */
|
||||||
|
nextResetTime: number;
|
||||||
|
remainingLimit: number;
|
||||||
|
totalLimit: number;
|
||||||
|
resetInterval: number;
|
||||||
|
}
|
||||||
export interface ITaskConditionCounter {
|
export interface ITaskConditionCounter {
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: string;
|
||||||
@ -74,6 +82,8 @@ export interface Info {
|
|||||||
BannedUntil: number;
|
BannedUntil: number;
|
||||||
IsStreamerModeAvailable: boolean;
|
IsStreamerModeAvailable: boolean;
|
||||||
lastCompletedEvent?: LastCompleted;
|
lastCompletedEvent?: LastCompleted;
|
||||||
|
SelectedMemberCategory: number;
|
||||||
|
isMigratedSkills: boolean;
|
||||||
}
|
}
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
Role: string;
|
Role: string;
|
||||||
@ -107,6 +117,7 @@ export interface Health {
|
|||||||
Temperature: CurrentMax;
|
Temperature: CurrentMax;
|
||||||
BodyParts: BodyPartsHealth;
|
BodyParts: BodyPartsHealth;
|
||||||
UpdateTime: number;
|
UpdateTime: number;
|
||||||
|
Immortal?: boolean;
|
||||||
}
|
}
|
||||||
export interface BodyPartsHealth {
|
export interface BodyPartsHealth {
|
||||||
Head: BodyPartHealth;
|
Head: BodyPartHealth;
|
||||||
|
@ -37,6 +37,7 @@ export interface Props {
|
|||||||
IsUngivable?: boolean;
|
IsUngivable?: boolean;
|
||||||
IsUnremovable?: boolean;
|
IsUnremovable?: boolean;
|
||||||
IsLockedafterEquip?: boolean;
|
IsLockedafterEquip?: boolean;
|
||||||
|
IsRagfairCurrency?: boolean;
|
||||||
IsSpecialSlotOnly?: boolean;
|
IsSpecialSlotOnly?: boolean;
|
||||||
IsStationaryWeapon?: boolean;
|
IsStationaryWeapon?: boolean;
|
||||||
QuestItem?: boolean;
|
QuestItem?: boolean;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
export interface IGetProfileSettingsRequest {
|
export interface IGetProfileSettingsRequest {
|
||||||
|
/** Chosen value for profile.Info.SelectedMemberCategory */
|
||||||
|
memberCategory: number;
|
||||||
squadInviteRestriction: boolean;
|
squadInviteRestriction: boolean;
|
||||||
}
|
}
|
||||||
|
@ -168,6 +168,8 @@ export interface Spt {
|
|||||||
receivedGifts: ReceivedGift[];
|
receivedGifts: ReceivedGift[];
|
||||||
/** item TPLs blacklisted from being sold on flea for this profile */
|
/** item TPLs blacklisted from being sold on flea for this profile */
|
||||||
blacklistedItemTpls?: string[];
|
blacklistedItemTpls?: string[];
|
||||||
|
/** key: daily type */
|
||||||
|
freeRepeatableChangeCount: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface ModDetails {
|
export interface ModDetails {
|
||||||
name: string;
|
name: string;
|
||||||
@ -178,7 +180,8 @@ export interface ModDetails {
|
|||||||
}
|
}
|
||||||
export interface ReceivedGift {
|
export interface ReceivedGift {
|
||||||
giftId: string;
|
giftId: string;
|
||||||
timestampAccepted: number;
|
timestampLastAccepted: number;
|
||||||
|
current: number;
|
||||||
}
|
}
|
||||||
export interface Vitality {
|
export interface Vitality {
|
||||||
health: Health;
|
health: Health;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
export declare enum Money {
|
export declare enum Money {
|
||||||
ROUBLES = "5449016a4bdc2d6f028b456f",
|
ROUBLES = "5449016a4bdc2d6f028b456f",
|
||||||
EUROS = "569668774bdc2da2298b4568",
|
EUROS = "569668774bdc2da2298b4568",
|
||||||
DOLLARS = "5696686a4bdc2da3298b456a"
|
DOLLARS = "5696686a4bdc2da3298b456a",
|
||||||
|
GP = "5d235b4d86f7742e017bc88a"
|
||||||
}
|
}
|
||||||
|
@ -8,5 +8,6 @@ export declare enum Traders {
|
|||||||
RAGMAN = "5ac3b934156ae10c4430e83c",
|
RAGMAN = "5ac3b934156ae10c4430e83c",
|
||||||
JAEGER = "5c0647fdd443bc2504c2d371",
|
JAEGER = "5c0647fdd443bc2504c2d371",
|
||||||
LIGHTHOUSEKEEPER = "638f541a29ffd1183d187f57",
|
LIGHTHOUSEKEEPER = "638f541a29ffd1183d187f57",
|
||||||
BTR = "656f0f98d80a697f855d34b1"
|
BTR = "656f0f98d80a697f855d34b1",
|
||||||
|
REF = "6617beeaa9cfa777ca915b7c"
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ export interface IBotConfig extends IBaseConfig {
|
|||||||
kind: "spt-bot";
|
kind: "spt-bot";
|
||||||
/** How many variants of each bot should be generated on raid start */
|
/** How many variants of each bot should be generated on raid start */
|
||||||
presetBatch: PresetBatch;
|
presetBatch: PresetBatch;
|
||||||
/** Bot roles that should not have PMC types (sptBear/sptUsec) added as enemies to */
|
/** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */
|
||||||
botsToNotAddPMCsAsEnemiesTo: string[];
|
botsToNotAddPMCsAsEnemiesTo: string[];
|
||||||
/** What bot types should be classified as bosses */
|
/** What bot types should be classified as bosses */
|
||||||
bosses: string[];
|
bosses: string[];
|
||||||
@ -80,8 +80,8 @@ export interface PresetBatch {
|
|||||||
crazyAssaultEvent: number;
|
crazyAssaultEvent: number;
|
||||||
bossBoar: number;
|
bossBoar: number;
|
||||||
bossBoarSniper: number;
|
bossBoarSniper: number;
|
||||||
sptUsec: number;
|
pmcUSEC: number;
|
||||||
sptBear: number;
|
pmcBEAR: number;
|
||||||
}
|
}
|
||||||
export interface IWalletLootSettings {
|
export interface IWalletLootSettings {
|
||||||
/** Chance wallets have loot in them */
|
/** Chance wallets have loot in them */
|
||||||
|
@ -67,6 +67,7 @@ export interface IChatbotFeatures {
|
|||||||
sptFriendEnabled: boolean;
|
sptFriendEnabled: boolean;
|
||||||
commandoEnabled: boolean;
|
commandoEnabled: boolean;
|
||||||
commandoFeatures: ICommandoFeatures;
|
commandoFeatures: ICommandoFeatures;
|
||||||
|
commandUseLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface ICommandoFeatures {
|
export interface ICommandoFeatures {
|
||||||
giveCommandEnabled: boolean;
|
giveCommandEnabled: boolean;
|
||||||
|
@ -28,4 +28,5 @@ export interface Gift {
|
|||||||
collectionTimeHours: number;
|
collectionTimeHours: number;
|
||||||
/** Optional, can be used to change profile settings like level/skills */
|
/** Optional, can be used to change profile settings like level/skills */
|
||||||
profileChangeEvents?: IProfileChangeEvent[];
|
profileChangeEvents?: IProfileChangeEvent[];
|
||||||
|
maxToSendPlayer?: number;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@ export interface IItemConfig extends IBaseConfig {
|
|||||||
kind: "spt-item";
|
kind: "spt-item";
|
||||||
/** Items that should be globally blacklisted */
|
/** Items that should be globally blacklisted */
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
|
/** Items that should not be lootable from any location */
|
||||||
|
lootableItemBlacklist: string[];
|
||||||
/** items that should not be given as rewards */
|
/** items that should not be given as rewards */
|
||||||
rewardItemBlacklist: string[];
|
rewardItemBlacklist: string[];
|
||||||
/** Items that can only be found on bosses */
|
/** Items that can only be found on bosses */
|
||||||
|
@ -54,6 +54,7 @@ export interface IRewardScaling {
|
|||||||
levels: number[];
|
levels: number[];
|
||||||
experience: number[];
|
experience: number[];
|
||||||
roubles: number[];
|
roubles: number[];
|
||||||
|
gpCoins: number[];
|
||||||
items: number[];
|
items: number[];
|
||||||
reputation: number[];
|
reputation: number[];
|
||||||
rewardSpread: number;
|
rewardSpread: number;
|
||||||
|
@ -16,6 +16,7 @@ export interface MoneyRewards {
|
|||||||
rubCount: MoneyLevels;
|
rubCount: MoneyLevels;
|
||||||
usdCount: MoneyLevels;
|
usdCount: MoneyLevels;
|
||||||
eurCount: MoneyLevels;
|
eurCount: MoneyLevels;
|
||||||
|
gpCount: MoneyLevels;
|
||||||
}
|
}
|
||||||
export interface MoneyLevels {
|
export interface MoneyLevels {
|
||||||
common: MinMax;
|
common: MinMax;
|
||||||
|
9
TypeScript/10ScopesAndTypes/types/models/spt/repeatable/IQuestRewardValues.d.ts
vendored
Normal file
9
TypeScript/10ScopesAndTypes/types/models/spt/repeatable/IQuestRewardValues.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
export interface IQuestRewardValues {
|
||||||
|
skillPointReward: number;
|
||||||
|
skillRewardChance: number;
|
||||||
|
rewardReputation: number;
|
||||||
|
rewardNumItems: number;
|
||||||
|
rewardRoubles: number;
|
||||||
|
gpCoinRewardCount: number;
|
||||||
|
rewardXP: number;
|
||||||
|
}
|
@ -9,12 +9,15 @@ export declare class EventOutputHolder {
|
|||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected cloner: ICloner;
|
protected cloner: ICloner;
|
||||||
/** What has client been informed of this game session */
|
/**
|
||||||
protected clientActiveSessionStorage: Record<string, {
|
* What has client been informed of this game session
|
||||||
|
* Key = sessionId, then second key is prod id
|
||||||
|
*/
|
||||||
|
protected clientActiveSessionStorage: Record<string, Record<string, {
|
||||||
clientInformed: boolean;
|
clientInformed: boolean;
|
||||||
}>;
|
}>>;
|
||||||
|
protected outputStore: Record<string, IItemEventRouterResponse>;
|
||||||
constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner);
|
constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner);
|
||||||
protected output: IItemEventRouterResponse;
|
|
||||||
getOutput(sessionID: string): IItemEventRouterResponse;
|
getOutput(sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Reset the response object to a default state
|
* Reset the response object to a default state
|
||||||
@ -44,7 +47,7 @@ export declare class EventOutputHolder {
|
|||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @returns dictionary of hideout productions
|
* @returns dictionary of hideout productions
|
||||||
*/
|
*/
|
||||||
protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive> | undefined;
|
protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>, sessionId: string): Record<string, Productive> | undefined;
|
||||||
/**
|
/**
|
||||||
* Required as continuous productions don't reset and stay at 100% completion but client thinks it hasn't started
|
* Required as continuous productions don't reset and stay at 100% completion but client thinks it hasn't started
|
||||||
* @param productions Productions in a profile
|
* @param productions Productions in a profile
|
||||||
|
@ -24,6 +24,17 @@ export declare class GiftService {
|
|||||||
* @returns True if it exists in db
|
* @returns True if it exists in db
|
||||||
*/
|
*/
|
||||||
giftExists(giftId: string): boolean;
|
giftExists(giftId: string): boolean;
|
||||||
|
getGiftById(giftId: string): Gift;
|
||||||
|
/**
|
||||||
|
* Get dictionary of all gifts
|
||||||
|
* @returns Dict keyed by gift id
|
||||||
|
*/
|
||||||
|
getGifts(): Record<string, Gift>;
|
||||||
|
/**
|
||||||
|
* Get an array of all gift ids
|
||||||
|
* @returns string array of gift ids
|
||||||
|
*/
|
||||||
|
getGiftIds(): string[];
|
||||||
/**
|
/**
|
||||||
* Send player a gift from a range of sources
|
* Send player a gift from a range of sources
|
||||||
* @param playerId Player to send gift to / sessionId
|
* @param playerId Player to send gift to / sessionId
|
||||||
|
@ -2,19 +2,29 @@ import { IItemConfig } from "@spt/models/spt/config/IItemConfig";
|
|||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
||||||
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
/** Centralise the handling of blacklisting items, uses blacklist found in config/item.json, stores items that should not be used by players / broken items */
|
/** Centralise the handling of blacklisting items, uses blacklist found in config/item.json, stores items that should not be used by players / broken items */
|
||||||
export declare class ItemFilterService {
|
export declare class ItemFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected cloner: ICloner;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected itemConfig: IItemConfig;
|
protected itemConfig: IItemConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, configServer: ConfigServer);
|
protected itemBlacklistCache: Set<string>;
|
||||||
|
protected lootableItemBlacklistCache: Set<string>;
|
||||||
|
constructor(logger: ILogger, cloner: ICloner, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Check if the provided template id is blacklisted in config/item.json
|
* Check if the provided template id is blacklisted in config/item.json/blacklist
|
||||||
* @param tpl template id
|
* @param tpl template id
|
||||||
* @returns true if blacklisted
|
* @returns true if blacklisted
|
||||||
*/
|
*/
|
||||||
isItemBlacklisted(tpl: string): boolean;
|
isItemBlacklisted(tpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Check if the provided template id is blacklisted in config/item.json/lootableItemBlacklist
|
||||||
|
* @param tpl template id
|
||||||
|
* @returns true if blacklisted
|
||||||
|
*/
|
||||||
|
isLootableItemBlacklisted(tpl: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Check if item is blacklisted from being a reward for player
|
* Check if item is blacklisted from being a reward for player
|
||||||
* @param tpl item tpl to check is on blacklist
|
* @param tpl item tpl to check is on blacklist
|
||||||
@ -31,6 +41,11 @@ export declare class ItemFilterService {
|
|||||||
* @returns string array of blacklisted tempalte ids
|
* @returns string array of blacklisted tempalte ids
|
||||||
*/
|
*/
|
||||||
getBlacklistedItems(): string[];
|
getBlacklistedItems(): string[];
|
||||||
|
/**
|
||||||
|
* Return every template id blacklisted in config/item.json/lootableItemBlacklist
|
||||||
|
* @returns string array of blacklisted tempalte ids
|
||||||
|
*/
|
||||||
|
getBlacklistedLootableItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Check if the provided template id is boss item in config/item.json
|
* Check if the provided template id is boss item in config/item.json
|
||||||
* @param tpl template id
|
* @param tpl template id
|
||||||
|
@ -3,9 +3,11 @@ import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
|||||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { Aggressor, Victim } from "@spt/models/eft/common/tables/IBotBase";
|
import { Aggressor, Victim } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
|
import { IGiftsConfig } from "@spt/models/spt/config/IGiftsConfig";
|
||||||
import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse";
|
import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
|
import { GiftService } from "@spt/services/GiftService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService";
|
import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
@ -17,10 +19,12 @@ export declare class PmcChatResponseService {
|
|||||||
protected notificationSendHelper: NotificationSendHelper;
|
protected notificationSendHelper: NotificationSendHelper;
|
||||||
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected giftService: GiftService;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected pmcResponsesConfig: IPmcChatResponse;
|
protected pmcResponsesConfig: IPmcChatResponse;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
protected giftConfig: IGiftsConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative
|
* For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
|
@ -146,9 +146,9 @@ export declare class SeasonalEventService {
|
|||||||
/**
|
/**
|
||||||
* Send gift to player if they'e not already received it
|
* Send gift to player if they'e not already received it
|
||||||
* @param playerId Player to send gift to
|
* @param playerId Player to send gift to
|
||||||
* @param giftkey Key of gift to give
|
* @param giftKey Key of gift to give
|
||||||
*/
|
*/
|
||||||
protected giveGift(playerId: string, giftkey: string): void;
|
protected giveGift(playerId: string, giftKey: string): void;
|
||||||
/**
|
/**
|
||||||
* Get the underlying bot type for an event bot e.g. `peacefullZryachiyEvent` will return `bossZryachiy`
|
* Get the underlying bot type for an event bot e.g. `peacefullZryachiyEvent` will return `bossZryachiy`
|
||||||
* @param eventBotRole Event bot role type
|
* @param eventBotRole Event bot role type
|
||||||
|
@ -52,7 +52,8 @@ export declare class JsonUtil {
|
|||||||
deserializeJson5<T>(jsonString: string, filename?: string): T | undefined;
|
deserializeJson5<T>(jsonString: string, filename?: string): T | undefined;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T | undefined>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T | undefined>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* Take json from file and convert into object
|
||||||
|
* Perform valadation on json during process if json file has not been processed before
|
||||||
* @param jsonString String to turn into object
|
* @param jsonString String to turn into object
|
||||||
* @param filePath Path to json file being processed
|
* @param filePath Path to json file being processed
|
||||||
* @returns Object
|
* @returns Object
|
||||||
|
@ -34,7 +34,7 @@ export declare class BotCallbacks {
|
|||||||
* Handle singleplayer/settings/bot/maxCap
|
* Handle singleplayer/settings/bot/maxCap
|
||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getBotCap(): string;
|
getBotCap(url: string, info: any, sessionID: string): string;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/settings/bot/getBotBehaviours
|
* Handle singleplayer/settings/bot/getBotBehaviours
|
||||||
* @returns string
|
* @returns string
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { HideoutController } from "@spt/controllers/HideoutController";
|
import { HideoutController } from "@spt/controllers/HideoutController";
|
||||||
import { RagfairController } from "@spt/controllers/RagfairController";
|
import { RagfairController } from "@spt/controllers/RagfairController";
|
||||||
|
import { TraderHelper } from "@spt/helpers/TraderHelper";
|
||||||
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
||||||
import { IGlobals } from "@spt/models/eft/common/IGlobals";
|
import { IGlobals } from "@spt/models/eft/common/IGlobals";
|
||||||
import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem";
|
import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem";
|
||||||
@ -13,15 +14,18 @@ import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyRespo
|
|||||||
import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase";
|
import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
||||||
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
/**
|
/**
|
||||||
* Handle client requests
|
* Handle client requests
|
||||||
*/
|
*/
|
||||||
export declare class DataCallbacks {
|
export declare class DataCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
protected databaseService: DatabaseService;
|
protected databaseService: DatabaseService;
|
||||||
protected ragfairController: RagfairController;
|
protected ragfairController: RagfairController;
|
||||||
protected hideoutController: HideoutController;
|
protected hideoutController: HideoutController;
|
||||||
constructor(httpResponse: HttpResponseUtil, databaseService: DatabaseService, ragfairController: RagfairController, hideoutController: HideoutController);
|
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, traderHelper: TraderHelper, databaseService: DatabaseService, ragfairController: RagfairController, hideoutController: HideoutController);
|
||||||
/**
|
/**
|
||||||
* Handle client/settings
|
* Handle client/settings
|
||||||
* @returns ISettingsBase
|
* @returns ISettingsBase
|
||||||
|
@ -102,7 +102,7 @@ export declare class BotController {
|
|||||||
*/
|
*/
|
||||||
protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise<void>;
|
protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Generate a single bot and store it in the cache
|
* Generate a single bot and store in the cache
|
||||||
* @param botGenerationDetails the bot details to generate the bot with
|
* @param botGenerationDetails the bot details to generate the bot with
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param cacheKey the cache key to store the bot with
|
* @param cacheKey the cache key to store the bot with
|
||||||
@ -125,8 +125,9 @@ export declare class BotController {
|
|||||||
/**
|
/**
|
||||||
* Get the max number of bots allowed on a map
|
* Get the max number of bots allowed on a map
|
||||||
* Looks up location player is entering when getting cap value
|
* Looks up location player is entering when getting cap value
|
||||||
|
* @param location The map location cap was requested for
|
||||||
* @returns cap number
|
* @returns cap number
|
||||||
*/
|
*/
|
||||||
getBotCap(): number;
|
getBotCap(location: string): number;
|
||||||
getAiBotBrainTypes(): any;
|
getAiBotBrainTypes(): any;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ export declare class LauncherController {
|
|||||||
* @returns Dictionary of profile types with related descriptive text
|
* @returns Dictionary of profile types with related descriptive text
|
||||||
*/
|
*/
|
||||||
protected getProfileDescriptions(): Record<string, string>;
|
protected getProfileDescriptions(): Record<string, string>;
|
||||||
find(sessionIdKey: string): Info;
|
find(sessionId: string): Info;
|
||||||
login(info: ILoginRequestData): string;
|
login(info: ILoginRequestData): string;
|
||||||
register(info: IRegisterData): string;
|
register(info: IRegisterData): string;
|
||||||
protected createAccount(info: IRegisterData): string;
|
protected createAccount(info: IRegisterData): string;
|
||||||
|
@ -10,6 +10,7 @@ import { IMiniProfile } from "@spt/models/eft/launcher/IMiniProfile";
|
|||||||
import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData";
|
import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData";
|
||||||
import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest";
|
import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest";
|
||||||
import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse";
|
import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse";
|
||||||
|
import { IGetProfileSettingsRequest } from "@spt/models/eft/profile/IGetProfileSettingsRequest";
|
||||||
import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData";
|
import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData";
|
||||||
import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData";
|
import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData";
|
||||||
import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData";
|
import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData";
|
||||||
@ -25,11 +26,13 @@ import { LocalisationService } from "@spt/services/LocalisationService";
|
|||||||
import { MailSendService } from "@spt/services/MailSendService";
|
import { MailSendService } from "@spt/services/MailSendService";
|
||||||
import { ProfileFixerService } from "@spt/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt/services/ProfileFixerService";
|
||||||
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
||||||
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
export declare class ProfileController {
|
export declare class ProfileController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
|
protected cloner: ICloner;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected databaseService: DatabaseService;
|
protected databaseService: DatabaseService;
|
||||||
@ -45,7 +48,7 @@ export declare class ProfileController {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected defaultInventoryTpl: string;
|
protected defaultInventoryTpl: string;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, cloner: ICloner, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
||||||
/**
|
/**
|
||||||
* Handle /launcher/profiles
|
* Handle /launcher/profiles
|
||||||
*/
|
*/
|
||||||
@ -53,7 +56,7 @@ export declare class ProfileController {
|
|||||||
/**
|
/**
|
||||||
* Handle launcher/profile/info
|
* Handle launcher/profile/info
|
||||||
*/
|
*/
|
||||||
getMiniProfile(sessionID: string): any;
|
getMiniProfile(sessionID: string): IMiniProfile;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/list
|
* Handle client/game/profile/list
|
||||||
*/
|
*/
|
||||||
@ -117,4 +120,8 @@ export declare class ProfileController {
|
|||||||
*/
|
*/
|
||||||
getProfileStatus(sessionId: string): GetProfileStatusResponseData;
|
getProfileStatus(sessionId: string): GetProfileStatusResponseData;
|
||||||
getOtherProfile(sessionId: string, request: IGetOtherProfileRequest): IGetOtherProfileResponse;
|
getOtherProfile(sessionId: string, request: IGetOtherProfileRequest): IGetOtherProfileResponse;
|
||||||
|
/**
|
||||||
|
* Handle client/profile/settings
|
||||||
|
*/
|
||||||
|
setChosenProfileIcon(sessionId: string, request: IGetProfileSettingsRequest): void;
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,7 @@ export declare class QuestController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
protected createAcceptedQuestClientResponse(sessionID: string, pmcData: IPmcData, repeatableQuestProfile: IRepeatableQuest): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Look for an accepted quest inside player profile, return matching
|
* Look for an accepted quest inside player profile, return matching
|
||||||
* @param pmcData Profile to search through
|
* @param pmcData Profile to search through
|
||||||
|
@ -2,7 +2,6 @@ import { RepeatableQuestGenerator } from "@spt/generators/RepeatableQuestGenerat
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "@spt/helpers/QuestHelper";
|
import { QuestHelper } from "@spt/helpers/QuestHelper";
|
||||||
import { RepeatableQuestHelper } from "@spt/helpers/RepeatableQuestHelper";
|
import { RepeatableQuestHelper } from "@spt/helpers/RepeatableQuestHelper";
|
||||||
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
|
||||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
|
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -62,12 +61,31 @@ export declare class RepeatableQuestController {
|
|||||||
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
||||||
* The new quests generated are again persisted in profile.RepeatableQuests
|
* The new quests generated are again persisted in profile.RepeatableQuests
|
||||||
*
|
*
|
||||||
* @param {string} _info Request from client
|
|
||||||
* @param {string} sessionID Player's session id
|
* @param {string} sessionID Player's session id
|
||||||
*
|
*
|
||||||
* @returns {array} Array of "repeatableQuestObjects" as described above
|
* @returns {array} Array of "repeatableQuestObjects" as described above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* Check if a repeatable quest type (daily/weekly) is active for the given profile
|
||||||
|
* @param repeatableConfig Repeatable quest config
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns True if profile is allowed to access dailies
|
||||||
|
*/
|
||||||
|
protected canProfileAccessRepeatableQuests(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Does player have daily scav quests unlocked
|
||||||
|
* @param pmcData Player profile to check
|
||||||
|
* @returns True if unlocked
|
||||||
|
*/
|
||||||
|
protected playerHasDailyScavQuestsUnlocked(pmcData: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Does player have daily pmc quests unlocked
|
||||||
|
* @param pmcData Player profile to check
|
||||||
|
* @param repeatableConfig Config of daily type to check
|
||||||
|
* @returns True if unlocked
|
||||||
|
*/
|
||||||
|
protected playerHasDailyPmcQuestsUnlocked(pmcData: IPmcData, repeatableConfig: IRepeatableQuestConfig): boolean;
|
||||||
/**
|
/**
|
||||||
* Get the number of quests to generate - takes into account charisma state of player
|
* Get the number of quests to generate - takes into account charisma state of player
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
@ -99,10 +117,10 @@ export declare class RepeatableQuestController {
|
|||||||
/**
|
/**
|
||||||
* Return the locations this PMC is allowed to get daily quests for based on their level
|
* Return the locations this PMC is allowed to get daily quests for based on their level
|
||||||
* @param locations The original list of locations
|
* @param locations The original list of locations
|
||||||
* @param pmcLevel The level of the player PMC
|
* @param pmcLevel The players level
|
||||||
* @returns A filtered list of locations that allow the player PMC level to access it
|
* @returns A filtered list of locations that allow the player PMC level to access it
|
||||||
*/
|
*/
|
||||||
protected getAllowedLocations(locations: Record<ELocationName, string[]>, pmcLevel: number): Partial<Record<ELocationName, string[]>>;
|
protected getAllowedLocationsForPmcLevel(locations: Record<ELocationName, string[]>, pmcLevel: number): Partial<Record<ELocationName, string[]>>;
|
||||||
/**
|
/**
|
||||||
* Return true if the given pmcLevel is allowed on the given location
|
* Return true if the given pmcLevel is allowed on the given location
|
||||||
* @param location The location name to check
|
* @param location The location name to check
|
||||||
@ -113,6 +131,12 @@ export declare class RepeatableQuestController {
|
|||||||
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Handle RepeatableQuestChange event
|
* Handle RepeatableQuestChange event
|
||||||
|
*
|
||||||
|
* Replace a players repeatable quest
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param changeRequest Request object
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
||||||
|
@ -5,7 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { Appearance, Health, IBotType } from "@spt/models/eft/common/tables/IBotType";
|
import { Appearance, Health, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
|
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
|
||||||
@ -13,6 +13,7 @@ import { ILogger } from "@spt/models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService";
|
import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
|
import { ItemFilterService } from "@spt/services/ItemFilterService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
||||||
import { ICloner } from "@spt/utils/cloners/ICloner";
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
@ -34,11 +35,12 @@ export declare class BotGenerator {
|
|||||||
protected botDifficultyHelper: BotDifficultyHelper;
|
protected botDifficultyHelper: BotDifficultyHelper;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected cloner: ICloner;
|
protected cloner: ICloner;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner);
|
||||||
/**
|
/**
|
||||||
* Generate a player scav bot object
|
* Generate a player scav bot object
|
||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
@ -54,6 +56,14 @@ export declare class BotGenerator {
|
|||||||
* @returns constructed bot
|
* @returns constructed bot
|
||||||
*/
|
*/
|
||||||
prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase;
|
prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Get a clone of the default bot base object and adjust its role/side/difficulty values
|
||||||
|
* @param botRole Role bot should have
|
||||||
|
* @param botSide Side bot should have
|
||||||
|
* @param difficulty Difficult bot should have
|
||||||
|
* @returns Cloned bot base
|
||||||
|
*/
|
||||||
|
protected getPreparedBotBase(botRole: string, botSide: string, difficulty: string): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Get a clone of the database\bots\base.json file
|
* Get a clone of the database\bots\base.json file
|
||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
@ -62,12 +72,17 @@ export declare class BotGenerator {
|
|||||||
/**
|
/**
|
||||||
* Create a IBotBase object with equipment/loot/exp etc
|
* Create a IBotBase object with equipment/loot/exp etc
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param bot bots base file
|
* @param bot Bots base file
|
||||||
* @param botJsonTemplate Bot template from db/bots/x.json
|
* @param botJsonTemplate Bot template from db/bots/x.json
|
||||||
* @param botGenerationDetails details on how to generate the bot
|
* @param botGenerationDetails details on how to generate the bot
|
||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Remove items from item.json/lootableItemBlacklist from bots inventory
|
||||||
|
* @param botInventory Bot to filter
|
||||||
|
*/
|
||||||
|
protected removeBlacklistedLootFromBotTemplate(botInventory: Inventory): void;
|
||||||
/**
|
/**
|
||||||
* Choose various appearance settings for a bot using weights
|
* Choose various appearance settings for a bot using weights
|
||||||
* @param bot Bot to adjust
|
* @param bot Bot to adjust
|
||||||
@ -80,10 +95,12 @@ export declare class BotGenerator {
|
|||||||
* @param botJsonTemplate x.json from database
|
* @param botJsonTemplate x.json from database
|
||||||
* @param botGenerationDetails
|
* @param botGenerationDetails
|
||||||
* @param botRole role of bot e.g. assault
|
* @param botRole role of bot e.g. assault
|
||||||
* @param sessionId profile session id
|
* @param sessionId OPTIONAL: profile session id
|
||||||
* @returns Nickname for bot
|
* @returns Nickname for bot
|
||||||
*/
|
*/
|
||||||
protected generateBotNickname(botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails, botRole: string, sessionId?: string): string;
|
protected generateBotNickname(botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails, botRole: string, sessionId?: string): string;
|
||||||
|
protected shouldSimulatePlayerScavName(botRole: string, isPlayerScav: boolean): boolean;
|
||||||
|
protected addPlayerScavNameSimulationSuffix(nickname: string): string;
|
||||||
/**
|
/**
|
||||||
* Log the number of PMCs generated to the debug console
|
* Log the number of PMCs generated to the debug console
|
||||||
* @param output Generated bot array, ready to send to client
|
* @param output Generated bot array, ready to send to client
|
||||||
@ -110,12 +127,17 @@ export declare class BotGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getSkillsWithRandomisedProgressValue(skills: Record<string, IBaseSkill>, isCommonSkills: boolean): IBaseSkill[];
|
protected getSkillsWithRandomisedProgressValue(skills: Record<string, IBaseSkill>, isCommonSkills: boolean): IBaseSkill[];
|
||||||
/**
|
/**
|
||||||
* Generate a random Id for a bot and apply to bots _id and aid value
|
* Generate an id+aid for a bot and apply
|
||||||
* @param bot bot to update
|
* @param bot bot to update
|
||||||
* @returns updated IBotBase object
|
* @returns updated IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateId(bot: IBotBase): void;
|
protected addIdsToBot(bot: IBotBase): void;
|
||||||
protected generateInventoryID(profile: IBotBase): void;
|
/**
|
||||||
|
* Update a profiles profile.Inventory.equipment value with a freshly generated one
|
||||||
|
* Update all inventory items that make use of this value too
|
||||||
|
* @param profile Profile to update
|
||||||
|
*/
|
||||||
|
protected generateInventoryId(profile: IBotBase): void;
|
||||||
/**
|
/**
|
||||||
* Randomise a bots game version and account category
|
* Randomise a bots game version and account category
|
||||||
* Chooses from all the game versions (standard, eod etc)
|
* Chooses from all the game versions (standard, eod etc)
|
||||||
|
@ -60,7 +60,7 @@ export declare class BotLootGenerator {
|
|||||||
/**
|
/**
|
||||||
* Force healing items onto bot to ensure they can heal in-raid
|
* Force healing items onto bot to ensure they can heal in-raid
|
||||||
* @param botInventory Inventory to add items to
|
* @param botInventory Inventory to add items to
|
||||||
* @param botRole Role of bot (sptBear/sptUsec)
|
* @param botRole Role of bot (pmcBEAR/pmcUSEC)
|
||||||
*/
|
*/
|
||||||
protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void;
|
protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void;
|
||||||
/**
|
/**
|
||||||
|
@ -9,6 +9,7 @@ import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
|
|||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
|
import { ItemFilterService } from "@spt/services/ItemFilterService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
||||||
import { ICloner } from "@spt/utils/cloners/ICloner";
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
@ -37,14 +38,15 @@ export declare class LocationGenerator {
|
|||||||
protected containerHelper: ContainerHelper;
|
protected containerHelper: ContainerHelper;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected cloner: ICloner;
|
protected cloner: ICloner;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseService: DatabaseService, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
|
constructor(logger: ILogger, databaseService: DatabaseService, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner);
|
||||||
/**
|
/**
|
||||||
* Create an array of container objects with randomised loot
|
* Create an array of container objects with randomised loot
|
||||||
* @param locationBase Map base to generate containers for
|
* @param locationBase Map base to generate containers for
|
||||||
* @param staticAmmoDist Static ammo distribution - database.loot.staticAmmo
|
* @param staticAmmoDist Static ammo distribution
|
||||||
* @returns Array of container objects
|
* @returns Array of container objects
|
||||||
*/
|
*/
|
||||||
generateStaticContainers(locationBase: ILocationBase, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): SpawnpointTemplate[];
|
generateStaticContainers(locationBase: ILocationBase, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): SpawnpointTemplate[];
|
||||||
|
@ -4,7 +4,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper";
|
|||||||
import { Item } from "@spt/models/eft/common/tables/IItem";
|
import { Item } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { IQuestReward, IQuestRewards } from "@spt/models/eft/common/tables/IQuest";
|
import { IQuestReward, IQuestRewards } from "@spt/models/eft/common/tables/IQuest";
|
||||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig";
|
import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig, IRewardScaling } from "@spt/models/spt/config/IQuestConfig";
|
||||||
|
import { IQuestRewardValues } from "@spt/models/spt/repeatable/IQuestRewardValues";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
@ -52,6 +53,29 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
*/
|
*/
|
||||||
generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards;
|
generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards;
|
||||||
|
protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues;
|
||||||
|
/**
|
||||||
|
* Get an array of items + stack size to give to player as reward that fit inside of a rouble budget
|
||||||
|
* @param itemPool All possible items to choose rewards from
|
||||||
|
* @param maxItemCount Total number of items to reward
|
||||||
|
* @param itemRewardBudget Rouble buget all item rewards must fit in
|
||||||
|
* @param repeatableConfig config for quest type
|
||||||
|
* @returns Items and stack size
|
||||||
|
*/
|
||||||
|
protected getRewardableItemsFromPoolWithinBudget(itemPool: ITemplateItem[], maxItemCount: number, itemRewardBudget: number, repeatableConfig: IRepeatableQuestConfig): {
|
||||||
|
item: ITemplateItem;
|
||||||
|
stackSize: number;
|
||||||
|
}[];
|
||||||
|
/**
|
||||||
|
* Choose a random Weapon preset that fits inside of a rouble amount limit
|
||||||
|
* @param roublesBudget
|
||||||
|
* @param rewardIndex
|
||||||
|
* @returns IQuestReward
|
||||||
|
*/
|
||||||
|
protected getRandomWeaponPresetWithinBudget(roublesBudget: number, rewardIndex: number): {
|
||||||
|
weapon: IQuestReward;
|
||||||
|
price: number;
|
||||||
|
} | undefined;
|
||||||
/**
|
/**
|
||||||
* @param rewardItems List of reward items to filter
|
* @param rewardItems List of reward items to filter
|
||||||
* @param roublesBudget The budget remaining for rewards
|
* @param roublesBudget The budget remaining for rewards
|
||||||
@ -62,21 +86,31 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
/**
|
/**
|
||||||
* Get a randomised number a reward items stack size should be based on its handbook price
|
* Get a randomised number a reward items stack size should be based on its handbook price
|
||||||
* @param item Reward item to get stack size for
|
* @param item Reward item to get stack size for
|
||||||
* @returns Stack size value
|
* @returns matching stack size for the passed in items price
|
||||||
*/
|
*/
|
||||||
protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number;
|
protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number;
|
||||||
/**
|
/**
|
||||||
* Should reward item have stack size increased (25% chance)
|
* Should reward item have stack size increased (25% chance)
|
||||||
* @param item Item to possibly increase stack size of
|
* @param item Item to increase reward stack size of
|
||||||
* @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking
|
* @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking
|
||||||
* @returns True if it should
|
* @param randomChanceToPass Additional randomised chance of passing
|
||||||
|
* @returns True if items stack size can be increased
|
||||||
|
*/
|
||||||
|
protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number, randomChanceToPass?: number): boolean;
|
||||||
|
/**
|
||||||
|
* Get a count of cartridges that fits the rouble budget amount provided
|
||||||
|
* e.g. how many M80s for 50,000 roubles
|
||||||
|
* @param itemSelected Cartridge
|
||||||
|
* @param roublesBudget Rouble budget
|
||||||
|
* @param rewardNumItems
|
||||||
|
* @returns Count that fits budget (min 1)
|
||||||
*/
|
*/
|
||||||
protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean;
|
|
||||||
protected calculateAmmoStackSizeThatFitsBudget(itemSelected: ITemplateItem, roublesBudget: number, rewardNumItems: number): number;
|
protected calculateAmmoStackSizeThatFitsBudget(itemSelected: ITemplateItem, roublesBudget: number, rewardNumItems: number): number;
|
||||||
/**
|
/**
|
||||||
* Select a number of items that have a colelctive value of the passed in parameter
|
* Select a number of items that have a colelctive value of the passed in parameter
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
* @param roublesBudget Total value of items to return
|
* @param roublesBudget Total value of items to return
|
||||||
|
* @param traderId Id of the trader who will give player reward
|
||||||
* @returns Array of reward items that fit budget
|
* @returns Array of reward items that fit budget
|
||||||
*/
|
*/
|
||||||
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[];
|
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[];
|
||||||
@ -86,12 +120,18 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
* @param {string} tpl ItemId of the rewarded item
|
* @param {string} tpl ItemId of the rewarded item
|
||||||
* @param {integer} value Amount of items to give
|
* @param {integer} value Amount of items to give
|
||||||
* @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index
|
* @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index
|
||||||
|
* @param preset Optional array of preset items
|
||||||
* @returns {object} Object of "Reward"-item-type
|
* @returns {object} Object of "Reward"-item-type
|
||||||
*/
|
*/
|
||||||
protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward;
|
protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward;
|
||||||
/**
|
/**
|
||||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
* Picks rewardable items from items.json
|
||||||
|
* This means they must:
|
||||||
|
* - Fit into the inventory
|
||||||
|
* - Shouldn't be keys
|
||||||
|
* - Have a price greater than 0
|
||||||
* @param repeatableQuestConfig Config file
|
* @param repeatableQuestConfig Config file
|
||||||
|
* @param traderId Id of trader who will give reward to player
|
||||||
* @returns List of rewardable items [[_tpl, itemTemplate],...]
|
* @returns List of rewardable items [[_tpl, itemTemplate],...]
|
||||||
*/
|
*/
|
||||||
getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][];
|
getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][];
|
||||||
@ -102,5 +142,5 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
* @returns True if item is valid reward
|
* @returns True if item is valid reward
|
||||||
*/
|
*/
|
||||||
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean;
|
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean;
|
||||||
protected addMoneyReward(traderId: string, rewards: IQuestRewards, rewardRoubles: number, rewardIndex: number): void;
|
protected getMoneyReward(traderId: string, rewardRoubles: number, rewardIndex: number): IQuestReward;
|
||||||
}
|
}
|
||||||
|
@ -21,8 +21,8 @@ export declare class BotDifficultyHelper {
|
|||||||
* Get a difficulty object modified to handle fighting other PMCs
|
* Get a difficulty object modified to handle fighting other PMCs
|
||||||
* @param pmcType 'bear or 'usec'
|
* @param pmcType 'bear or 'usec'
|
||||||
* @param difficulty easy / normal / hard / impossible
|
* @param difficulty easy / normal / hard / impossible
|
||||||
* @param usecType sptUsec
|
* @param usecType pmcUSEC
|
||||||
* @param bearType sptBear
|
* @param bearType pmcBEAR
|
||||||
* @returns Difficulty object
|
* @returns Difficulty object
|
||||||
*/
|
*/
|
||||||
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
|
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
|
||||||
|
@ -56,12 +56,12 @@ export declare class BotHelper {
|
|||||||
*/
|
*/
|
||||||
getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined;
|
getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined;
|
||||||
/**
|
/**
|
||||||
* Choose between sptBear and sptUsec at random based on the % defined in pmcConfig.isUsec
|
* Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec
|
||||||
* @returns pmc role
|
* @returns pmc role
|
||||||
*/
|
*/
|
||||||
getRandomizedPmcRole(): string;
|
getRandomizedPmcRole(): string;
|
||||||
/**
|
/**
|
||||||
* Get the corresponding side when sptBear or sptUsec is passed in
|
* Get the corresponding side when pmcBEAR or pmcUSEC is passed in
|
||||||
* @param botRole role to get side for
|
* @param botRole role to get side for
|
||||||
* @returns side (usec/bear)
|
* @returns side (usec/bear)
|
||||||
*/
|
*/
|
||||||
|
@ -416,7 +416,7 @@ export declare class ItemHelper {
|
|||||||
/**
|
/**
|
||||||
* Get the name of an item from the locale file using the item tpl
|
* Get the name of an item from the locale file using the item tpl
|
||||||
* @param itemTpl Tpl of item to get name of
|
* @param itemTpl Tpl of item to get name of
|
||||||
* @returns Name of item
|
* @returns Full name, short name if not found
|
||||||
*/
|
*/
|
||||||
getItemName(itemTpl: string): string;
|
getItemName(itemTpl: string): string;
|
||||||
/**
|
/**
|
||||||
|
@ -42,10 +42,10 @@ export declare class ProfileHelper {
|
|||||||
getProfiles(): Record<string, ISptProfile>;
|
getProfiles(): Record<string, ISptProfile>;
|
||||||
/**
|
/**
|
||||||
* Get the pmc and scav profiles as an array by profile id
|
* Get the pmc and scav profiles as an array by profile id
|
||||||
* @param sessionID
|
* @param sessionId
|
||||||
* @returns Array of IPmcData objects
|
* @returns Array of IPmcData objects
|
||||||
*/
|
*/
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
getCompleteProfile(sessionId: string): IPmcData[];
|
||||||
/**
|
/**
|
||||||
* Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen
|
* Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen
|
||||||
* Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using
|
* Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using
|
||||||
@ -58,12 +58,12 @@ export declare class ProfileHelper {
|
|||||||
* @param scavProfile post-raid scav profile
|
* @param scavProfile post-raid scav profile
|
||||||
* @returns Updated profile array
|
* @returns Updated profile array
|
||||||
*/
|
*/
|
||||||
protected postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[];
|
protected postRaidXpWorkaroundFix(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, output: IPmcData[]): IPmcData[];
|
||||||
/**
|
/**
|
||||||
* Check if a nickname is used by another profile loaded by the server
|
* Check if a nickname is used by another profile loaded by the server
|
||||||
* @param nicknameRequest nickname request object
|
* @param nicknameRequest nickname request object
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns True if already used
|
* @returns True if already in use
|
||||||
*/
|
*/
|
||||||
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||||
protected profileHasInfoProperty(profile: ISptProfile): boolean;
|
protected profileHasInfoProperty(profile: ISptProfile): boolean;
|
||||||
@ -79,10 +79,10 @@ export declare class ProfileHelper {
|
|||||||
* @param pmcId Profile id to find
|
* @param pmcId Profile id to find
|
||||||
* @returns IPmcData
|
* @returns IPmcData
|
||||||
*/
|
*/
|
||||||
getProfileByPmcId(pmcId: string): IPmcData;
|
getProfileByPmcId(pmcId: string): IPmcData | undefined;
|
||||||
/**
|
/**
|
||||||
* Get the experiecne for the given level
|
* Get experience value for given level
|
||||||
* @param level level to get xp for
|
* @param level Level to get xp for
|
||||||
* @returns Number of xp points for level
|
* @returns Number of xp points for level
|
||||||
*/
|
*/
|
||||||
getExperience(level: number): number;
|
getExperience(level: number): number;
|
||||||
@ -105,9 +105,9 @@ export declare class ProfileHelper {
|
|||||||
*/
|
*/
|
||||||
getPmcProfile(sessionID: string): IPmcData | undefined;
|
getPmcProfile(sessionID: string): IPmcData | undefined;
|
||||||
/**
|
/**
|
||||||
* Is this user id the logged in player
|
* Is given user id a player
|
||||||
* @param userId Id to test
|
* @param userId Id to validate
|
||||||
* @returns True is the current player
|
* @returns True is a player
|
||||||
*/
|
*/
|
||||||
isPlayer(userId: string): boolean;
|
isPlayer(userId: string): boolean;
|
||||||
/**
|
/**
|
||||||
@ -127,7 +127,6 @@ export declare class ProfileHelper {
|
|||||||
* @returns True if profile is to be wiped of data/progress
|
* @returns True if profile is to be wiped of data/progress
|
||||||
*/
|
*/
|
||||||
protected isWiped(sessionID: string): boolean;
|
protected isWiped(sessionID: string): boolean;
|
||||||
protected getServerVersion(): string;
|
|
||||||
/**
|
/**
|
||||||
* Iterate over player profile inventory items and find the secure container and remove it
|
* Iterate over player profile inventory items and find the secure container and remove it
|
||||||
* @param profile Profile to remove secure container from
|
* @param profile Profile to remove secure container from
|
||||||
@ -139,15 +138,17 @@ export declare class ProfileHelper {
|
|||||||
* Store giftid in profile spt object
|
* Store giftid in profile spt object
|
||||||
* @param playerId Player to add gift flag to
|
* @param playerId Player to add gift flag to
|
||||||
* @param giftId Gift player received
|
* @param giftId Gift player received
|
||||||
|
* @param maxCount Limit of how many of this gift a player can have
|
||||||
*/
|
*/
|
||||||
addGiftReceivedFlagToProfile(playerId: string, giftId: string): void;
|
flagGiftReceivedInProfile(playerId: string, giftId: string, maxCount: number): void;
|
||||||
/**
|
/**
|
||||||
* Check if profile has recieved a gift by id
|
* Check if profile has recieved a gift by id
|
||||||
* @param playerId Player profile to check for gift
|
* @param playerId Player profile to check for gift
|
||||||
* @param giftId Gift to check for
|
* @param giftId Gift to check for
|
||||||
|
* @param maxGiftCount Max times gift can be given to player
|
||||||
* @returns True if player has recieved gift previously
|
* @returns True if player has recieved gift previously
|
||||||
*/
|
*/
|
||||||
playerHasRecievedGift(playerId: string, giftId: string): boolean;
|
playerHasRecievedMaxNumberOfGift(playerId: string, giftId: string, maxGiftCount: number): boolean;
|
||||||
/**
|
/**
|
||||||
* Find Stat in profile counters and increment by one
|
* Find Stat in profile counters and increment by one
|
||||||
* @param counters Counters to search for key
|
* @param counters Counters to search for key
|
||||||
@ -189,4 +190,11 @@ export declare class ProfileHelper {
|
|||||||
* @param rowsToAdd How many rows to give profile
|
* @param rowsToAdd How many rows to give profile
|
||||||
*/
|
*/
|
||||||
addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void;
|
addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void;
|
||||||
|
playerIsFleaBanned(pmcProfile: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Add an achievement to player profile
|
||||||
|
* @param pmcProfile Profile to add achievement to
|
||||||
|
* @param achievementId Id of achievement to add
|
||||||
|
*/
|
||||||
|
addAchievementToProfile(pmcProfile: IPmcData, achievementId: string): void;
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ export declare class RagfairOfferHelper {
|
|||||||
* @param pmcProfile Player profile
|
* @param pmcProfile Player profile
|
||||||
* @returns True = should be shown to player
|
* @returns True = should be shown to player
|
||||||
*/
|
*/
|
||||||
isDisplayableOffer(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
isDisplayableOffer(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData, playerIsFleaBanned?: boolean): boolean;
|
||||||
isDisplayableOfferThatNeedsItem(searchRequest: ISearchRequestData, offer: IRagfairOffer): boolean;
|
isDisplayableOfferThatNeedsItem(searchRequest: ISearchRequestData, offer: IRagfairOffer): boolean;
|
||||||
/**
|
/**
|
||||||
* Does the passed in item have a condition property
|
* Does the passed in item have a condition property
|
||||||
|
@ -59,10 +59,11 @@ export declare class TradeHelper {
|
|||||||
/**
|
/**
|
||||||
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
|
* @param pmcData Profile making the purchase
|
||||||
* @param traderId Trader assort is purchased from
|
* @param traderId Trader assort is purchased from
|
||||||
* @param assortBeingPurchased the item from trader being bought
|
* @param assortBeingPurchased the item from trader being bought
|
||||||
* @param assortId Id of assort being purchased
|
* @param assortId Id of assort being purchased
|
||||||
* @param count How many of the item are being bought
|
* @param count How many of the item are being bought
|
||||||
*/
|
*/
|
||||||
protected checkPurchaseIsWithinTraderItemLimit(sessionId: string, traderId: string, assortBeingPurchased: Item, assortId: string, count: number): void;
|
protected checkPurchaseIsWithinTraderItemLimit(sessionId: string, pmcData: IPmcData, traderId: string, assortBeingPurchased: Item, assortId: string, count: number): void;
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,6 @@ export declare class TraderHelper {
|
|||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
/** Dictionary of item tpl and the highest trader sell rouble price */
|
/** Dictionary of item tpl and the highest trader sell rouble price */
|
||||||
protected highestTraderPriceItems?: Record<string, number>;
|
protected highestTraderPriceItems?: Record<string, number>;
|
||||||
/** Dictionary of item tpl and the highest trader buy back rouble price */
|
|
||||||
protected highestTraderBuyPriceItems?: Record<string, number>;
|
|
||||||
constructor(logger: ILogger, databaseService: DatabaseService, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, itemHelper: ItemHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, randomUtil: RandomUtil, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseService: DatabaseService, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, itemHelper: ItemHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get a trader base object, update profile to reflect players current standing in profile
|
* Get a trader base object, update profile to reflect players current standing in profile
|
||||||
@ -133,6 +131,13 @@ export declare class TraderHelper {
|
|||||||
}[];
|
}[];
|
||||||
traderId: string;
|
traderId: string;
|
||||||
}, itemPurchased: Item): void;
|
}, itemPurchased: Item): void;
|
||||||
|
/**
|
||||||
|
* EoD and Unheard get a 20% bonus to personal trader limit purchases
|
||||||
|
* @param buyRestrictionMax Existing value from trader item
|
||||||
|
* @param gameVersion Profiles game version
|
||||||
|
* @returns buyRestrictionMax value
|
||||||
|
*/
|
||||||
|
getAccountTypeAdjustedTraderPurchaseLimit(buyRestrictionMax: number, gameVersion: string): number;
|
||||||
/**
|
/**
|
||||||
* Get the highest rouble price for an item from traders
|
* Get the highest rouble price for an item from traders
|
||||||
* UNUSED
|
* UNUSED
|
||||||
|
@ -31,7 +31,6 @@ export interface IConfig {
|
|||||||
TradingUnlimitedItems: boolean;
|
TradingUnlimitedItems: boolean;
|
||||||
MaxLoyaltyLevelForAll: boolean;
|
MaxLoyaltyLevelForAll: boolean;
|
||||||
GlobalLootChanceModifier: number;
|
GlobalLootChanceModifier: number;
|
||||||
GlobalLootChanceModifierPvE: number;
|
|
||||||
GraphicSettings: IGraphicSettings;
|
GraphicSettings: IGraphicSettings;
|
||||||
TimeBeforeDeploy: number;
|
TimeBeforeDeploy: number;
|
||||||
TimeBeforeDeployLocal: number;
|
TimeBeforeDeployLocal: number;
|
||||||
@ -49,6 +48,7 @@ export interface IConfig {
|
|||||||
BotsEnabled: boolean;
|
BotsEnabled: boolean;
|
||||||
BufferZone: IBufferZone;
|
BufferZone: IBufferZone;
|
||||||
ArmorMaterials: IArmorMaterials;
|
ArmorMaterials: IArmorMaterials;
|
||||||
|
ArenaEftTransferSettings: IArenaEftTransferSettings;
|
||||||
LegsOverdamage: number;
|
LegsOverdamage: number;
|
||||||
HandsOverdamage: number;
|
HandsOverdamage: number;
|
||||||
StomachOverdamage: number;
|
StomachOverdamage: number;
|
||||||
@ -76,6 +76,7 @@ export interface IConfig {
|
|||||||
SkillPointsBeforeFatigue: number;
|
SkillPointsBeforeFatigue: number;
|
||||||
SkillFatigueReset: number;
|
SkillFatigueReset: number;
|
||||||
DiscardLimitsEnabled: boolean;
|
DiscardLimitsEnabled: boolean;
|
||||||
|
EnvironmentSettings: IEnvironmentSetting2;
|
||||||
EventSettings: IEventSettings;
|
EventSettings: IEventSettings;
|
||||||
FavoriteItemsSettings: IFavoriteItemsSettings;
|
FavoriteItemsSettings: IFavoriteItemsSettings;
|
||||||
VaultingSettings: IVaultingSettings;
|
VaultingSettings: IVaultingSettings;
|
||||||
@ -102,6 +103,12 @@ export interface IConfig {
|
|||||||
Ballistic: IBallistic;
|
Ballistic: IBallistic;
|
||||||
RepairSettings: IRepairSettings;
|
RepairSettings: IRepairSettings;
|
||||||
}
|
}
|
||||||
|
export interface IEnvironmentSetting2 {
|
||||||
|
EnvironmentUIData: IEnvironmentUIData;
|
||||||
|
}
|
||||||
|
export interface IEnvironmentUIData {
|
||||||
|
TheUnheardEditionEnvironmentUiType: string[];
|
||||||
|
}
|
||||||
export interface IBodyPartColliderSettings {
|
export interface IBodyPartColliderSettings {
|
||||||
BackHead: IBodyPartColliderPart;
|
BackHead: IBodyPartColliderPart;
|
||||||
Ears: IBodyPartColliderPart;
|
Ears: IBodyPartColliderPart;
|
||||||
@ -178,8 +185,12 @@ export interface IItemsCommonSettings {
|
|||||||
ItemRemoveAfterInterruptionTime: number;
|
ItemRemoveAfterInterruptionTime: number;
|
||||||
}
|
}
|
||||||
export interface ITradingSettings {
|
export interface ITradingSettings {
|
||||||
|
BuyRestrictionMaxBonus: Record<string, IBuyRestrictionMaxBonus>;
|
||||||
BuyoutRestrictions: IBuyoutRestrictions;
|
BuyoutRestrictions: IBuyoutRestrictions;
|
||||||
}
|
}
|
||||||
|
export interface IBuyRestrictionMaxBonus {
|
||||||
|
multiplier: number;
|
||||||
|
}
|
||||||
export interface IBuyoutRestrictions {
|
export interface IBuyoutRestrictions {
|
||||||
MinDurability: number;
|
MinDurability: number;
|
||||||
MinFoodDrinkResource: number;
|
MinFoodDrinkResource: number;
|
||||||
@ -381,6 +392,17 @@ export interface IBodyParts {
|
|||||||
Feet: string;
|
Feet: string;
|
||||||
Hands: string;
|
Hands: string;
|
||||||
}
|
}
|
||||||
|
export interface IArenaEftTransferSettings {
|
||||||
|
ArenaEftTransferSettings: ArenaEftTransferSettings;
|
||||||
|
}
|
||||||
|
export interface ArenaEftTransferSettings {
|
||||||
|
ArenaManagerReputationTaxMultiplier: number;
|
||||||
|
CharismaTaxMultiplier: number;
|
||||||
|
CreditPriceTaxMultiplier: number;
|
||||||
|
RubTaxMultiplier: number;
|
||||||
|
TransferLimitsByGameEdition: Record<string, number>;
|
||||||
|
TransferLimitsSettings: Record<string, number>;
|
||||||
|
}
|
||||||
export interface IArmorMaterials {
|
export interface IArmorMaterials {
|
||||||
UHMWPE: IArmorType;
|
UHMWPE: IArmorType;
|
||||||
Aramid: IArmorType;
|
Aramid: IArmorType;
|
||||||
@ -802,6 +824,7 @@ export interface IMaxActiveOfferCount {
|
|||||||
from: number;
|
from: number;
|
||||||
to: number;
|
to: number;
|
||||||
count: number;
|
count: number;
|
||||||
|
countForSpecialEditions: number;
|
||||||
}
|
}
|
||||||
export interface IMaxSumForRarity {
|
export interface IMaxSumForRarity {
|
||||||
Common: IRarityMaxSum;
|
Common: IRarityMaxSum;
|
||||||
|
@ -35,9 +35,17 @@ export interface IBotBase {
|
|||||||
CoopExtractCounts: Record<string, number>;
|
CoopExtractCounts: Record<string, number>;
|
||||||
SurvivorClass: SurvivorClass;
|
SurvivorClass: SurvivorClass;
|
||||||
WishList: string[];
|
WishList: string[];
|
||||||
|
moneyTransferLimitData: IMoneyTransferLimits;
|
||||||
/** SPT specific property used during bot generation in raid */
|
/** SPT specific property used during bot generation in raid */
|
||||||
sptIsPmc?: boolean;
|
sptIsPmc?: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IMoneyTransferLimits {
|
||||||
|
/** TODO: Implement */
|
||||||
|
nextResetTime: number;
|
||||||
|
remainingLimit: number;
|
||||||
|
totalLimit: number;
|
||||||
|
resetInterval: number;
|
||||||
|
}
|
||||||
export interface ITaskConditionCounter {
|
export interface ITaskConditionCounter {
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: string;
|
||||||
@ -74,6 +82,8 @@ export interface Info {
|
|||||||
BannedUntil: number;
|
BannedUntil: number;
|
||||||
IsStreamerModeAvailable: boolean;
|
IsStreamerModeAvailable: boolean;
|
||||||
lastCompletedEvent?: LastCompleted;
|
lastCompletedEvent?: LastCompleted;
|
||||||
|
SelectedMemberCategory: number;
|
||||||
|
isMigratedSkills: boolean;
|
||||||
}
|
}
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
Role: string;
|
Role: string;
|
||||||
@ -107,6 +117,7 @@ export interface Health {
|
|||||||
Temperature: CurrentMax;
|
Temperature: CurrentMax;
|
||||||
BodyParts: BodyPartsHealth;
|
BodyParts: BodyPartsHealth;
|
||||||
UpdateTime: number;
|
UpdateTime: number;
|
||||||
|
Immortal?: boolean;
|
||||||
}
|
}
|
||||||
export interface BodyPartsHealth {
|
export interface BodyPartsHealth {
|
||||||
Head: BodyPartHealth;
|
Head: BodyPartHealth;
|
||||||
|
@ -37,6 +37,7 @@ export interface Props {
|
|||||||
IsUngivable?: boolean;
|
IsUngivable?: boolean;
|
||||||
IsUnremovable?: boolean;
|
IsUnremovable?: boolean;
|
||||||
IsLockedafterEquip?: boolean;
|
IsLockedafterEquip?: boolean;
|
||||||
|
IsRagfairCurrency?: boolean;
|
||||||
IsSpecialSlotOnly?: boolean;
|
IsSpecialSlotOnly?: boolean;
|
||||||
IsStationaryWeapon?: boolean;
|
IsStationaryWeapon?: boolean;
|
||||||
QuestItem?: boolean;
|
QuestItem?: boolean;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
export interface IGetProfileSettingsRequest {
|
export interface IGetProfileSettingsRequest {
|
||||||
|
/** Chosen value for profile.Info.SelectedMemberCategory */
|
||||||
|
memberCategory: number;
|
||||||
squadInviteRestriction: boolean;
|
squadInviteRestriction: boolean;
|
||||||
}
|
}
|
||||||
|
@ -168,6 +168,8 @@ export interface Spt {
|
|||||||
receivedGifts: ReceivedGift[];
|
receivedGifts: ReceivedGift[];
|
||||||
/** item TPLs blacklisted from being sold on flea for this profile */
|
/** item TPLs blacklisted from being sold on flea for this profile */
|
||||||
blacklistedItemTpls?: string[];
|
blacklistedItemTpls?: string[];
|
||||||
|
/** key: daily type */
|
||||||
|
freeRepeatableChangeCount: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface ModDetails {
|
export interface ModDetails {
|
||||||
name: string;
|
name: string;
|
||||||
@ -178,7 +180,8 @@ export interface ModDetails {
|
|||||||
}
|
}
|
||||||
export interface ReceivedGift {
|
export interface ReceivedGift {
|
||||||
giftId: string;
|
giftId: string;
|
||||||
timestampAccepted: number;
|
timestampLastAccepted: number;
|
||||||
|
current: number;
|
||||||
}
|
}
|
||||||
export interface Vitality {
|
export interface Vitality {
|
||||||
health: Health;
|
health: Health;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
export declare enum Money {
|
export declare enum Money {
|
||||||
ROUBLES = "5449016a4bdc2d6f028b456f",
|
ROUBLES = "5449016a4bdc2d6f028b456f",
|
||||||
EUROS = "569668774bdc2da2298b4568",
|
EUROS = "569668774bdc2da2298b4568",
|
||||||
DOLLARS = "5696686a4bdc2da3298b456a"
|
DOLLARS = "5696686a4bdc2da3298b456a",
|
||||||
|
GP = "5d235b4d86f7742e017bc88a"
|
||||||
}
|
}
|
||||||
|
@ -8,5 +8,6 @@ export declare enum Traders {
|
|||||||
RAGMAN = "5ac3b934156ae10c4430e83c",
|
RAGMAN = "5ac3b934156ae10c4430e83c",
|
||||||
JAEGER = "5c0647fdd443bc2504c2d371",
|
JAEGER = "5c0647fdd443bc2504c2d371",
|
||||||
LIGHTHOUSEKEEPER = "638f541a29ffd1183d187f57",
|
LIGHTHOUSEKEEPER = "638f541a29ffd1183d187f57",
|
||||||
BTR = "656f0f98d80a697f855d34b1"
|
BTR = "656f0f98d80a697f855d34b1",
|
||||||
|
REF = "6617beeaa9cfa777ca915b7c"
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ export interface IBotConfig extends IBaseConfig {
|
|||||||
kind: "spt-bot";
|
kind: "spt-bot";
|
||||||
/** How many variants of each bot should be generated on raid start */
|
/** How many variants of each bot should be generated on raid start */
|
||||||
presetBatch: PresetBatch;
|
presetBatch: PresetBatch;
|
||||||
/** Bot roles that should not have PMC types (sptBear/sptUsec) added as enemies to */
|
/** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */
|
||||||
botsToNotAddPMCsAsEnemiesTo: string[];
|
botsToNotAddPMCsAsEnemiesTo: string[];
|
||||||
/** What bot types should be classified as bosses */
|
/** What bot types should be classified as bosses */
|
||||||
bosses: string[];
|
bosses: string[];
|
||||||
@ -80,8 +80,8 @@ export interface PresetBatch {
|
|||||||
crazyAssaultEvent: number;
|
crazyAssaultEvent: number;
|
||||||
bossBoar: number;
|
bossBoar: number;
|
||||||
bossBoarSniper: number;
|
bossBoarSniper: number;
|
||||||
sptUsec: number;
|
pmcUSEC: number;
|
||||||
sptBear: number;
|
pmcBEAR: number;
|
||||||
}
|
}
|
||||||
export interface IWalletLootSettings {
|
export interface IWalletLootSettings {
|
||||||
/** Chance wallets have loot in them */
|
/** Chance wallets have loot in them */
|
||||||
|
@ -67,6 +67,7 @@ export interface IChatbotFeatures {
|
|||||||
sptFriendEnabled: boolean;
|
sptFriendEnabled: boolean;
|
||||||
commandoEnabled: boolean;
|
commandoEnabled: boolean;
|
||||||
commandoFeatures: ICommandoFeatures;
|
commandoFeatures: ICommandoFeatures;
|
||||||
|
commandUseLimits: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface ICommandoFeatures {
|
export interface ICommandoFeatures {
|
||||||
giveCommandEnabled: boolean;
|
giveCommandEnabled: boolean;
|
||||||
|
@ -28,4 +28,5 @@ export interface Gift {
|
|||||||
collectionTimeHours: number;
|
collectionTimeHours: number;
|
||||||
/** Optional, can be used to change profile settings like level/skills */
|
/** Optional, can be used to change profile settings like level/skills */
|
||||||
profileChangeEvents?: IProfileChangeEvent[];
|
profileChangeEvents?: IProfileChangeEvent[];
|
||||||
|
maxToSendPlayer?: number;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@ export interface IItemConfig extends IBaseConfig {
|
|||||||
kind: "spt-item";
|
kind: "spt-item";
|
||||||
/** Items that should be globally blacklisted */
|
/** Items that should be globally blacklisted */
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
|
/** Items that should not be lootable from any location */
|
||||||
|
lootableItemBlacklist: string[];
|
||||||
/** items that should not be given as rewards */
|
/** items that should not be given as rewards */
|
||||||
rewardItemBlacklist: string[];
|
rewardItemBlacklist: string[];
|
||||||
/** Items that can only be found on bosses */
|
/** Items that can only be found on bosses */
|
||||||
|
@ -54,6 +54,7 @@ export interface IRewardScaling {
|
|||||||
levels: number[];
|
levels: number[];
|
||||||
experience: number[];
|
experience: number[];
|
||||||
roubles: number[];
|
roubles: number[];
|
||||||
|
gpCoins: number[];
|
||||||
items: number[];
|
items: number[];
|
||||||
reputation: number[];
|
reputation: number[];
|
||||||
rewardSpread: number;
|
rewardSpread: number;
|
||||||
|
@ -16,6 +16,7 @@ export interface MoneyRewards {
|
|||||||
rubCount: MoneyLevels;
|
rubCount: MoneyLevels;
|
||||||
usdCount: MoneyLevels;
|
usdCount: MoneyLevels;
|
||||||
eurCount: MoneyLevels;
|
eurCount: MoneyLevels;
|
||||||
|
gpCount: MoneyLevels;
|
||||||
}
|
}
|
||||||
export interface MoneyLevels {
|
export interface MoneyLevels {
|
||||||
common: MinMax;
|
common: MinMax;
|
||||||
|
9
TypeScript/11BundleLoadingSample/types/models/spt/repeatable/IQuestRewardValues.d.ts
vendored
Normal file
9
TypeScript/11BundleLoadingSample/types/models/spt/repeatable/IQuestRewardValues.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
export interface IQuestRewardValues {
|
||||||
|
skillPointReward: number;
|
||||||
|
skillRewardChance: number;
|
||||||
|
rewardReputation: number;
|
||||||
|
rewardNumItems: number;
|
||||||
|
rewardRoubles: number;
|
||||||
|
gpCoinRewardCount: number;
|
||||||
|
rewardXP: number;
|
||||||
|
}
|
@ -9,12 +9,15 @@ export declare class EventOutputHolder {
|
|||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected cloner: ICloner;
|
protected cloner: ICloner;
|
||||||
/** What has client been informed of this game session */
|
/**
|
||||||
protected clientActiveSessionStorage: Record<string, {
|
* What has client been informed of this game session
|
||||||
|
* Key = sessionId, then second key is prod id
|
||||||
|
*/
|
||||||
|
protected clientActiveSessionStorage: Record<string, Record<string, {
|
||||||
clientInformed: boolean;
|
clientInformed: boolean;
|
||||||
}>;
|
}>>;
|
||||||
|
protected outputStore: Record<string, IItemEventRouterResponse>;
|
||||||
constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner);
|
constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner);
|
||||||
protected output: IItemEventRouterResponse;
|
|
||||||
getOutput(sessionID: string): IItemEventRouterResponse;
|
getOutput(sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Reset the response object to a default state
|
* Reset the response object to a default state
|
||||||
@ -44,7 +47,7 @@ export declare class EventOutputHolder {
|
|||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @returns dictionary of hideout productions
|
* @returns dictionary of hideout productions
|
||||||
*/
|
*/
|
||||||
protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive> | undefined;
|
protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>, sessionId: string): Record<string, Productive> | undefined;
|
||||||
/**
|
/**
|
||||||
* Required as continuous productions don't reset and stay at 100% completion but client thinks it hasn't started
|
* Required as continuous productions don't reset and stay at 100% completion but client thinks it hasn't started
|
||||||
* @param productions Productions in a profile
|
* @param productions Productions in a profile
|
||||||
|
@ -24,6 +24,17 @@ export declare class GiftService {
|
|||||||
* @returns True if it exists in db
|
* @returns True if it exists in db
|
||||||
*/
|
*/
|
||||||
giftExists(giftId: string): boolean;
|
giftExists(giftId: string): boolean;
|
||||||
|
getGiftById(giftId: string): Gift;
|
||||||
|
/**
|
||||||
|
* Get dictionary of all gifts
|
||||||
|
* @returns Dict keyed by gift id
|
||||||
|
*/
|
||||||
|
getGifts(): Record<string, Gift>;
|
||||||
|
/**
|
||||||
|
* Get an array of all gift ids
|
||||||
|
* @returns string array of gift ids
|
||||||
|
*/
|
||||||
|
getGiftIds(): string[];
|
||||||
/**
|
/**
|
||||||
* Send player a gift from a range of sources
|
* Send player a gift from a range of sources
|
||||||
* @param playerId Player to send gift to / sessionId
|
* @param playerId Player to send gift to / sessionId
|
||||||
|
@ -2,19 +2,29 @@ import { IItemConfig } from "@spt/models/spt/config/IItemConfig";
|
|||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
||||||
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
/** Centralise the handling of blacklisting items, uses blacklist found in config/item.json, stores items that should not be used by players / broken items */
|
/** Centralise the handling of blacklisting items, uses blacklist found in config/item.json, stores items that should not be used by players / broken items */
|
||||||
export declare class ItemFilterService {
|
export declare class ItemFilterService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected cloner: ICloner;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected itemConfig: IItemConfig;
|
protected itemConfig: IItemConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, configServer: ConfigServer);
|
protected itemBlacklistCache: Set<string>;
|
||||||
|
protected lootableItemBlacklistCache: Set<string>;
|
||||||
|
constructor(logger: ILogger, cloner: ICloner, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Check if the provided template id is blacklisted in config/item.json
|
* Check if the provided template id is blacklisted in config/item.json/blacklist
|
||||||
* @param tpl template id
|
* @param tpl template id
|
||||||
* @returns true if blacklisted
|
* @returns true if blacklisted
|
||||||
*/
|
*/
|
||||||
isItemBlacklisted(tpl: string): boolean;
|
isItemBlacklisted(tpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Check if the provided template id is blacklisted in config/item.json/lootableItemBlacklist
|
||||||
|
* @param tpl template id
|
||||||
|
* @returns true if blacklisted
|
||||||
|
*/
|
||||||
|
isLootableItemBlacklisted(tpl: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Check if item is blacklisted from being a reward for player
|
* Check if item is blacklisted from being a reward for player
|
||||||
* @param tpl item tpl to check is on blacklist
|
* @param tpl item tpl to check is on blacklist
|
||||||
@ -31,6 +41,11 @@ export declare class ItemFilterService {
|
|||||||
* @returns string array of blacklisted tempalte ids
|
* @returns string array of blacklisted tempalte ids
|
||||||
*/
|
*/
|
||||||
getBlacklistedItems(): string[];
|
getBlacklistedItems(): string[];
|
||||||
|
/**
|
||||||
|
* Return every template id blacklisted in config/item.json/lootableItemBlacklist
|
||||||
|
* @returns string array of blacklisted tempalte ids
|
||||||
|
*/
|
||||||
|
getBlacklistedLootableItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Check if the provided template id is boss item in config/item.json
|
* Check if the provided template id is boss item in config/item.json
|
||||||
* @param tpl template id
|
* @param tpl template id
|
||||||
|
@ -3,9 +3,11 @@ import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
|||||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { Aggressor, Victim } from "@spt/models/eft/common/tables/IBotBase";
|
import { Aggressor, Victim } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
|
import { IGiftsConfig } from "@spt/models/spt/config/IGiftsConfig";
|
||||||
import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse";
|
import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
|
import { GiftService } from "@spt/services/GiftService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService";
|
import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
@ -17,10 +19,12 @@ export declare class PmcChatResponseService {
|
|||||||
protected notificationSendHelper: NotificationSendHelper;
|
protected notificationSendHelper: NotificationSendHelper;
|
||||||
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected giftService: GiftService;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected pmcResponsesConfig: IPmcChatResponse;
|
protected pmcResponsesConfig: IPmcChatResponse;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
protected giftConfig: IGiftsConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative
|
* For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
|
@ -146,9 +146,9 @@ export declare class SeasonalEventService {
|
|||||||
/**
|
/**
|
||||||
* Send gift to player if they'e not already received it
|
* Send gift to player if they'e not already received it
|
||||||
* @param playerId Player to send gift to
|
* @param playerId Player to send gift to
|
||||||
* @param giftkey Key of gift to give
|
* @param giftKey Key of gift to give
|
||||||
*/
|
*/
|
||||||
protected giveGift(playerId: string, giftkey: string): void;
|
protected giveGift(playerId: string, giftKey: string): void;
|
||||||
/**
|
/**
|
||||||
* Get the underlying bot type for an event bot e.g. `peacefullZryachiyEvent` will return `bossZryachiy`
|
* Get the underlying bot type for an event bot e.g. `peacefullZryachiyEvent` will return `bossZryachiy`
|
||||||
* @param eventBotRole Event bot role type
|
* @param eventBotRole Event bot role type
|
||||||
|
@ -52,7 +52,8 @@ export declare class JsonUtil {
|
|||||||
deserializeJson5<T>(jsonString: string, filename?: string): T | undefined;
|
deserializeJson5<T>(jsonString: string, filename?: string): T | undefined;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T | undefined>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T | undefined>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* Take json from file and convert into object
|
||||||
|
* Perform valadation on json during process if json file has not been processed before
|
||||||
* @param jsonString String to turn into object
|
* @param jsonString String to turn into object
|
||||||
* @param filePath Path to json file being processed
|
* @param filePath Path to json file being processed
|
||||||
* @returns Object
|
* @returns Object
|
||||||
|
@ -34,7 +34,7 @@ export declare class BotCallbacks {
|
|||||||
* Handle singleplayer/settings/bot/maxCap
|
* Handle singleplayer/settings/bot/maxCap
|
||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getBotCap(): string;
|
getBotCap(url: string, info: any, sessionID: string): string;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/settings/bot/getBotBehaviours
|
* Handle singleplayer/settings/bot/getBotBehaviours
|
||||||
* @returns string
|
* @returns string
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { HideoutController } from "@spt/controllers/HideoutController";
|
import { HideoutController } from "@spt/controllers/HideoutController";
|
||||||
import { RagfairController } from "@spt/controllers/RagfairController";
|
import { RagfairController } from "@spt/controllers/RagfairController";
|
||||||
|
import { TraderHelper } from "@spt/helpers/TraderHelper";
|
||||||
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
||||||
import { IGlobals } from "@spt/models/eft/common/IGlobals";
|
import { IGlobals } from "@spt/models/eft/common/IGlobals";
|
||||||
import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem";
|
import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem";
|
||||||
@ -13,15 +14,18 @@ import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyRespo
|
|||||||
import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase";
|
import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
||||||
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
/**
|
/**
|
||||||
* Handle client requests
|
* Handle client requests
|
||||||
*/
|
*/
|
||||||
export declare class DataCallbacks {
|
export declare class DataCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
protected databaseService: DatabaseService;
|
protected databaseService: DatabaseService;
|
||||||
protected ragfairController: RagfairController;
|
protected ragfairController: RagfairController;
|
||||||
protected hideoutController: HideoutController;
|
protected hideoutController: HideoutController;
|
||||||
constructor(httpResponse: HttpResponseUtil, databaseService: DatabaseService, ragfairController: RagfairController, hideoutController: HideoutController);
|
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, traderHelper: TraderHelper, databaseService: DatabaseService, ragfairController: RagfairController, hideoutController: HideoutController);
|
||||||
/**
|
/**
|
||||||
* Handle client/settings
|
* Handle client/settings
|
||||||
* @returns ISettingsBase
|
* @returns ISettingsBase
|
||||||
|
@ -102,7 +102,7 @@ export declare class BotController {
|
|||||||
*/
|
*/
|
||||||
protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise<void>;
|
protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Generate a single bot and store it in the cache
|
* Generate a single bot and store in the cache
|
||||||
* @param botGenerationDetails the bot details to generate the bot with
|
* @param botGenerationDetails the bot details to generate the bot with
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param cacheKey the cache key to store the bot with
|
* @param cacheKey the cache key to store the bot with
|
||||||
@ -125,8 +125,9 @@ export declare class BotController {
|
|||||||
/**
|
/**
|
||||||
* Get the max number of bots allowed on a map
|
* Get the max number of bots allowed on a map
|
||||||
* Looks up location player is entering when getting cap value
|
* Looks up location player is entering when getting cap value
|
||||||
|
* @param location The map location cap was requested for
|
||||||
* @returns cap number
|
* @returns cap number
|
||||||
*/
|
*/
|
||||||
getBotCap(): number;
|
getBotCap(location: string): number;
|
||||||
getAiBotBrainTypes(): any;
|
getAiBotBrainTypes(): any;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ export declare class LauncherController {
|
|||||||
* @returns Dictionary of profile types with related descriptive text
|
* @returns Dictionary of profile types with related descriptive text
|
||||||
*/
|
*/
|
||||||
protected getProfileDescriptions(): Record<string, string>;
|
protected getProfileDescriptions(): Record<string, string>;
|
||||||
find(sessionIdKey: string): Info;
|
find(sessionId: string): Info;
|
||||||
login(info: ILoginRequestData): string;
|
login(info: ILoginRequestData): string;
|
||||||
register(info: IRegisterData): string;
|
register(info: IRegisterData): string;
|
||||||
protected createAccount(info: IRegisterData): string;
|
protected createAccount(info: IRegisterData): string;
|
||||||
|
@ -10,6 +10,7 @@ import { IMiniProfile } from "@spt/models/eft/launcher/IMiniProfile";
|
|||||||
import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData";
|
import { GetProfileStatusResponseData } from "@spt/models/eft/profile/GetProfileStatusResponseData";
|
||||||
import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest";
|
import { IGetOtherProfileRequest } from "@spt/models/eft/profile/IGetOtherProfileRequest";
|
||||||
import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse";
|
import { IGetOtherProfileResponse } from "@spt/models/eft/profile/IGetOtherProfileResponse";
|
||||||
|
import { IGetProfileSettingsRequest } from "@spt/models/eft/profile/IGetProfileSettingsRequest";
|
||||||
import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData";
|
import { IProfileChangeNicknameRequestData } from "@spt/models/eft/profile/IProfileChangeNicknameRequestData";
|
||||||
import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData";
|
import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfileChangeVoiceRequestData";
|
||||||
import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData";
|
import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData";
|
||||||
@ -25,11 +26,13 @@ import { LocalisationService } from "@spt/services/LocalisationService";
|
|||||||
import { MailSendService } from "@spt/services/MailSendService";
|
import { MailSendService } from "@spt/services/MailSendService";
|
||||||
import { ProfileFixerService } from "@spt/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt/services/ProfileFixerService";
|
||||||
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
||||||
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
export declare class ProfileController {
|
export declare class ProfileController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
|
protected cloner: ICloner;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected databaseService: DatabaseService;
|
protected databaseService: DatabaseService;
|
||||||
@ -45,7 +48,7 @@ export declare class ProfileController {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected defaultInventoryTpl: string;
|
protected defaultInventoryTpl: string;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, cloner: ICloner, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
||||||
/**
|
/**
|
||||||
* Handle /launcher/profiles
|
* Handle /launcher/profiles
|
||||||
*/
|
*/
|
||||||
@ -53,7 +56,7 @@ export declare class ProfileController {
|
|||||||
/**
|
/**
|
||||||
* Handle launcher/profile/info
|
* Handle launcher/profile/info
|
||||||
*/
|
*/
|
||||||
getMiniProfile(sessionID: string): any;
|
getMiniProfile(sessionID: string): IMiniProfile;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/list
|
* Handle client/game/profile/list
|
||||||
*/
|
*/
|
||||||
@ -117,4 +120,8 @@ export declare class ProfileController {
|
|||||||
*/
|
*/
|
||||||
getProfileStatus(sessionId: string): GetProfileStatusResponseData;
|
getProfileStatus(sessionId: string): GetProfileStatusResponseData;
|
||||||
getOtherProfile(sessionId: string, request: IGetOtherProfileRequest): IGetOtherProfileResponse;
|
getOtherProfile(sessionId: string, request: IGetOtherProfileRequest): IGetOtherProfileResponse;
|
||||||
|
/**
|
||||||
|
* Handle client/profile/settings
|
||||||
|
*/
|
||||||
|
setChosenProfileIcon(sessionId: string, request: IGetProfileSettingsRequest): void;
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,7 @@ export declare class QuestController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
protected createAcceptedQuestClientResponse(sessionID: string, pmcData: IPmcData, repeatableQuestProfile: IRepeatableQuest): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Look for an accepted quest inside player profile, return matching
|
* Look for an accepted quest inside player profile, return matching
|
||||||
* @param pmcData Profile to search through
|
* @param pmcData Profile to search through
|
||||||
|
@ -2,7 +2,6 @@ import { RepeatableQuestGenerator } from "@spt/generators/RepeatableQuestGenerat
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "@spt/helpers/QuestHelper";
|
import { QuestHelper } from "@spt/helpers/QuestHelper";
|
||||||
import { RepeatableQuestHelper } from "@spt/helpers/RepeatableQuestHelper";
|
import { RepeatableQuestHelper } from "@spt/helpers/RepeatableQuestHelper";
|
||||||
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
|
||||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
|
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -62,12 +61,31 @@ export declare class RepeatableQuestController {
|
|||||||
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
||||||
* The new quests generated are again persisted in profile.RepeatableQuests
|
* The new quests generated are again persisted in profile.RepeatableQuests
|
||||||
*
|
*
|
||||||
* @param {string} _info Request from client
|
|
||||||
* @param {string} sessionID Player's session id
|
* @param {string} sessionID Player's session id
|
||||||
*
|
*
|
||||||
* @returns {array} Array of "repeatableQuestObjects" as described above
|
* @returns {array} Array of "repeatableQuestObjects" as described above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* Check if a repeatable quest type (daily/weekly) is active for the given profile
|
||||||
|
* @param repeatableConfig Repeatable quest config
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns True if profile is allowed to access dailies
|
||||||
|
*/
|
||||||
|
protected canProfileAccessRepeatableQuests(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Does player have daily scav quests unlocked
|
||||||
|
* @param pmcData Player profile to check
|
||||||
|
* @returns True if unlocked
|
||||||
|
*/
|
||||||
|
protected playerHasDailyScavQuestsUnlocked(pmcData: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Does player have daily pmc quests unlocked
|
||||||
|
* @param pmcData Player profile to check
|
||||||
|
* @param repeatableConfig Config of daily type to check
|
||||||
|
* @returns True if unlocked
|
||||||
|
*/
|
||||||
|
protected playerHasDailyPmcQuestsUnlocked(pmcData: IPmcData, repeatableConfig: IRepeatableQuestConfig): boolean;
|
||||||
/**
|
/**
|
||||||
* Get the number of quests to generate - takes into account charisma state of player
|
* Get the number of quests to generate - takes into account charisma state of player
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
@ -99,10 +117,10 @@ export declare class RepeatableQuestController {
|
|||||||
/**
|
/**
|
||||||
* Return the locations this PMC is allowed to get daily quests for based on their level
|
* Return the locations this PMC is allowed to get daily quests for based on their level
|
||||||
* @param locations The original list of locations
|
* @param locations The original list of locations
|
||||||
* @param pmcLevel The level of the player PMC
|
* @param pmcLevel The players level
|
||||||
* @returns A filtered list of locations that allow the player PMC level to access it
|
* @returns A filtered list of locations that allow the player PMC level to access it
|
||||||
*/
|
*/
|
||||||
protected getAllowedLocations(locations: Record<ELocationName, string[]>, pmcLevel: number): Partial<Record<ELocationName, string[]>>;
|
protected getAllowedLocationsForPmcLevel(locations: Record<ELocationName, string[]>, pmcLevel: number): Partial<Record<ELocationName, string[]>>;
|
||||||
/**
|
/**
|
||||||
* Return true if the given pmcLevel is allowed on the given location
|
* Return true if the given pmcLevel is allowed on the given location
|
||||||
* @param location The location name to check
|
* @param location The location name to check
|
||||||
@ -113,6 +131,12 @@ export declare class RepeatableQuestController {
|
|||||||
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Handle RepeatableQuestChange event
|
* Handle RepeatableQuestChange event
|
||||||
|
*
|
||||||
|
* Replace a players repeatable quest
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param changeRequest Request object
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
changeRepeatableQuest(pmcData: IPmcData, changeRequest: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
protected attemptToGenerateRepeatableQuest(pmcData: IPmcData, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
||||||
|
@ -5,7 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { Appearance, Health, IBotType } from "@spt/models/eft/common/tables/IBotType";
|
import { Appearance, Health, IBotType, Inventory } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
|
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
|
||||||
@ -13,6 +13,7 @@ import { ILogger } from "@spt/models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService";
|
import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
|
import { ItemFilterService } from "@spt/services/ItemFilterService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
||||||
import { ICloner } from "@spt/utils/cloners/ICloner";
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
@ -34,11 +35,12 @@ export declare class BotGenerator {
|
|||||||
protected botDifficultyHelper: BotDifficultyHelper;
|
protected botDifficultyHelper: BotDifficultyHelper;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected cloner: ICloner;
|
protected cloner: ICloner;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner);
|
||||||
/**
|
/**
|
||||||
* Generate a player scav bot object
|
* Generate a player scav bot object
|
||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
@ -54,6 +56,14 @@ export declare class BotGenerator {
|
|||||||
* @returns constructed bot
|
* @returns constructed bot
|
||||||
*/
|
*/
|
||||||
prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase;
|
prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Get a clone of the default bot base object and adjust its role/side/difficulty values
|
||||||
|
* @param botRole Role bot should have
|
||||||
|
* @param botSide Side bot should have
|
||||||
|
* @param difficulty Difficult bot should have
|
||||||
|
* @returns Cloned bot base
|
||||||
|
*/
|
||||||
|
protected getPreparedBotBase(botRole: string, botSide: string, difficulty: string): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Get a clone of the database\bots\base.json file
|
* Get a clone of the database\bots\base.json file
|
||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
@ -62,12 +72,17 @@ export declare class BotGenerator {
|
|||||||
/**
|
/**
|
||||||
* Create a IBotBase object with equipment/loot/exp etc
|
* Create a IBotBase object with equipment/loot/exp etc
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param bot bots base file
|
* @param bot Bots base file
|
||||||
* @param botJsonTemplate Bot template from db/bots/x.json
|
* @param botJsonTemplate Bot template from db/bots/x.json
|
||||||
* @param botGenerationDetails details on how to generate the bot
|
* @param botGenerationDetails details on how to generate the bot
|
||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Remove items from item.json/lootableItemBlacklist from bots inventory
|
||||||
|
* @param botInventory Bot to filter
|
||||||
|
*/
|
||||||
|
protected removeBlacklistedLootFromBotTemplate(botInventory: Inventory): void;
|
||||||
/**
|
/**
|
||||||
* Choose various appearance settings for a bot using weights
|
* Choose various appearance settings for a bot using weights
|
||||||
* @param bot Bot to adjust
|
* @param bot Bot to adjust
|
||||||
@ -80,10 +95,12 @@ export declare class BotGenerator {
|
|||||||
* @param botJsonTemplate x.json from database
|
* @param botJsonTemplate x.json from database
|
||||||
* @param botGenerationDetails
|
* @param botGenerationDetails
|
||||||
* @param botRole role of bot e.g. assault
|
* @param botRole role of bot e.g. assault
|
||||||
* @param sessionId profile session id
|
* @param sessionId OPTIONAL: profile session id
|
||||||
* @returns Nickname for bot
|
* @returns Nickname for bot
|
||||||
*/
|
*/
|
||||||
protected generateBotNickname(botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails, botRole: string, sessionId?: string): string;
|
protected generateBotNickname(botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails, botRole: string, sessionId?: string): string;
|
||||||
|
protected shouldSimulatePlayerScavName(botRole: string, isPlayerScav: boolean): boolean;
|
||||||
|
protected addPlayerScavNameSimulationSuffix(nickname: string): string;
|
||||||
/**
|
/**
|
||||||
* Log the number of PMCs generated to the debug console
|
* Log the number of PMCs generated to the debug console
|
||||||
* @param output Generated bot array, ready to send to client
|
* @param output Generated bot array, ready to send to client
|
||||||
@ -110,12 +127,17 @@ export declare class BotGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getSkillsWithRandomisedProgressValue(skills: Record<string, IBaseSkill>, isCommonSkills: boolean): IBaseSkill[];
|
protected getSkillsWithRandomisedProgressValue(skills: Record<string, IBaseSkill>, isCommonSkills: boolean): IBaseSkill[];
|
||||||
/**
|
/**
|
||||||
* Generate a random Id for a bot and apply to bots _id and aid value
|
* Generate an id+aid for a bot and apply
|
||||||
* @param bot bot to update
|
* @param bot bot to update
|
||||||
* @returns updated IBotBase object
|
* @returns updated IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateId(bot: IBotBase): void;
|
protected addIdsToBot(bot: IBotBase): void;
|
||||||
protected generateInventoryID(profile: IBotBase): void;
|
/**
|
||||||
|
* Update a profiles profile.Inventory.equipment value with a freshly generated one
|
||||||
|
* Update all inventory items that make use of this value too
|
||||||
|
* @param profile Profile to update
|
||||||
|
*/
|
||||||
|
protected generateInventoryId(profile: IBotBase): void;
|
||||||
/**
|
/**
|
||||||
* Randomise a bots game version and account category
|
* Randomise a bots game version and account category
|
||||||
* Chooses from all the game versions (standard, eod etc)
|
* Chooses from all the game versions (standard, eod etc)
|
||||||
|
@ -60,7 +60,7 @@ export declare class BotLootGenerator {
|
|||||||
/**
|
/**
|
||||||
* Force healing items onto bot to ensure they can heal in-raid
|
* Force healing items onto bot to ensure they can heal in-raid
|
||||||
* @param botInventory Inventory to add items to
|
* @param botInventory Inventory to add items to
|
||||||
* @param botRole Role of bot (sptBear/sptUsec)
|
* @param botRole Role of bot (pmcBEAR/pmcUSEC)
|
||||||
*/
|
*/
|
||||||
protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void;
|
protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void;
|
||||||
/**
|
/**
|
||||||
|
@ -9,6 +9,7 @@ import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
|
|||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
|
import { ItemFilterService } from "@spt/services/ItemFilterService";
|
||||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||||
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
|
||||||
import { ICloner } from "@spt/utils/cloners/ICloner";
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
@ -37,14 +38,15 @@ export declare class LocationGenerator {
|
|||||||
protected containerHelper: ContainerHelper;
|
protected containerHelper: ContainerHelper;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected cloner: ICloner;
|
protected cloner: ICloner;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseService: DatabaseService, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
|
constructor(logger: ILogger, databaseService: DatabaseService, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner);
|
||||||
/**
|
/**
|
||||||
* Create an array of container objects with randomised loot
|
* Create an array of container objects with randomised loot
|
||||||
* @param locationBase Map base to generate containers for
|
* @param locationBase Map base to generate containers for
|
||||||
* @param staticAmmoDist Static ammo distribution - database.loot.staticAmmo
|
* @param staticAmmoDist Static ammo distribution
|
||||||
* @returns Array of container objects
|
* @returns Array of container objects
|
||||||
*/
|
*/
|
||||||
generateStaticContainers(locationBase: ILocationBase, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): SpawnpointTemplate[];
|
generateStaticContainers(locationBase: ILocationBase, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): SpawnpointTemplate[];
|
||||||
|
@ -4,7 +4,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper";
|
|||||||
import { Item } from "@spt/models/eft/common/tables/IItem";
|
import { Item } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { IQuestReward, IQuestRewards } from "@spt/models/eft/common/tables/IQuest";
|
import { IQuestReward, IQuestRewards } from "@spt/models/eft/common/tables/IQuest";
|
||||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig";
|
import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig, IRewardScaling } from "@spt/models/spt/config/IQuestConfig";
|
||||||
|
import { IQuestRewardValues } from "@spt/models/spt/repeatable/IQuestRewardValues";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
@ -52,6 +53,29 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
*/
|
*/
|
||||||
generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards;
|
generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards;
|
||||||
|
protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues;
|
||||||
|
/**
|
||||||
|
* Get an array of items + stack size to give to player as reward that fit inside of a rouble budget
|
||||||
|
* @param itemPool All possible items to choose rewards from
|
||||||
|
* @param maxItemCount Total number of items to reward
|
||||||
|
* @param itemRewardBudget Rouble buget all item rewards must fit in
|
||||||
|
* @param repeatableConfig config for quest type
|
||||||
|
* @returns Items and stack size
|
||||||
|
*/
|
||||||
|
protected getRewardableItemsFromPoolWithinBudget(itemPool: ITemplateItem[], maxItemCount: number, itemRewardBudget: number, repeatableConfig: IRepeatableQuestConfig): {
|
||||||
|
item: ITemplateItem;
|
||||||
|
stackSize: number;
|
||||||
|
}[];
|
||||||
|
/**
|
||||||
|
* Choose a random Weapon preset that fits inside of a rouble amount limit
|
||||||
|
* @param roublesBudget
|
||||||
|
* @param rewardIndex
|
||||||
|
* @returns IQuestReward
|
||||||
|
*/
|
||||||
|
protected getRandomWeaponPresetWithinBudget(roublesBudget: number, rewardIndex: number): {
|
||||||
|
weapon: IQuestReward;
|
||||||
|
price: number;
|
||||||
|
} | undefined;
|
||||||
/**
|
/**
|
||||||
* @param rewardItems List of reward items to filter
|
* @param rewardItems List of reward items to filter
|
||||||
* @param roublesBudget The budget remaining for rewards
|
* @param roublesBudget The budget remaining for rewards
|
||||||
@ -62,21 +86,31 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
/**
|
/**
|
||||||
* Get a randomised number a reward items stack size should be based on its handbook price
|
* Get a randomised number a reward items stack size should be based on its handbook price
|
||||||
* @param item Reward item to get stack size for
|
* @param item Reward item to get stack size for
|
||||||
* @returns Stack size value
|
* @returns matching stack size for the passed in items price
|
||||||
*/
|
*/
|
||||||
protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number;
|
protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number;
|
||||||
/**
|
/**
|
||||||
* Should reward item have stack size increased (25% chance)
|
* Should reward item have stack size increased (25% chance)
|
||||||
* @param item Item to possibly increase stack size of
|
* @param item Item to increase reward stack size of
|
||||||
* @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking
|
* @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking
|
||||||
* @returns True if it should
|
* @param randomChanceToPass Additional randomised chance of passing
|
||||||
|
* @returns True if items stack size can be increased
|
||||||
|
*/
|
||||||
|
protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number, randomChanceToPass?: number): boolean;
|
||||||
|
/**
|
||||||
|
* Get a count of cartridges that fits the rouble budget amount provided
|
||||||
|
* e.g. how many M80s for 50,000 roubles
|
||||||
|
* @param itemSelected Cartridge
|
||||||
|
* @param roublesBudget Rouble budget
|
||||||
|
* @param rewardNumItems
|
||||||
|
* @returns Count that fits budget (min 1)
|
||||||
*/
|
*/
|
||||||
protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean;
|
|
||||||
protected calculateAmmoStackSizeThatFitsBudget(itemSelected: ITemplateItem, roublesBudget: number, rewardNumItems: number): number;
|
protected calculateAmmoStackSizeThatFitsBudget(itemSelected: ITemplateItem, roublesBudget: number, rewardNumItems: number): number;
|
||||||
/**
|
/**
|
||||||
* Select a number of items that have a colelctive value of the passed in parameter
|
* Select a number of items that have a colelctive value of the passed in parameter
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
* @param roublesBudget Total value of items to return
|
* @param roublesBudget Total value of items to return
|
||||||
|
* @param traderId Id of the trader who will give player reward
|
||||||
* @returns Array of reward items that fit budget
|
* @returns Array of reward items that fit budget
|
||||||
*/
|
*/
|
||||||
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[];
|
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[];
|
||||||
@ -86,12 +120,18 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
* @param {string} tpl ItemId of the rewarded item
|
* @param {string} tpl ItemId of the rewarded item
|
||||||
* @param {integer} value Amount of items to give
|
* @param {integer} value Amount of items to give
|
||||||
* @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index
|
* @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index
|
||||||
|
* @param preset Optional array of preset items
|
||||||
* @returns {object} Object of "Reward"-item-type
|
* @returns {object} Object of "Reward"-item-type
|
||||||
*/
|
*/
|
||||||
protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward;
|
protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward;
|
||||||
/**
|
/**
|
||||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
* Picks rewardable items from items.json
|
||||||
|
* This means they must:
|
||||||
|
* - Fit into the inventory
|
||||||
|
* - Shouldn't be keys
|
||||||
|
* - Have a price greater than 0
|
||||||
* @param repeatableQuestConfig Config file
|
* @param repeatableQuestConfig Config file
|
||||||
|
* @param traderId Id of trader who will give reward to player
|
||||||
* @returns List of rewardable items [[_tpl, itemTemplate],...]
|
* @returns List of rewardable items [[_tpl, itemTemplate],...]
|
||||||
*/
|
*/
|
||||||
getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][];
|
getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [string, ITemplateItem][];
|
||||||
@ -102,5 +142,5 @@ export declare class RepeatableQuestRewardGenerator {
|
|||||||
* @returns True if item is valid reward
|
* @returns True if item is valid reward
|
||||||
*/
|
*/
|
||||||
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean;
|
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean;
|
||||||
protected addMoneyReward(traderId: string, rewards: IQuestRewards, rewardRoubles: number, rewardIndex: number): void;
|
protected getMoneyReward(traderId: string, rewardRoubles: number, rewardIndex: number): IQuestReward;
|
||||||
}
|
}
|
||||||
|
@ -21,8 +21,8 @@ export declare class BotDifficultyHelper {
|
|||||||
* Get a difficulty object modified to handle fighting other PMCs
|
* Get a difficulty object modified to handle fighting other PMCs
|
||||||
* @param pmcType 'bear or 'usec'
|
* @param pmcType 'bear or 'usec'
|
||||||
* @param difficulty easy / normal / hard / impossible
|
* @param difficulty easy / normal / hard / impossible
|
||||||
* @param usecType sptUsec
|
* @param usecType pmcUSEC
|
||||||
* @param bearType sptBear
|
* @param bearType pmcBEAR
|
||||||
* @returns Difficulty object
|
* @returns Difficulty object
|
||||||
*/
|
*/
|
||||||
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
|
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
|
||||||
|
@ -56,12 +56,12 @@ export declare class BotHelper {
|
|||||||
*/
|
*/
|
||||||
getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined;
|
getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined;
|
||||||
/**
|
/**
|
||||||
* Choose between sptBear and sptUsec at random based on the % defined in pmcConfig.isUsec
|
* Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec
|
||||||
* @returns pmc role
|
* @returns pmc role
|
||||||
*/
|
*/
|
||||||
getRandomizedPmcRole(): string;
|
getRandomizedPmcRole(): string;
|
||||||
/**
|
/**
|
||||||
* Get the corresponding side when sptBear or sptUsec is passed in
|
* Get the corresponding side when pmcBEAR or pmcUSEC is passed in
|
||||||
* @param botRole role to get side for
|
* @param botRole role to get side for
|
||||||
* @returns side (usec/bear)
|
* @returns side (usec/bear)
|
||||||
*/
|
*/
|
||||||
|
@ -416,7 +416,7 @@ export declare class ItemHelper {
|
|||||||
/**
|
/**
|
||||||
* Get the name of an item from the locale file using the item tpl
|
* Get the name of an item from the locale file using the item tpl
|
||||||
* @param itemTpl Tpl of item to get name of
|
* @param itemTpl Tpl of item to get name of
|
||||||
* @returns Name of item
|
* @returns Full name, short name if not found
|
||||||
*/
|
*/
|
||||||
getItemName(itemTpl: string): string;
|
getItemName(itemTpl: string): string;
|
||||||
/**
|
/**
|
||||||
|
@ -42,10 +42,10 @@ export declare class ProfileHelper {
|
|||||||
getProfiles(): Record<string, ISptProfile>;
|
getProfiles(): Record<string, ISptProfile>;
|
||||||
/**
|
/**
|
||||||
* Get the pmc and scav profiles as an array by profile id
|
* Get the pmc and scav profiles as an array by profile id
|
||||||
* @param sessionID
|
* @param sessionId
|
||||||
* @returns Array of IPmcData objects
|
* @returns Array of IPmcData objects
|
||||||
*/
|
*/
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
getCompleteProfile(sessionId: string): IPmcData[];
|
||||||
/**
|
/**
|
||||||
* Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen
|
* Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen
|
||||||
* Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using
|
* Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using
|
||||||
@ -58,12 +58,12 @@ export declare class ProfileHelper {
|
|||||||
* @param scavProfile post-raid scav profile
|
* @param scavProfile post-raid scav profile
|
||||||
* @returns Updated profile array
|
* @returns Updated profile array
|
||||||
*/
|
*/
|
||||||
protected postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[];
|
protected postRaidXpWorkaroundFix(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, output: IPmcData[]): IPmcData[];
|
||||||
/**
|
/**
|
||||||
* Check if a nickname is used by another profile loaded by the server
|
* Check if a nickname is used by another profile loaded by the server
|
||||||
* @param nicknameRequest nickname request object
|
* @param nicknameRequest nickname request object
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns True if already used
|
* @returns True if already in use
|
||||||
*/
|
*/
|
||||||
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||||
protected profileHasInfoProperty(profile: ISptProfile): boolean;
|
protected profileHasInfoProperty(profile: ISptProfile): boolean;
|
||||||
@ -79,10 +79,10 @@ export declare class ProfileHelper {
|
|||||||
* @param pmcId Profile id to find
|
* @param pmcId Profile id to find
|
||||||
* @returns IPmcData
|
* @returns IPmcData
|
||||||
*/
|
*/
|
||||||
getProfileByPmcId(pmcId: string): IPmcData;
|
getProfileByPmcId(pmcId: string): IPmcData | undefined;
|
||||||
/**
|
/**
|
||||||
* Get the experiecne for the given level
|
* Get experience value for given level
|
||||||
* @param level level to get xp for
|
* @param level Level to get xp for
|
||||||
* @returns Number of xp points for level
|
* @returns Number of xp points for level
|
||||||
*/
|
*/
|
||||||
getExperience(level: number): number;
|
getExperience(level: number): number;
|
||||||
@ -105,9 +105,9 @@ export declare class ProfileHelper {
|
|||||||
*/
|
*/
|
||||||
getPmcProfile(sessionID: string): IPmcData | undefined;
|
getPmcProfile(sessionID: string): IPmcData | undefined;
|
||||||
/**
|
/**
|
||||||
* Is this user id the logged in player
|
* Is given user id a player
|
||||||
* @param userId Id to test
|
* @param userId Id to validate
|
||||||
* @returns True is the current player
|
* @returns True is a player
|
||||||
*/
|
*/
|
||||||
isPlayer(userId: string): boolean;
|
isPlayer(userId: string): boolean;
|
||||||
/**
|
/**
|
||||||
@ -127,7 +127,6 @@ export declare class ProfileHelper {
|
|||||||
* @returns True if profile is to be wiped of data/progress
|
* @returns True if profile is to be wiped of data/progress
|
||||||
*/
|
*/
|
||||||
protected isWiped(sessionID: string): boolean;
|
protected isWiped(sessionID: string): boolean;
|
||||||
protected getServerVersion(): string;
|
|
||||||
/**
|
/**
|
||||||
* Iterate over player profile inventory items and find the secure container and remove it
|
* Iterate over player profile inventory items and find the secure container and remove it
|
||||||
* @param profile Profile to remove secure container from
|
* @param profile Profile to remove secure container from
|
||||||
@ -139,15 +138,17 @@ export declare class ProfileHelper {
|
|||||||
* Store giftid in profile spt object
|
* Store giftid in profile spt object
|
||||||
* @param playerId Player to add gift flag to
|
* @param playerId Player to add gift flag to
|
||||||
* @param giftId Gift player received
|
* @param giftId Gift player received
|
||||||
|
* @param maxCount Limit of how many of this gift a player can have
|
||||||
*/
|
*/
|
||||||
addGiftReceivedFlagToProfile(playerId: string, giftId: string): void;
|
flagGiftReceivedInProfile(playerId: string, giftId: string, maxCount: number): void;
|
||||||
/**
|
/**
|
||||||
* Check if profile has recieved a gift by id
|
* Check if profile has recieved a gift by id
|
||||||
* @param playerId Player profile to check for gift
|
* @param playerId Player profile to check for gift
|
||||||
* @param giftId Gift to check for
|
* @param giftId Gift to check for
|
||||||
|
* @param maxGiftCount Max times gift can be given to player
|
||||||
* @returns True if player has recieved gift previously
|
* @returns True if player has recieved gift previously
|
||||||
*/
|
*/
|
||||||
playerHasRecievedGift(playerId: string, giftId: string): boolean;
|
playerHasRecievedMaxNumberOfGift(playerId: string, giftId: string, maxGiftCount: number): boolean;
|
||||||
/**
|
/**
|
||||||
* Find Stat in profile counters and increment by one
|
* Find Stat in profile counters and increment by one
|
||||||
* @param counters Counters to search for key
|
* @param counters Counters to search for key
|
||||||
@ -189,4 +190,11 @@ export declare class ProfileHelper {
|
|||||||
* @param rowsToAdd How many rows to give profile
|
* @param rowsToAdd How many rows to give profile
|
||||||
*/
|
*/
|
||||||
addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void;
|
addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void;
|
||||||
|
playerIsFleaBanned(pmcProfile: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Add an achievement to player profile
|
||||||
|
* @param pmcProfile Profile to add achievement to
|
||||||
|
* @param achievementId Id of achievement to add
|
||||||
|
*/
|
||||||
|
addAchievementToProfile(pmcProfile: IPmcData, achievementId: string): void;
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ export declare class RagfairOfferHelper {
|
|||||||
* @param pmcProfile Player profile
|
* @param pmcProfile Player profile
|
||||||
* @returns True = should be shown to player
|
* @returns True = should be shown to player
|
||||||
*/
|
*/
|
||||||
isDisplayableOffer(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
isDisplayableOffer(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData, playerIsFleaBanned?: boolean): boolean;
|
||||||
isDisplayableOfferThatNeedsItem(searchRequest: ISearchRequestData, offer: IRagfairOffer): boolean;
|
isDisplayableOfferThatNeedsItem(searchRequest: ISearchRequestData, offer: IRagfairOffer): boolean;
|
||||||
/**
|
/**
|
||||||
* Does the passed in item have a condition property
|
* Does the passed in item have a condition property
|
||||||
|
@ -59,10 +59,11 @@ export declare class TradeHelper {
|
|||||||
/**
|
/**
|
||||||
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
|
* @param pmcData Profile making the purchase
|
||||||
* @param traderId Trader assort is purchased from
|
* @param traderId Trader assort is purchased from
|
||||||
* @param assortBeingPurchased the item from trader being bought
|
* @param assortBeingPurchased the item from trader being bought
|
||||||
* @param assortId Id of assort being purchased
|
* @param assortId Id of assort being purchased
|
||||||
* @param count How many of the item are being bought
|
* @param count How many of the item are being bought
|
||||||
*/
|
*/
|
||||||
protected checkPurchaseIsWithinTraderItemLimit(sessionId: string, traderId: string, assortBeingPurchased: Item, assortId: string, count: number): void;
|
protected checkPurchaseIsWithinTraderItemLimit(sessionId: string, pmcData: IPmcData, traderId: string, assortBeingPurchased: Item, assortId: string, count: number): void;
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,6 @@ export declare class TraderHelper {
|
|||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
/** Dictionary of item tpl and the highest trader sell rouble price */
|
/** Dictionary of item tpl and the highest trader sell rouble price */
|
||||||
protected highestTraderPriceItems?: Record<string, number>;
|
protected highestTraderPriceItems?: Record<string, number>;
|
||||||
/** Dictionary of item tpl and the highest trader buy back rouble price */
|
|
||||||
protected highestTraderBuyPriceItems?: Record<string, number>;
|
|
||||||
constructor(logger: ILogger, databaseService: DatabaseService, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, itemHelper: ItemHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, randomUtil: RandomUtil, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseService: DatabaseService, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, itemHelper: ItemHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get a trader base object, update profile to reflect players current standing in profile
|
* Get a trader base object, update profile to reflect players current standing in profile
|
||||||
@ -133,6 +131,13 @@ export declare class TraderHelper {
|
|||||||
}[];
|
}[];
|
||||||
traderId: string;
|
traderId: string;
|
||||||
}, itemPurchased: Item): void;
|
}, itemPurchased: Item): void;
|
||||||
|
/**
|
||||||
|
* EoD and Unheard get a 20% bonus to personal trader limit purchases
|
||||||
|
* @param buyRestrictionMax Existing value from trader item
|
||||||
|
* @param gameVersion Profiles game version
|
||||||
|
* @returns buyRestrictionMax value
|
||||||
|
*/
|
||||||
|
getAccountTypeAdjustedTraderPurchaseLimit(buyRestrictionMax: number, gameVersion: string): number;
|
||||||
/**
|
/**
|
||||||
* Get the highest rouble price for an item from traders
|
* Get the highest rouble price for an item from traders
|
||||||
* UNUSED
|
* UNUSED
|
||||||
|
@ -31,7 +31,6 @@ export interface IConfig {
|
|||||||
TradingUnlimitedItems: boolean;
|
TradingUnlimitedItems: boolean;
|
||||||
MaxLoyaltyLevelForAll: boolean;
|
MaxLoyaltyLevelForAll: boolean;
|
||||||
GlobalLootChanceModifier: number;
|
GlobalLootChanceModifier: number;
|
||||||
GlobalLootChanceModifierPvE: number;
|
|
||||||
GraphicSettings: IGraphicSettings;
|
GraphicSettings: IGraphicSettings;
|
||||||
TimeBeforeDeploy: number;
|
TimeBeforeDeploy: number;
|
||||||
TimeBeforeDeployLocal: number;
|
TimeBeforeDeployLocal: number;
|
||||||
@ -49,6 +48,7 @@ export interface IConfig {
|
|||||||
BotsEnabled: boolean;
|
BotsEnabled: boolean;
|
||||||
BufferZone: IBufferZone;
|
BufferZone: IBufferZone;
|
||||||
ArmorMaterials: IArmorMaterials;
|
ArmorMaterials: IArmorMaterials;
|
||||||
|
ArenaEftTransferSettings: IArenaEftTransferSettings;
|
||||||
LegsOverdamage: number;
|
LegsOverdamage: number;
|
||||||
HandsOverdamage: number;
|
HandsOverdamage: number;
|
||||||
StomachOverdamage: number;
|
StomachOverdamage: number;
|
||||||
@ -76,6 +76,7 @@ export interface IConfig {
|
|||||||
SkillPointsBeforeFatigue: number;
|
SkillPointsBeforeFatigue: number;
|
||||||
SkillFatigueReset: number;
|
SkillFatigueReset: number;
|
||||||
DiscardLimitsEnabled: boolean;
|
DiscardLimitsEnabled: boolean;
|
||||||
|
EnvironmentSettings: IEnvironmentSetting2;
|
||||||
EventSettings: IEventSettings;
|
EventSettings: IEventSettings;
|
||||||
FavoriteItemsSettings: IFavoriteItemsSettings;
|
FavoriteItemsSettings: IFavoriteItemsSettings;
|
||||||
VaultingSettings: IVaultingSettings;
|
VaultingSettings: IVaultingSettings;
|
||||||
@ -102,6 +103,12 @@ export interface IConfig {
|
|||||||
Ballistic: IBallistic;
|
Ballistic: IBallistic;
|
||||||
RepairSettings: IRepairSettings;
|
RepairSettings: IRepairSettings;
|
||||||
}
|
}
|
||||||
|
export interface IEnvironmentSetting2 {
|
||||||
|
EnvironmentUIData: IEnvironmentUIData;
|
||||||
|
}
|
||||||
|
export interface IEnvironmentUIData {
|
||||||
|
TheUnheardEditionEnvironmentUiType: string[];
|
||||||
|
}
|
||||||
export interface IBodyPartColliderSettings {
|
export interface IBodyPartColliderSettings {
|
||||||
BackHead: IBodyPartColliderPart;
|
BackHead: IBodyPartColliderPart;
|
||||||
Ears: IBodyPartColliderPart;
|
Ears: IBodyPartColliderPart;
|
||||||
@ -178,8 +185,12 @@ export interface IItemsCommonSettings {
|
|||||||
ItemRemoveAfterInterruptionTime: number;
|
ItemRemoveAfterInterruptionTime: number;
|
||||||
}
|
}
|
||||||
export interface ITradingSettings {
|
export interface ITradingSettings {
|
||||||
|
BuyRestrictionMaxBonus: Record<string, IBuyRestrictionMaxBonus>;
|
||||||
BuyoutRestrictions: IBuyoutRestrictions;
|
BuyoutRestrictions: IBuyoutRestrictions;
|
||||||
}
|
}
|
||||||
|
export interface IBuyRestrictionMaxBonus {
|
||||||
|
multiplier: number;
|
||||||
|
}
|
||||||
export interface IBuyoutRestrictions {
|
export interface IBuyoutRestrictions {
|
||||||
MinDurability: number;
|
MinDurability: number;
|
||||||
MinFoodDrinkResource: number;
|
MinFoodDrinkResource: number;
|
||||||
@ -381,6 +392,17 @@ export interface IBodyParts {
|
|||||||
Feet: string;
|
Feet: string;
|
||||||
Hands: string;
|
Hands: string;
|
||||||
}
|
}
|
||||||
|
export interface IArenaEftTransferSettings {
|
||||||
|
ArenaEftTransferSettings: ArenaEftTransferSettings;
|
||||||
|
}
|
||||||
|
export interface ArenaEftTransferSettings {
|
||||||
|
ArenaManagerReputationTaxMultiplier: number;
|
||||||
|
CharismaTaxMultiplier: number;
|
||||||
|
CreditPriceTaxMultiplier: number;
|
||||||
|
RubTaxMultiplier: number;
|
||||||
|
TransferLimitsByGameEdition: Record<string, number>;
|
||||||
|
TransferLimitsSettings: Record<string, number>;
|
||||||
|
}
|
||||||
export interface IArmorMaterials {
|
export interface IArmorMaterials {
|
||||||
UHMWPE: IArmorType;
|
UHMWPE: IArmorType;
|
||||||
Aramid: IArmorType;
|
Aramid: IArmorType;
|
||||||
@ -802,6 +824,7 @@ export interface IMaxActiveOfferCount {
|
|||||||
from: number;
|
from: number;
|
||||||
to: number;
|
to: number;
|
||||||
count: number;
|
count: number;
|
||||||
|
countForSpecialEditions: number;
|
||||||
}
|
}
|
||||||
export interface IMaxSumForRarity {
|
export interface IMaxSumForRarity {
|
||||||
Common: IRarityMaxSum;
|
Common: IRarityMaxSum;
|
||||||
|
@ -35,9 +35,17 @@ export interface IBotBase {
|
|||||||
CoopExtractCounts: Record<string, number>;
|
CoopExtractCounts: Record<string, number>;
|
||||||
SurvivorClass: SurvivorClass;
|
SurvivorClass: SurvivorClass;
|
||||||
WishList: string[];
|
WishList: string[];
|
||||||
|
moneyTransferLimitData: IMoneyTransferLimits;
|
||||||
/** SPT specific property used during bot generation in raid */
|
/** SPT specific property used during bot generation in raid */
|
||||||
sptIsPmc?: boolean;
|
sptIsPmc?: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IMoneyTransferLimits {
|
||||||
|
/** TODO: Implement */
|
||||||
|
nextResetTime: number;
|
||||||
|
remainingLimit: number;
|
||||||
|
totalLimit: number;
|
||||||
|
resetInterval: number;
|
||||||
|
}
|
||||||
export interface ITaskConditionCounter {
|
export interface ITaskConditionCounter {
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: string;
|
||||||
@ -74,6 +82,8 @@ export interface Info {
|
|||||||
BannedUntil: number;
|
BannedUntil: number;
|
||||||
IsStreamerModeAvailable: boolean;
|
IsStreamerModeAvailable: boolean;
|
||||||
lastCompletedEvent?: LastCompleted;
|
lastCompletedEvent?: LastCompleted;
|
||||||
|
SelectedMemberCategory: number;
|
||||||
|
isMigratedSkills: boolean;
|
||||||
}
|
}
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
Role: string;
|
Role: string;
|
||||||
@ -107,6 +117,7 @@ export interface Health {
|
|||||||
Temperature: CurrentMax;
|
Temperature: CurrentMax;
|
||||||
BodyParts: BodyPartsHealth;
|
BodyParts: BodyPartsHealth;
|
||||||
UpdateTime: number;
|
UpdateTime: number;
|
||||||
|
Immortal?: boolean;
|
||||||
}
|
}
|
||||||
export interface BodyPartsHealth {
|
export interface BodyPartsHealth {
|
||||||
Head: BodyPartHealth;
|
Head: BodyPartHealth;
|
||||||
|
@ -37,6 +37,7 @@ export interface Props {
|
|||||||
IsUngivable?: boolean;
|
IsUngivable?: boolean;
|
||||||
IsUnremovable?: boolean;
|
IsUnremovable?: boolean;
|
||||||
IsLockedafterEquip?: boolean;
|
IsLockedafterEquip?: boolean;
|
||||||
|
IsRagfairCurrency?: boolean;
|
||||||
IsSpecialSlotOnly?: boolean;
|
IsSpecialSlotOnly?: boolean;
|
||||||
IsStationaryWeapon?: boolean;
|
IsStationaryWeapon?: boolean;
|
||||||
QuestItem?: boolean;
|
QuestItem?: boolean;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
export interface IGetProfileSettingsRequest {
|
export interface IGetProfileSettingsRequest {
|
||||||
|
/** Chosen value for profile.Info.SelectedMemberCategory */
|
||||||
|
memberCategory: number;
|
||||||
squadInviteRestriction: boolean;
|
squadInviteRestriction: boolean;
|
||||||
}
|
}
|
||||||
|
@ -168,6 +168,8 @@ export interface Spt {
|
|||||||
receivedGifts: ReceivedGift[];
|
receivedGifts: ReceivedGift[];
|
||||||
/** item TPLs blacklisted from being sold on flea for this profile */
|
/** item TPLs blacklisted from being sold on flea for this profile */
|
||||||
blacklistedItemTpls?: string[];
|
blacklistedItemTpls?: string[];
|
||||||
|
/** key: daily type */
|
||||||
|
freeRepeatableChangeCount: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface ModDetails {
|
export interface ModDetails {
|
||||||
name: string;
|
name: string;
|
||||||
@ -178,7 +180,8 @@ export interface ModDetails {
|
|||||||
}
|
}
|
||||||
export interface ReceivedGift {
|
export interface ReceivedGift {
|
||||||
giftId: string;
|
giftId: string;
|
||||||
timestampAccepted: number;
|
timestampLastAccepted: number;
|
||||||
|
current: number;
|
||||||
}
|
}
|
||||||
export interface Vitality {
|
export interface Vitality {
|
||||||
health: Health;
|
health: Health;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
export declare enum Money {
|
export declare enum Money {
|
||||||
ROUBLES = "5449016a4bdc2d6f028b456f",
|
ROUBLES = "5449016a4bdc2d6f028b456f",
|
||||||
EUROS = "569668774bdc2da2298b4568",
|
EUROS = "569668774bdc2da2298b4568",
|
||||||
DOLLARS = "5696686a4bdc2da3298b456a"
|
DOLLARS = "5696686a4bdc2da3298b456a",
|
||||||
|
GP = "5d235b4d86f7742e017bc88a"
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user