Update types for 3.6.0 - example #1
This commit is contained in:
parent
1a4d3dacf0
commit
ef814a53e3
@ -87,7 +87,7 @@ export declare class DialogueCallbacks implements OnUpdate {
|
|||||||
ignoreFriend(url: string, request: {
|
ignoreFriend(url: string, request: {
|
||||||
uid: string;
|
uid: string;
|
||||||
}, sessionID: string): any;
|
}, sessionID: string): any;
|
||||||
/** Handle client/friend/ignore/set */
|
/** Handle client/friend/ignore/remove */
|
||||||
unIgnoreFriend(url: string, request: {
|
unIgnoreFriend(url: string, request: {
|
||||||
uid: string;
|
uid: string;
|
||||||
}, sessionID: string): any;
|
}, sessionID: string): any;
|
||||||
|
@ -76,5 +76,5 @@ export declare class ProfileCallbacks {
|
|||||||
/**
|
/**
|
||||||
* Handle /launcher/profiles
|
* Handle /launcher/profiles
|
||||||
*/
|
*/
|
||||||
getAllMiniProfiles(url: string, info: any, sessionID: string): string;
|
getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -5,13 +5,22 @@ import { IGetMailDialogViewRequestData } from "../models/eft/dialog/IGetMailDial
|
|||||||
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
||||||
import { ISendMessageRequest } from "../models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "../models/eft/dialog/ISendMessageRequest";
|
||||||
import { Dialogue, DialogueInfo, IAkiProfile, IUserDialogInfo, Message } from "../models/eft/profile/IAkiProfile";
|
import { Dialogue, DialogueInfo, IAkiProfile, IUserDialogInfo, Message } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { MessageType } from "../models/enums/MessageType";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { GiftService } from "../services/GiftService";
|
||||||
|
import { MailSendService } from "../services/MailSendService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class DialogueController {
|
export declare class DialogueController {
|
||||||
|
protected logger: ILogger;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper);
|
protected mailSendService: MailSendService;
|
||||||
|
protected giftService: GiftService;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil);
|
||||||
/** Handle onUpdate spt event */
|
/** Handle onUpdate spt event */
|
||||||
update(): void;
|
update(): void;
|
||||||
/**
|
/**
|
||||||
@ -34,6 +43,14 @@ export declare class DialogueController {
|
|||||||
* @returns DialogueInfo
|
* @returns DialogueInfo
|
||||||
*/
|
*/
|
||||||
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
|
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
|
||||||
|
/**
|
||||||
|
* Get the users involved in a dialog (player + other party)
|
||||||
|
* @param dialog The dialog to check for users
|
||||||
|
* @param messageType What type of message is being sent
|
||||||
|
* @param sessionID Player id
|
||||||
|
* @returns IUserDialogInfo array
|
||||||
|
*/
|
||||||
|
getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[];
|
||||||
/**
|
/**
|
||||||
* Handle client/mail/dialog/view
|
* Handle client/mail/dialog/view
|
||||||
* Handle player clicking 'messenger' and seeing all the messages they've recieved
|
* Handle player clicking 'messenger' and seeing all the messages they've recieved
|
||||||
@ -51,7 +68,13 @@ export declare class DialogueController {
|
|||||||
* @returns Dialogue
|
* @returns Dialogue
|
||||||
*/
|
*/
|
||||||
protected getDialogByIdFromProfile(profile: IAkiProfile, request: IGetMailDialogViewRequestData): Dialogue;
|
protected getDialogByIdFromProfile(profile: IAkiProfile, request: IGetMailDialogViewRequestData): Dialogue;
|
||||||
protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[];
|
/**
|
||||||
|
* Get the users involved in a mail between two entities
|
||||||
|
* @param fullProfile Player profile
|
||||||
|
* @param dialogUsers The participants of the mail
|
||||||
|
* @returns IUserDialogInfo array
|
||||||
|
*/
|
||||||
|
protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[];
|
||||||
/**
|
/**
|
||||||
* Get a count of messages with attachments from a particular dialog
|
* Get a count of messages with attachments from a particular dialog
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -80,6 +103,8 @@ export declare class DialogueController {
|
|||||||
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
|
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
|
||||||
/** client/mail/msg/send */
|
/** client/mail/msg/send */
|
||||||
sendMessage(sessionId: string, request: ISendMessageRequest): string;
|
sendMessage(sessionId: string, request: ISendMessageRequest): string;
|
||||||
|
protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void;
|
||||||
|
protected getSptFriendData(friendId?: string): IUserDialogInfo;
|
||||||
/**
|
/**
|
||||||
* Get messages from a specific dialog that have items not expired
|
* Get messages from a specific dialog that have items not expired
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
|
@ -18,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
|
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
|
||||||
|
import { GiftService } from "../services/GiftService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { OpenZoneService } from "../services/OpenZoneService";
|
import { OpenZoneService } from "../services/OpenZoneService";
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
@ -40,17 +41,19 @@ export declare class GameController {
|
|||||||
protected customLocationWaveService: CustomLocationWaveService;
|
protected customLocationWaveService: CustomLocationWaveService;
|
||||||
protected openZoneService: OpenZoneService;
|
protected openZoneService: OpenZoneService;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
|
protected giftService: GiftService;
|
||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected os: any;
|
protected os: any;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
protected coreConfig: ICoreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle client/game/start
|
* Handle client/game/start
|
||||||
*/
|
*/
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */
|
||||||
protected adjustMapBotLimits(): void;
|
protected adjustMapBotLimits(): void;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/config
|
* Handle client/game/config
|
||||||
@ -95,6 +98,11 @@ export declare class GameController {
|
|||||||
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
|
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
|
||||||
*/
|
*/
|
||||||
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
|
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
|
||||||
|
/**
|
||||||
|
* Send starting gifts to profile after x days
|
||||||
|
* @param pmcProfile Profile to add gifts to
|
||||||
|
*/
|
||||||
|
protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long
|
* Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long
|
||||||
*/
|
*/
|
||||||
|
@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState";
|
||||||
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
||||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
@ -99,7 +100,7 @@ export declare class InraidController {
|
|||||||
* @param statusOnExit exit value from offraidData object
|
* @param statusOnExit exit value from offraidData object
|
||||||
* @returns true if dead
|
* @returns true if dead
|
||||||
*/
|
*/
|
||||||
protected isPlayerDead(statusOnExit: string): boolean;
|
protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean;
|
||||||
/**
|
/**
|
||||||
* Mark inventory items as FiR if player survived raid, otherwise remove FiR from them
|
* Mark inventory items as FiR if player survived raid, otherwise remove FiR from them
|
||||||
* @param offraidData Save Progress Request
|
* @param offraidData Save Progress Request
|
||||||
|
@ -6,7 +6,6 @@ import { PresetHelper } from "../helpers/PresetHelper";
|
|||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
|
||||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData";
|
import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData";
|
||||||
import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData";
|
import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData";
|
||||||
@ -101,11 +100,6 @@ export declare class InventoryController {
|
|||||||
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||||
*/
|
*/
|
||||||
swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Give Item
|
|
||||||
* its used for "add" item like gifts etc.
|
|
||||||
*/
|
|
||||||
addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse;
|
|
||||||
/**
|
/**
|
||||||
* Handles folding of Weapons
|
* Handles folding of Weapons
|
||||||
*/
|
*/
|
||||||
|
@ -34,13 +34,19 @@ export declare class LocationController {
|
|||||||
* @returns ILocationBase
|
* @returns ILocationBase
|
||||||
*/
|
*/
|
||||||
get(location: string): ILocationBase;
|
get(location: string): ILocationBase;
|
||||||
private generate;
|
/**
|
||||||
|
* Generate a maps base location without loot
|
||||||
|
* @param name Map name
|
||||||
|
* @returns ILocationBase
|
||||||
|
*/
|
||||||
|
protected generate(name: string): ILocationBase;
|
||||||
/**
|
/**
|
||||||
* Handle client/locations
|
* Handle client/locations
|
||||||
* Get all maps base location properties without loot data
|
* Get all maps base location properties without loot data
|
||||||
|
* @param sessionId Players Id
|
||||||
* @returns ILocationsGenerateAllResponse
|
* @returns ILocationsGenerateAllResponse
|
||||||
*/
|
*/
|
||||||
generateAll(): ILocationsGenerateAllResponse;
|
generateAll(sessionId: string): ILocationsGenerateAllResponse;
|
||||||
/**
|
/**
|
||||||
* Handle client/location/getAirdropLoot
|
* Handle client/location/getAirdropLoot
|
||||||
* Get loot for an airdop container
|
* Get loot for an airdop container
|
||||||
|
@ -18,6 +18,8 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { MailSendService } from "../services/MailSendService";
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
@ -29,13 +31,15 @@ export declare class ProfileController {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
||||||
/**
|
/**
|
||||||
* Handle /launcher/profiles
|
* Handle /launcher/profiles
|
||||||
*/
|
*/
|
||||||
|
@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper";
|
|||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
@ -18,6 +19,7 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
import { LocaleService } from "../services/LocaleService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { MailSendService } from "../services/MailSendService";
|
||||||
import { PlayerService } from "../services/PlayerService";
|
import { PlayerService } from "../services/PlayerService";
|
||||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
@ -30,7 +32,9 @@ export declare class QuestController {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected questConditionHelper: QuestConditionHelper;
|
protected questConditionHelper: QuestConditionHelper;
|
||||||
protected playerService: PlayerService;
|
protected playerService: PlayerService;
|
||||||
@ -39,7 +43,7 @@ export declare class QuestController {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle client/quest/list
|
* Handle client/quest/list
|
||||||
* Get all quests visible to player
|
* Get all quests visible to player
|
||||||
|
@ -120,7 +120,7 @@ export declare class RagfairController {
|
|||||||
/**
|
/**
|
||||||
* List item(s) on flea for sale
|
* List item(s) on flea for sale
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param offerRequest Flea list creatio offer
|
* @param offerRequest Flea list creation offer
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
|
@ -67,6 +67,13 @@ export declare class BotWeaponGenerator {
|
|||||||
* @returns GenerateWeaponResult object
|
* @returns GenerateWeaponResult object
|
||||||
*/
|
*/
|
||||||
generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult;
|
generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult;
|
||||||
|
/**
|
||||||
|
* Insert a cartridge into a weapon
|
||||||
|
* @param weaponWithModsArray Weapon and mods
|
||||||
|
* @param ammoTpl Cartridge to add to weapon
|
||||||
|
* @param desiredSlotId name of slot, e.g. patron_in_weapon
|
||||||
|
*/
|
||||||
|
protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void;
|
||||||
/**
|
/**
|
||||||
* Create array with weapon base as only element and
|
* Create array with weapon base as only element and
|
||||||
* add additional properties based on weapon type
|
* add additional properties based on weapon type
|
||||||
|
@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
export declare class FenceBaseAssortGenerator {
|
export declare class FenceBaseAssortGenerator {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Create base fence assorts dynamically and store in db
|
* Create base fence assorts dynamically and store in db
|
||||||
*/
|
*/
|
||||||
|
@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator {
|
|||||||
price: number;
|
price: number;
|
||||||
}[];
|
}[];
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
||||||
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
/**
|
||||||
|
* Create a flea offer and store it in the Ragfair server offers array
|
||||||
|
* @param userID Owner of the offer
|
||||||
|
* @param time Time offer is listed at
|
||||||
|
* @param items Items in the offer
|
||||||
|
* @param barterScheme Cost of item (currency or barter)
|
||||||
|
* @param loyalLevel Loyalty level needed to buy item
|
||||||
|
* @param price Price of offer
|
||||||
|
* @param sellInOnePiece Set StackObjectsCount to 1
|
||||||
|
* @returns IRagfairOffer
|
||||||
|
*/
|
||||||
|
createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||||
|
/**
|
||||||
|
* Create an offer object ready to send to ragfairOfferService.addOffer()
|
||||||
|
* @param userID Owner of the offer
|
||||||
|
* @param time Time offer is listed at
|
||||||
|
* @param items Items in the offer
|
||||||
|
* @param barterScheme Cost of item (currency or barter)
|
||||||
|
* @param loyalLevel Loyalty level needed to buy item
|
||||||
|
* @param price Price of offer
|
||||||
|
* @param sellInOnePiece Set StackObjectsCount to 1
|
||||||
|
* @returns IRagfairOffer
|
||||||
|
*/
|
||||||
|
protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||||
/**
|
/**
|
||||||
* Calculate the offer price that's listed on the flea listing
|
* Calculate the offer price that's listed on the flea listing
|
||||||
* @param offerRequirements barter requirements for offer
|
* @param offerRequirements barter requirements for offer
|
||||||
@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator {
|
|||||||
* @returns count of roubles
|
* @returns count of roubles
|
||||||
*/
|
*/
|
||||||
protected calculateRoublePrice(currencyCount: number, currencyType: string): number;
|
protected calculateRoublePrice(currencyCount: number, currencyType: string): number;
|
||||||
protected getTraderId(userID: string): string;
|
/**
|
||||||
protected getRating(userID: string): number;
|
* Check userId, if its a player, return their pmc _id, otherwise return userId parameter
|
||||||
|
* @param userId Users Id to check
|
||||||
|
* @returns Users Id
|
||||||
|
*/
|
||||||
|
protected getTraderId(userId: string): string;
|
||||||
|
/**
|
||||||
|
* Get a flea trading rating for the passed in user
|
||||||
|
* @param userId User to get flea rating of
|
||||||
|
* @returns Flea rating value
|
||||||
|
*/
|
||||||
|
protected getRating(userId: string): number;
|
||||||
/**
|
/**
|
||||||
* Is the offers user rating growing
|
* Is the offers user rating growing
|
||||||
* @param userID user to check rating of
|
* @param userID user to check rating of
|
||||||
@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator {
|
|||||||
* @param expiredOffers optional, expired offers to regenerate
|
* @param expiredOffers optional, expired offers to regenerate
|
||||||
*/
|
*/
|
||||||
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param assortItemIndex Index of assort item
|
||||||
|
* @param assortItemsToProcess Item array containing index
|
||||||
|
* @param expiredOffers Currently expired offers on flea
|
||||||
|
* @param config Ragfair dynamic config
|
||||||
|
*/
|
||||||
protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise<void>;
|
protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Create one flea offer for a specific item
|
* Create one flea offer for a specific item
|
||||||
* @param items Item to create offer for
|
* @param items Item to create offer for
|
||||||
* @param isPreset Is item a weapon preset
|
* @param isPreset Is item a weapon preset
|
||||||
* @param itemDetails raw db item details
|
* @param itemDetails raw db item details
|
||||||
* @returns
|
* @returns Item array
|
||||||
*/
|
*/
|
||||||
protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<Item[]>;
|
protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<Item[]>;
|
||||||
/**
|
/**
|
||||||
@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator {
|
|||||||
/**
|
/**
|
||||||
* Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
|
* Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
|
||||||
* @param offerItems Items for sale in offer
|
* @param offerItems Items for sale in offer
|
||||||
* @returns barter scheme
|
* @returns Barter scheme
|
||||||
*/
|
*/
|
||||||
protected createBarterRequirement(offerItems: Item[]): IBarterScheme[];
|
protected createBarterRequirement(offerItems: Item[]): IBarterScheme[];
|
||||||
/**
|
/**
|
||||||
@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator {
|
|||||||
* @returns Barter scheme for offer
|
* @returns Barter scheme for offer
|
||||||
*/
|
*/
|
||||||
protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[];
|
protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[];
|
||||||
/**
|
|
||||||
* Create a flea offer and store it in the Ragfair server offers array
|
|
||||||
* @param userID owner of the offer
|
|
||||||
* @param time time offer is put up
|
|
||||||
* @param items items in the offer
|
|
||||||
* @param barterScheme cost of item (currency or barter)
|
|
||||||
* @param loyalLevel Loyalty level needed to buy item
|
|
||||||
* @param price price of offer
|
|
||||||
* @param sellInOnePiece
|
|
||||||
* @returns Ragfair offer
|
|
||||||
*/
|
|
||||||
createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,11 @@ export declare class WeatherGenerator {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected weatherConfig: IWeatherConfig;
|
protected weatherConfig: IWeatherConfig;
|
||||||
constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Get current + raid datetime and format into correct BSG format and return
|
||||||
|
* @param data Weather data
|
||||||
|
* @returns IWeatherData
|
||||||
|
*/
|
||||||
calculateGameTime(data: IWeatherData): IWeatherData;
|
calculateGameTime(data: IWeatherData): IWeatherData;
|
||||||
/**
|
/**
|
||||||
* Get server uptime seconds multiplied by a multiplier and add to current time as seconds
|
* Get server uptime seconds multiplied by a multiplier and add to current time as seconds
|
||||||
@ -33,7 +38,7 @@ export declare class WeatherGenerator {
|
|||||||
/**
|
/**
|
||||||
* Get current time formatted to fit BSGs requirement
|
* Get current time formatted to fit BSGs requirement
|
||||||
* @param date date to format into bsg style
|
* @param date date to format into bsg style
|
||||||
* @returns
|
* @returns Time formatted in BSG format
|
||||||
*/
|
*/
|
||||||
protected getBSGFormattedTime(date: Date): string;
|
protected getBSGFormattedTime(date: Date): string;
|
||||||
/**
|
/**
|
||||||
|
@ -6,7 +6,35 @@ export declare class FindSlotResult {
|
|||||||
constructor(success?: boolean, x?: any, y?: any, rotation?: boolean);
|
constructor(success?: boolean, x?: any, y?: any, rotation?: boolean);
|
||||||
}
|
}
|
||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
/**
|
||||||
|
* Finds a slot for an item in a given 2D container map
|
||||||
|
* @param container2D Array of container with slots filled/free
|
||||||
|
* @param itemWidth Width of item
|
||||||
|
* @param itemHeight Height of item
|
||||||
|
* @returns Location to place item in container
|
||||||
|
*/
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
|
/**
|
||||||
|
* Find a slot inside a container an item can be placed in
|
||||||
|
* @param container2D Container to find space in
|
||||||
|
* @param containerX Container x size
|
||||||
|
* @param containerY Container y size
|
||||||
|
* @param x ???
|
||||||
|
* @param y ???
|
||||||
|
* @param itemW Items width
|
||||||
|
* @param itemH Items height
|
||||||
|
* @returns True - slot found
|
||||||
|
*/
|
||||||
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
|
/**
|
||||||
|
* Find a free slot for an item to be placed at
|
||||||
|
* @param container2D Container to palce item in
|
||||||
|
* @param x Container x size
|
||||||
|
* @param y Container y size
|
||||||
|
* @param itemW Items width
|
||||||
|
* @param itemH Items height
|
||||||
|
* @param rotate is item rotated
|
||||||
|
* @returns Location to place item
|
||||||
|
*/
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
@ -20,21 +20,13 @@ export declare class DialogueHelper {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||||
/**
|
/**
|
||||||
* Create basic message context template
|
* @deprecated Use MailSendService.sendMessage() or helpers
|
||||||
* @param templateId
|
|
||||||
* @param messageType
|
|
||||||
* @param maxStoreTime
|
|
||||||
* @returns
|
|
||||||
*/
|
*/
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent;
|
||||||
/**
|
/**
|
||||||
* Add a templated message to the dialogue.
|
* @deprecated Use MailSendService.sendMessage() or helpers
|
||||||
* @param dialogueID
|
|
||||||
* @param messageContent
|
|
||||||
* @param sessionID
|
|
||||||
* @param rewards
|
|
||||||
*/
|
*/
|
||||||
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void;
|
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void;
|
||||||
/**
|
/**
|
||||||
* Get the preview contents of the last message in a dialogue.
|
* Get the preview contents of the last message in a dialogue.
|
||||||
* @param dialogue
|
* @param dialogue
|
||||||
|
@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Get max durability for a weapon based on bot role
|
||||||
|
* @param itemTemplate UNUSED - Item to get durability for
|
||||||
|
* @param botRole Role of bot to get max durability for
|
||||||
|
* @returns Max durability of weapon
|
||||||
|
*/
|
||||||
getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||||
|
/**
|
||||||
|
* Get max durability value for armor based on bot role
|
||||||
|
* @param itemTemplate Item to get max durability for
|
||||||
|
* @param botRole Role of bot to get max durability for
|
||||||
|
* @returns max durability
|
||||||
|
*/
|
||||||
getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||||
|
/**
|
||||||
|
* Get randomised current weapon durability by bot role
|
||||||
|
* @param itemTemplate Unused - Item to get current durability of
|
||||||
|
* @param botRole Role of bot to get current durability for
|
||||||
|
* @param maxDurability Max durability of weapon
|
||||||
|
* @returns Current weapon durability
|
||||||
|
*/
|
||||||
getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||||
|
/**
|
||||||
|
* Get randomised current armor durability by bot role
|
||||||
|
* @param itemTemplate Unused - Item to get current durability of
|
||||||
|
* @param botRole Role of bot to get current durability for
|
||||||
|
* @param maxDurability Max durability of armor
|
||||||
|
* @returns Current armor durability
|
||||||
|
*/
|
||||||
getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||||
protected generateMaxWeaponDurability(botRole: string): number;
|
protected generateMaxWeaponDurability(botRole: string): number;
|
||||||
protected generateMaxPmcArmorDurability(itemMaxDurability: number): number;
|
protected generateMaxPmcArmorDurability(itemMaxDurability: number): number;
|
||||||
|
@ -14,6 +14,9 @@ export declare class HandbookHelper {
|
|||||||
protected lookupCacheGenerated: boolean;
|
protected lookupCacheGenerated: boolean;
|
||||||
protected handbookPriceCache: LookupCollection;
|
protected handbookPriceCache: LookupCollection;
|
||||||
constructor(databaseServer: DatabaseServer);
|
constructor(databaseServer: DatabaseServer);
|
||||||
|
/**
|
||||||
|
* Create an in-memory cache of all items with associated handbook price in handbookPriceCache class
|
||||||
|
*/
|
||||||
hydrateLookup(): void;
|
hydrateLookup(): void;
|
||||||
/**
|
/**
|
||||||
* Get price from internal cache, if cache empty look up price directly in handbook (expensive)
|
* Get price from internal cache, if cache empty look up price directly in handbook (expensive)
|
||||||
@ -23,18 +26,23 @@ export declare class HandbookHelper {
|
|||||||
*/
|
*/
|
||||||
getTemplatePrice(tpl: string): number;
|
getTemplatePrice(tpl: string): number;
|
||||||
/**
|
/**
|
||||||
* all items in template with the given parent category
|
* Get all items in template with the given parent category
|
||||||
* @param x
|
* @param parentId
|
||||||
* @returns string array
|
* @returns string array
|
||||||
*/
|
*/
|
||||||
templatesWithParent(x: string): string[];
|
templatesWithParent(parentId: string): string[];
|
||||||
/**
|
/**
|
||||||
* Does category exist in handbook cache
|
* Does category exist in handbook cache
|
||||||
* @param category
|
* @param category
|
||||||
* @returns true if exists in cache
|
* @returns true if exists in cache
|
||||||
*/
|
*/
|
||||||
isCategory(category: string): boolean;
|
isCategory(category: string): boolean;
|
||||||
childrenCategories(x: string): string[];
|
/**
|
||||||
|
* Get all items associated with a categories parent
|
||||||
|
* @param categoryParent
|
||||||
|
* @returns string array
|
||||||
|
*/
|
||||||
|
childrenCategories(categoryParent: string): string[];
|
||||||
/**
|
/**
|
||||||
* Convert non-roubles into roubles
|
* Convert non-roubles into roubles
|
||||||
* @param nonRoubleCurrencyCount Currency count to convert
|
* @param nonRoubleCurrencyCount Currency count to convert
|
||||||
|
@ -52,6 +52,11 @@ export declare class HideoutHelper {
|
|||||||
* with all the constants.
|
* with all the constants.
|
||||||
*/
|
*/
|
||||||
initProduction(recipeId: string, productionTime: number): Production;
|
initProduction(recipeId: string, productionTime: number): Production;
|
||||||
|
/**
|
||||||
|
* Is the provided object a Production type
|
||||||
|
* @param productive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
isProductionType(productive: Productive): productive is Production;
|
isProductionType(productive: Productive): productive is Production;
|
||||||
applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void;
|
applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void;
|
||||||
/**
|
/**
|
||||||
|
@ -16,8 +16,17 @@ export declare class HttpServerHelper {
|
|||||||
};
|
};
|
||||||
constructor(configServer: ConfigServer);
|
constructor(configServer: ConfigServer);
|
||||||
getMimeText(key: string): string;
|
getMimeText(key: string): string;
|
||||||
|
/**
|
||||||
|
* Combine ip and port into url
|
||||||
|
* @returns url
|
||||||
|
*/
|
||||||
buildUrl(): string;
|
buildUrl(): string;
|
||||||
|
/**
|
||||||
|
* Prepend http to the url:port
|
||||||
|
* @returns URI
|
||||||
|
*/
|
||||||
getBackendUrl(): string;
|
getBackendUrl(): string;
|
||||||
|
/** Get websocket url + port */
|
||||||
getWebsocketUrl(): string;
|
getWebsocketUrl(): string;
|
||||||
sendTextJson(resp: any, output: any): void;
|
sendTextJson(resp: any, output: any): void;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ export declare class InRaidHelper {
|
|||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Should quest items be removed from player inventory on death
|
* Lookup quest item loss from lostOnDeath config
|
||||||
* @returns True if items should be removed from inventory
|
* @returns True if items should be removed from inventory
|
||||||
*/
|
*/
|
||||||
removeQuestItemsOnDeath(): boolean;
|
removeQuestItemsOnDeath(): boolean;
|
||||||
|
@ -53,11 +53,12 @@ export declare class InventoryHelper {
|
|||||||
* @param callback Code to execute later (function)
|
* @param callback Code to execute later (function)
|
||||||
* @param foundInRaid Will results added to inventory be set as found in raid
|
* @param foundInRaid Will results added to inventory be set as found in raid
|
||||||
* @param addUpd Additional upd properties for items being added to inventory
|
* @param addUpd Additional upd properties for items being added to inventory
|
||||||
|
* @param useSortingTable Allow items to go into sorting table when stash has no space
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: {
|
addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: {
|
||||||
(): void;
|
(): void;
|
||||||
}, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse;
|
}, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Add ammo to ammo boxes
|
* Add ammo to ammo boxes
|
||||||
* @param itemToAdd Item to check is ammo box
|
* @param itemToAdd Item to check is ammo box
|
||||||
@ -99,8 +100,9 @@ export declare class InventoryHelper {
|
|||||||
* @returns Array
|
* @returns Array
|
||||||
*/
|
*/
|
||||||
protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][];
|
protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][];
|
||||||
protected getStashType(sessionID: string): string;
|
protected getSortingTableSlotMap(pmcData: IPmcData): number[][];
|
||||||
protected getPlayerStashSize(sessionID: string): Record<number, number>;
|
protected getPlayerStashSize(sessionID: string): Record<number, number>;
|
||||||
|
protected getStashType(sessionID: string): string;
|
||||||
/**
|
/**
|
||||||
* Internal helper function to transfer an item from one profile to another.
|
* Internal helper function to transfer an item from one profile to another.
|
||||||
* fromProfileData: Profile of the source.
|
* fromProfileData: Profile of the source.
|
||||||
|
@ -51,11 +51,22 @@ declare class ItemHelper {
|
|||||||
/**
|
/**
|
||||||
* Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
* Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
||||||
* found in the handbook. If the price can't be found at all return 0
|
* found in the handbook. If the price can't be found at all return 0
|
||||||
*
|
* @param tpl Item to look price up of
|
||||||
* @param {string} tpl the item template to check
|
* @returns Price in roubles
|
||||||
* @returns {integer} The price of the item or 0 if not found
|
|
||||||
*/
|
*/
|
||||||
getItemPrice(tpl: string): number;
|
getItemPrice(tpl: string): number;
|
||||||
|
/**
|
||||||
|
* Get the static (handbook) price in roubles for an item by tpl
|
||||||
|
* @param tpl Items tpl id to look up price
|
||||||
|
* @returns Price in roubles (0 if not found)
|
||||||
|
*/
|
||||||
|
getStaticItemPrice(tpl: string): number;
|
||||||
|
/**
|
||||||
|
* Get the dynamic (flea) price in roubles for an item by tpl
|
||||||
|
* @param tpl Items tpl id to look up price
|
||||||
|
* @returns Price in roubles (undefined if not found)
|
||||||
|
*/
|
||||||
|
getDynamicItemPrice(tpl: string): number;
|
||||||
fixItemStackCount(item: Item): Item;
|
fixItemStackCount(item: Item): Item;
|
||||||
/**
|
/**
|
||||||
* AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content.
|
* AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content.
|
||||||
|
@ -9,9 +9,18 @@ export declare class NotifierHelper {
|
|||||||
protected defaultNotification: INotification;
|
protected defaultNotification: INotification;
|
||||||
constructor(httpServerHelper: HttpServerHelper);
|
constructor(httpServerHelper: HttpServerHelper);
|
||||||
getDefaultNotification(): INotification;
|
getDefaultNotification(): INotification;
|
||||||
/** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */
|
/**
|
||||||
|
* Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside
|
||||||
|
* @param dialogueMessage Message from dialog that was sent
|
||||||
|
* @param ragfairData Ragfair data to attach to notification
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification;
|
createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification;
|
||||||
/** Creates a new notification with the specified dialogueMessage object. */
|
/**
|
||||||
|
* Create a new notification with the specified dialogueMessage object
|
||||||
|
* @param dialogueMessage
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
createNewMessageNotification(dialogueMessage: Message): INotification;
|
createNewMessageNotification(dialogueMessage: Message): INotification;
|
||||||
getWebSocketServer(sessionID: string): string;
|
getWebSocketServer(sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Stats } from "../models/eft/common/tables/IBotBase";
|
import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase";
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
@ -81,4 +81,24 @@ export declare class ProfileHelper {
|
|||||||
* @returns profile without secure container
|
* @returns profile without secure container
|
||||||
*/
|
*/
|
||||||
removeSecureContainer(profile: IPmcData): IPmcData;
|
removeSecureContainer(profile: IPmcData): IPmcData;
|
||||||
|
/**
|
||||||
|
* Flag a profile as having received a gift
|
||||||
|
* Store giftid in profile aki object
|
||||||
|
* @param playerId Player to add gift flag to
|
||||||
|
* @param giftId Gift player received
|
||||||
|
*/
|
||||||
|
addGiftReceivedFlagToProfile(playerId: string, giftId: string): void;
|
||||||
|
/**
|
||||||
|
* Check if profile has recieved a gift by id
|
||||||
|
* @param playerId Player profile to check for gift
|
||||||
|
* @param giftId Gift to check for
|
||||||
|
* @returns True if player has recieved gift previously
|
||||||
|
*/
|
||||||
|
playerHasRecievedGift(playerId: string, giftId: string): boolean;
|
||||||
|
/**
|
||||||
|
* Find Stat in profile counters and increment by one
|
||||||
|
* @param counters Counters to search for key
|
||||||
|
* @param keyToIncrement Key
|
||||||
|
*/
|
||||||
|
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
import { LocaleService } from "../services/LocaleService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { MailSendService } from "../services/MailSendService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
@ -37,9 +38,10 @@ export declare class QuestHelper {
|
|||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get status of a quest in player profile by its id
|
* Get status of a quest in player profile by its id
|
||||||
* @param pmcData Profile to search
|
* @param pmcData Profile to search
|
||||||
|
@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
@ -42,11 +43,12 @@ export declare class RagfairOfferHelper {
|
|||||||
protected ragfairHelper: RagfairHelper;
|
protected ragfairHelper: RagfairHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected static goodSoldTemplate: string;
|
protected static goodSoldTemplate: string;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
|
* Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
|
||||||
* @param searchRequest
|
* @param searchRequest
|
||||||
|
@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
import { MailSendService } from "../services/MailSendService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
import { DialogueHelper } from "./DialogueHelper";
|
import { DialogueHelper } from "./DialogueHelper";
|
||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
|
import { TraderHelper } from "./TraderHelper";
|
||||||
/**
|
/**
|
||||||
* Helper class for common ragfair server actions
|
* Helper class for common ragfair server actions
|
||||||
*/
|
*/
|
||||||
export declare class RagfairServerHelper {
|
export declare class RagfairServerHelper {
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
protected static goodsReturnedTemplate: string;
|
protected static goodsReturnedTemplate: string;
|
||||||
constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Is item valid / on blacklist / quest item
|
* Is item valid / on blacklist / quest item
|
||||||
* @param itemDetails
|
* @param itemDetails
|
||||||
* @returns boolean
|
* @returns boolean
|
||||||
*/
|
*/
|
||||||
isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean;
|
isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean;
|
||||||
protected isItemBlacklisted(itemTemplateId: string): boolean;
|
/**
|
||||||
isTrader(userID: string): boolean;
|
* Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic
|
||||||
isPlayer(userID: string): boolean;
|
* @param itemTemplateId Item tpl to check is blacklisted
|
||||||
returnItems(sessionID: string, items: Item[]): void;
|
* @returns True if its blacklsited
|
||||||
|
*/
|
||||||
|
protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean;
|
||||||
|
/**
|
||||||
|
* is supplied id a trader
|
||||||
|
* @param traderId
|
||||||
|
* @returns True if id was a trader
|
||||||
|
*/
|
||||||
|
isTrader(traderId: string): boolean;
|
||||||
|
/**
|
||||||
|
* Is this user id the logged in player
|
||||||
|
* @param userId Id to test
|
||||||
|
* @returns True is the current player
|
||||||
|
*/
|
||||||
|
isPlayer(userId: string): boolean;
|
||||||
|
/**
|
||||||
|
* Send items back to player
|
||||||
|
* @param sessionID Player to send items to
|
||||||
|
* @param returnedItems Items to send to player
|
||||||
|
*/
|
||||||
|
returnItems(sessionID: string, returnedItems: Item[]): void;
|
||||||
calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number;
|
calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number;
|
||||||
/**
|
/**
|
||||||
* Choose a currency at random with bias
|
* Choose a currency at random with bias
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader";
|
import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { Traders } from "../models/enums/Traders";
|
||||||
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -106,4 +107,10 @@ export declare class TraderHelper {
|
|||||||
* @returns Rouble price
|
* @returns Rouble price
|
||||||
*/
|
*/
|
||||||
getHighestSellToTraderPrice(tpl: string): number;
|
getHighestSellToTraderPrice(tpl: string): number;
|
||||||
|
/**
|
||||||
|
* Get a trader enum key by its value
|
||||||
|
* @param traderId Traders id
|
||||||
|
* @returns Traders key
|
||||||
|
*/
|
||||||
|
getTraderById(traderId: string): Traders;
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
getModPath(mod: string): string;
|
getModPath(mod: string): string;
|
||||||
protected importMods(): Promise<void>;
|
protected importMods(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Check for duplciate mods loaded, show error if duplicate mod found
|
* Check for duplicate mods loaded, show error if any
|
||||||
* @param modPackageData dictionary of mod package.json data
|
* @param modPackageData Dictionary of mod package.json data
|
||||||
*/
|
*/
|
||||||
protected checkForDuplicateMods(modPackageData: Record<string, IPackageJsonData>): void;
|
protected checkForDuplicateMods(modPackageData: Record<string, IPackageJsonData>): void;
|
||||||
/**
|
/**
|
||||||
|
@ -661,7 +661,7 @@ export interface ICategories {
|
|||||||
kd: boolean;
|
kd: boolean;
|
||||||
surviveRatio: boolean;
|
surviveRatio: boolean;
|
||||||
avgEarnings: boolean;
|
avgEarnings: boolean;
|
||||||
kills: boolean;
|
pmcKills: boolean;
|
||||||
raidCount: boolean;
|
raidCount: boolean;
|
||||||
longestShot: boolean;
|
longestShot: boolean;
|
||||||
timeOnline: boolean;
|
timeOnline: boolean;
|
||||||
|
@ -37,6 +37,7 @@ export interface ILocationBase {
|
|||||||
IsSecret: boolean;
|
IsSecret: boolean;
|
||||||
Locked: boolean;
|
Locked: boolean;
|
||||||
Loot: any[];
|
Loot: any[];
|
||||||
|
MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[];
|
||||||
MaxBotPerZone: number;
|
MaxBotPerZone: number;
|
||||||
MaxDistToFreePoint: number;
|
MaxDistToFreePoint: number;
|
||||||
MaxPlayers: number;
|
MaxPlayers: number;
|
||||||
@ -51,6 +52,7 @@ export interface ILocationBase {
|
|||||||
OldSpawn: boolean;
|
OldSpawn: boolean;
|
||||||
OpenZones: string;
|
OpenZones: string;
|
||||||
Preview: Preview;
|
Preview: Preview;
|
||||||
|
PlayersRequestCount: number;
|
||||||
RequiredPlayerLevel?: number;
|
RequiredPlayerLevel?: number;
|
||||||
RequiredPlayerLevelMin?: number;
|
RequiredPlayerLevelMin?: number;
|
||||||
RequiredPlayerLevelMax?: number;
|
RequiredPlayerLevelMax?: number;
|
||||||
@ -143,6 +145,10 @@ export interface BotLocationModifier {
|
|||||||
export interface MinMaxBot extends MinMax {
|
export interface MinMaxBot extends MinMax {
|
||||||
WildSpawnType: WildSpawnType | string;
|
WildSpawnType: WildSpawnType | string;
|
||||||
}
|
}
|
||||||
|
export interface MinPlayerWaitTime {
|
||||||
|
minPlayers: number;
|
||||||
|
time: number;
|
||||||
|
}
|
||||||
export interface Preview {
|
export interface Preview {
|
||||||
path: string;
|
path: string;
|
||||||
rcid: string;
|
rcid: string;
|
||||||
|
@ -1,16 +1,6 @@
|
|||||||
import { MemberCategory } from "../../enums/MemberCategory";
|
import { IUserDialogInfo } from "../profile/IAkiProfile";
|
||||||
export interface IGetFriendListDataResponse {
|
export interface IGetFriendListDataResponse {
|
||||||
Friends: Friend[];
|
Friends: IUserDialogInfo[];
|
||||||
Ignore: string[];
|
Ignore: string[];
|
||||||
InIgnoreList: string[];
|
InIgnoreList: string[];
|
||||||
}
|
}
|
||||||
export interface Friend {
|
|
||||||
_id: string;
|
|
||||||
Info: Info;
|
|
||||||
}
|
|
||||||
export interface Info {
|
|
||||||
Nickname: string;
|
|
||||||
Side: string;
|
|
||||||
Level: number;
|
|
||||||
MemberCategory: MemberCategory;
|
|
||||||
}
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
|
import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState";
|
||||||
import { IPmcData } from "../common/IPmcData";
|
import { IPmcData } from "../common/IPmcData";
|
||||||
import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData";
|
import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData";
|
||||||
export interface ISaveProgressRequestData {
|
export interface ISaveProgressRequestData {
|
||||||
exit: string;
|
exit: PlayerRaidEndState;
|
||||||
profile: IPmcData;
|
profile: IPmcData;
|
||||||
isPlayerScav: boolean;
|
isPlayerScav: boolean;
|
||||||
health: ISyncHealthRequestData;
|
health: ISyncHealthRequestData;
|
||||||
|
@ -4,4 +4,5 @@ export interface IAddItemTempObject {
|
|||||||
count: number;
|
count: number;
|
||||||
isPreset: boolean;
|
isPreset: boolean;
|
||||||
location?: Location;
|
location?: Location;
|
||||||
|
containerId?: string;
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,13 @@ export interface INotifierChannel {
|
|||||||
ws: string;
|
ws: string;
|
||||||
}
|
}
|
||||||
export interface INotification {
|
export interface INotification {
|
||||||
type: "RagfairOfferSold" | "new_message" | "ping";
|
type: NotificationType;
|
||||||
eventId: string;
|
eventId: string;
|
||||||
dialogId?: string;
|
dialogId?: string;
|
||||||
message?: Message;
|
message?: Message;
|
||||||
}
|
}
|
||||||
|
export declare enum NotificationType {
|
||||||
|
RAGFAIR_OFFER_SOLD = "RagfairOfferSold",
|
||||||
|
NEW_MESSAGE = "new_message",
|
||||||
|
PING = "ping"
|
||||||
|
}
|
||||||
|
@ -62,7 +62,7 @@ export interface DialogueInfo {
|
|||||||
_id: string;
|
_id: string;
|
||||||
type: MessageType;
|
type: MessageType;
|
||||||
pinned: boolean;
|
pinned: boolean;
|
||||||
Users?: any[];
|
Users?: IUserDialogInfo[];
|
||||||
message: MessagePreview;
|
message: MessagePreview;
|
||||||
}
|
}
|
||||||
export interface Message {
|
export interface Message {
|
||||||
@ -76,7 +76,7 @@ export interface Message {
|
|||||||
text?: string;
|
text?: string;
|
||||||
hasRewards: boolean;
|
hasRewards: boolean;
|
||||||
rewardCollected: boolean;
|
rewardCollected: boolean;
|
||||||
items: MessageItems;
|
items?: MessageItems;
|
||||||
maxStorageTime?: number;
|
maxStorageTime?: number;
|
||||||
systemData?: ISystemData;
|
systemData?: ISystemData;
|
||||||
profileChangeEvents?: any[];
|
profileChangeEvents?: any[];
|
||||||
@ -116,6 +116,7 @@ export interface DateTime {
|
|||||||
export interface Aki {
|
export interface Aki {
|
||||||
version: string;
|
version: string;
|
||||||
mods?: ModDetails[];
|
mods?: ModDetails[];
|
||||||
|
receivedGifts: ReceivedGift[];
|
||||||
}
|
}
|
||||||
export interface ModDetails {
|
export interface ModDetails {
|
||||||
name: string;
|
name: string;
|
||||||
@ -123,6 +124,10 @@ export interface ModDetails {
|
|||||||
author: string;
|
author: string;
|
||||||
dateAdded: number;
|
dateAdded: number;
|
||||||
}
|
}
|
||||||
|
export interface ReceivedGift {
|
||||||
|
giftId: string;
|
||||||
|
timestampAccepted: number;
|
||||||
|
}
|
||||||
export interface Vitality {
|
export interface Vitality {
|
||||||
health: Health;
|
health: Health;
|
||||||
effects: Effects;
|
effects: Effects;
|
||||||
|
@ -34,6 +34,7 @@ export declare enum BaseClasses {
|
|||||||
MAP = "567849dd4bdc2d150f8b456e",
|
MAP = "567849dd4bdc2d150f8b456e",
|
||||||
MONEY = "543be5dd4bdc2deb348b4569",
|
MONEY = "543be5dd4bdc2deb348b4569",
|
||||||
NIGHTVISION = "5a2c3a9486f774688b05e574",
|
NIGHTVISION = "5a2c3a9486f774688b05e574",
|
||||||
|
THERMAL_VISION = "5d21f59b6dbe99052b54ef83",
|
||||||
KEY = "543be5e94bdc2df1348b4568",
|
KEY = "543be5e94bdc2df1348b4568",
|
||||||
KEY_MECHANICAL = "5c99f98d86f7745c314214b3",
|
KEY_MECHANICAL = "5c99f98d86f7745c314214b3",
|
||||||
KEYCARD = "5c164d2286f774194c5e69fa",
|
KEYCARD = "5c164d2286f774194c5e69fa",
|
||||||
@ -91,5 +92,10 @@ export declare enum BaseClasses {
|
|||||||
SILENCER = "550aa4cd4bdc2dd8348b456c",
|
SILENCER = "550aa4cd4bdc2dd8348b456c",
|
||||||
PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc",
|
PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc",
|
||||||
ITEM = "54009119af1c881c07000029",
|
ITEM = "54009119af1c881c07000029",
|
||||||
CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25"
|
CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25",
|
||||||
|
AUXILARY_MOD = "5a74651486f7744e73386dd1",
|
||||||
|
BIPOD = "55818afb4bdc2dde698b456d",
|
||||||
|
HEADPHONES = "5645bcb74bdc2ded0b8b4578",
|
||||||
|
RANDOM_LOOT_CONTAINER = "62f109593b54472778797866",
|
||||||
|
STACKABLE_ITEM = "5661632d4bdc2d903d8b456b"
|
||||||
}
|
}
|
||||||
|
@ -21,5 +21,6 @@ export declare enum ConfigTypes {
|
|||||||
TRADER = "aki-trader",
|
TRADER = "aki-trader",
|
||||||
WEATHER = "aki-weather",
|
WEATHER = "aki-weather",
|
||||||
SEASONAL_EVENT = "aki-seasonalevents",
|
SEASONAL_EVENT = "aki-seasonalevents",
|
||||||
LOST_ON_DEATH = "aki-lostondeath"
|
LOST_ON_DEATH = "aki-lostondeath",
|
||||||
|
GIFTS = "aki-gifts"
|
||||||
}
|
}
|
||||||
|
5
TypeScript/1LogToConsole/types/models/enums/GiftSenderType.d.ts
vendored
Normal file
5
TypeScript/1LogToConsole/types/models/enums/GiftSenderType.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export declare enum GiftSenderType {
|
||||||
|
SYSTEM = "System",
|
||||||
|
TRADER = "Trader",
|
||||||
|
USER = "User"
|
||||||
|
}
|
6
TypeScript/1LogToConsole/types/models/enums/GiftSentResult.d.ts
vendored
Normal file
6
TypeScript/1LogToConsole/types/models/enums/GiftSentResult.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export declare enum GiftSentResult {
|
||||||
|
FAILED_UNKNOWN = 1,
|
||||||
|
FAILED_GIFT_ALREADY_RECEIVED = 2,
|
||||||
|
FAILED_GIFT_DOESNT_EXIST = 3,
|
||||||
|
SUCCESS = 4
|
||||||
|
}
|
7
TypeScript/1LogToConsole/types/models/enums/PlayerRaidEndState.d.ts
vendored
Normal file
7
TypeScript/1LogToConsole/types/models/enums/PlayerRaidEndState.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export declare enum PlayerRaidEndState {
|
||||||
|
SURVIVED = "survived",
|
||||||
|
LEFT = "left",
|
||||||
|
RUNNER = "runner",
|
||||||
|
MISSING_IN_ACTION = "missinginaction",
|
||||||
|
KILLED = "killed"
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
export declare enum SeasonalEventType {
|
export declare enum SeasonalEventType {
|
||||||
NONE = "None",
|
NONE = "None",
|
||||||
CHRISTMAS = "Christmas",
|
CHRISTMAS = "Christmas",
|
||||||
HALLOWEEN = "Halloween"
|
HALLOWEEN = "Halloween",
|
||||||
|
NEW_YEARS = "NewYears",
|
||||||
|
PROMO = "Promo"
|
||||||
}
|
}
|
||||||
|
28
TypeScript/1LogToConsole/types/models/spt/config/IGiftsConfig.d.ts
vendored
Normal file
28
TypeScript/1LogToConsole/types/models/spt/config/IGiftsConfig.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { Item } from "../../../models/eft/common/tables/IItem";
|
||||||
|
import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile";
|
||||||
|
import { GiftSenderType } from "../../../models/enums/GiftSenderType";
|
||||||
|
import { SeasonalEventType } from "../../../models/enums/SeasonalEventType";
|
||||||
|
import { Traders } from "../../../models/enums/Traders";
|
||||||
|
import { IBaseConfig } from "./IBaseConfig";
|
||||||
|
export interface IGiftsConfig extends IBaseConfig {
|
||||||
|
kind: "aki-gifts";
|
||||||
|
gifts: Record<string, Gift>;
|
||||||
|
}
|
||||||
|
export interface Gift {
|
||||||
|
/** Items to send to player */
|
||||||
|
items: Item[];
|
||||||
|
/** Who is sending the gift to player */
|
||||||
|
sender: GiftSenderType;
|
||||||
|
/** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */
|
||||||
|
senderId?: string;
|
||||||
|
senderDetails: IUserDialogInfo;
|
||||||
|
/** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */
|
||||||
|
trader?: Traders;
|
||||||
|
messageText: string;
|
||||||
|
/** Optional - if sending text from the client locale file */
|
||||||
|
localeTextId?: string;
|
||||||
|
/** Optional - Used by Seasonal events to send on specific day */
|
||||||
|
timestampToSend?: number;
|
||||||
|
associatedEvent: SeasonalEventType;
|
||||||
|
collectionTimeHours: number;
|
||||||
|
}
|
@ -24,8 +24,12 @@ export interface FenceConfig {
|
|||||||
presetPriceMult: number;
|
presetPriceMult: number;
|
||||||
armorMaxDurabilityPercentMinMax: MinMax;
|
armorMaxDurabilityPercentMinMax: MinMax;
|
||||||
presetMaxDurabilityPercentMinMax: MinMax;
|
presetMaxDurabilityPercentMinMax: MinMax;
|
||||||
|
/** Key: item tpl */
|
||||||
|
itemStackSizeOverrideMinMax: Record<string, MinMax>;
|
||||||
itemTypeLimits: Record<string, number>;
|
itemTypeLimits: Record<string, number>;
|
||||||
regenerateAssortsOnRefresh: boolean;
|
regenerateAssortsOnRefresh: boolean;
|
||||||
|
/** Block seasonal items from appearing when season is inactive */
|
||||||
|
blacklistSeasonalItems: boolean;
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
}
|
}
|
||||||
export interface DiscountOptions {
|
export interface DiscountOptions {
|
||||||
|
30
TypeScript/1LogToConsole/types/models/spt/dialog/ISendMessageDetails.d.ts
vendored
Normal file
30
TypeScript/1LogToConsole/types/models/spt/dialog/ISendMessageDetails.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import { Item } from "../../../models/eft/common/tables/IItem";
|
||||||
|
import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile";
|
||||||
|
import { MessageType } from "../../../models/enums/MessageType";
|
||||||
|
import { Traders } from "../../../models/enums/Traders";
|
||||||
|
export interface ISendMessageDetails {
|
||||||
|
/** Player id */
|
||||||
|
recipientId: string;
|
||||||
|
/** Who is sending this message */
|
||||||
|
sender: MessageType;
|
||||||
|
/** Optional - leave blank to use sender value */
|
||||||
|
dialogType?: MessageType;
|
||||||
|
/** Optional - if sender is USER these details are used */
|
||||||
|
senderDetails?: IUserDialogInfo;
|
||||||
|
/** Optional - the trader sending the message */
|
||||||
|
trader?: Traders;
|
||||||
|
/** Optional - used in player/system messages, otherwise templateId is used */
|
||||||
|
messageText?: string;
|
||||||
|
/** Optinal - Items to send to player */
|
||||||
|
items?: Item[];
|
||||||
|
/** Optional - How long items will be stored in mail before expiry */
|
||||||
|
itemsMaxStorageLifetimeSeconds?: number;
|
||||||
|
/** Optional - Used when sending messages from traders who send text from locale json */
|
||||||
|
templateId?: string;
|
||||||
|
/** Optional - ragfair related */
|
||||||
|
systemData?: ISystemData;
|
||||||
|
/** Optional - Used by ragfair messages */
|
||||||
|
ragfairDetails?: MessageContentRagfair;
|
||||||
|
/** Optional - Usage not known, unsure of purpose, even dumps dont have it */
|
||||||
|
profileChangeEvents?: any[];
|
||||||
|
}
|
@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener {
|
|||||||
handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void;
|
handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void;
|
||||||
sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void;
|
sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void;
|
||||||
getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string;
|
getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string;
|
||||||
protected getBodyInfo(body: Buffer): any;
|
protected getBodyInfo(body: Buffer, requestUrl?: any): any;
|
||||||
sendJson(resp: ServerResponse, output: string, sessionID: string): void;
|
sendJson(resp: ServerResponse, output: string, sessionID: string): void;
|
||||||
sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void;
|
sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void;
|
||||||
}
|
}
|
||||||
|
@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { VFS } from "../utils/VFS";
|
import { VFS } from "../utils/VFS";
|
||||||
|
import { LocalisationService } from "./LocalisationService";
|
||||||
/** Store a mapping between weapons, their slots and the items that fit those slots */
|
/** Store a mapping between weapons, their slots and the items that fit those slots */
|
||||||
export declare class BotEquipmentModPoolService {
|
export declare class BotEquipmentModPoolService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected weaponModPool: Mods;
|
protected weaponModPool: Mods;
|
||||||
protected gearModPool: Mods;
|
protected gearModPool: Mods;
|
||||||
protected weaponPoolGenerated: boolean;
|
protected weaponPoolGenerated: boolean;
|
||||||
protected armorPoolGenerated: boolean;
|
protected armorPoolGenerated: boolean;
|
||||||
constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Store dictionary of mods for each item passed in
|
* Store dictionary of mods for each item passed in
|
||||||
* @param items items to find related mods and store in modPool
|
* @param items items to find related mods and store in modPool
|
||||||
|
@ -139,6 +139,12 @@ export declare class FenceService {
|
|||||||
current: number;
|
current: number;
|
||||||
max: number;
|
max: number;
|
||||||
}>, loyaltyLevel: number): void;
|
}>, loyaltyLevel: number): void;
|
||||||
|
/**
|
||||||
|
* Get stack size ofr a singular item (no mods)
|
||||||
|
* @param itemDbDetails item being added to fence
|
||||||
|
* @returns Stack size
|
||||||
|
*/
|
||||||
|
protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number;
|
||||||
/**
|
/**
|
||||||
* Add preset weapons to fence presets
|
* Add preset weapons to fence presets
|
||||||
* @param assortCount how many assorts to add to assorts
|
* @param assortCount how many assorts to add to assorts
|
||||||
|
50
TypeScript/1LogToConsole/types/services/GiftService.d.ts
vendored
Normal file
50
TypeScript/1LogToConsole/types/services/GiftService.d.ts
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { GiftSentResult } from "../models/enums/GiftSentResult";
|
||||||
|
import { MessageType } from "../models/enums/MessageType";
|
||||||
|
import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { MailSendService } from "./MailSendService";
|
||||||
|
export declare class GiftService {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected giftConfig: IGiftsConfig;
|
||||||
|
constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Does a gift with a specific ID exist in db
|
||||||
|
* @param giftId Gift id to check for
|
||||||
|
* @returns True if it exists in db
|
||||||
|
*/
|
||||||
|
giftExists(giftId: string): boolean;
|
||||||
|
/**
|
||||||
|
* Send player a gift from a range of sources
|
||||||
|
* @param playerId Player to send gift to / sessionId
|
||||||
|
* @param giftId Id of gift in configs/gifts.json to send player
|
||||||
|
* @returns outcome of sending gift to player
|
||||||
|
*/
|
||||||
|
sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult;
|
||||||
|
/**
|
||||||
|
* Get sender id based on gifts sender type enum
|
||||||
|
* @param giftData Gift to send player
|
||||||
|
* @returns trader/user/system id
|
||||||
|
*/
|
||||||
|
protected getSenderId(giftData: Gift): string;
|
||||||
|
/**
|
||||||
|
* Convert GiftSenderType into a dialog MessageType
|
||||||
|
* @param giftData Gift to send player
|
||||||
|
* @returns MessageType enum value
|
||||||
|
*/
|
||||||
|
protected getMessageType(giftData: Gift): MessageType;
|
||||||
|
/**
|
||||||
|
* Prapor sends gifts to player for first week after profile creation
|
||||||
|
* @param sessionId Player id
|
||||||
|
* @param day What day to give gift for
|
||||||
|
*/
|
||||||
|
sendPraporStartingGift(sessionId: string, day: number): void;
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
||||||
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
@ -22,6 +23,7 @@ export declare class InsuranceService {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected secureContainerHelper: SecureContainerHelper;
|
protected secureContainerHelper: SecureContainerHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
@ -33,23 +35,25 @@ export declare class InsuranceService {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
/**
|
||||||
|
* Get all insured items by all traders for a profile
|
||||||
|
* @param sessionId Profile id (session id)
|
||||||
|
* @returns Item array
|
||||||
|
*/
|
||||||
getInsurance(sessionId: string): Record<string, Item[]>;
|
getInsurance(sessionId: string): Record<string, Item[]>;
|
||||||
|
/**
|
||||||
|
* Get insured items by profile id + trader id
|
||||||
|
* @param sessionId Profile id (session id)
|
||||||
|
* @param traderId Trader items were insured with
|
||||||
|
* @returns Item array
|
||||||
|
*/
|
||||||
getInsuranceItems(sessionId: string, traderId: string): Item[];
|
getInsuranceItems(sessionId: string, traderId: string): Item[];
|
||||||
resetInsurance(sessionId: string): void;
|
resetInsurance(sessionId: string): void;
|
||||||
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
|
||||||
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void;
|
|
||||||
/**
|
|
||||||
* Get the rouble price for an item by templateId
|
|
||||||
* @param itemTpl item tpl to get handbook price for
|
|
||||||
* @returns handbook price in roubles, Return 0 if not found
|
|
||||||
*/
|
|
||||||
getItemPrice(itemTpl: string): number;
|
|
||||||
/**
|
/**
|
||||||
* Sends stored insured items as message to player
|
* Sends stored insured items as message to player
|
||||||
* @param pmcData profile to modify
|
* @param pmcData profile to send insured items to
|
||||||
* @param sessionID SessionId of current player
|
* @param sessionID SessionId of current player
|
||||||
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
||||||
*/
|
*/
|
||||||
@ -59,11 +63,17 @@ export declare class InsuranceService {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
*/
|
*/
|
||||||
sendLostInsuranceMessage(sessionID: string): void;
|
sendLostInsuranceMessage(sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Check all root insured items and remove location property + set slotId to 'hideout'
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param traderId Trader id
|
||||||
|
*/
|
||||||
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
||||||
/**
|
/**
|
||||||
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
* Get a timestamp of when insurance items should be sent to player based on trader used to insure
|
||||||
|
* Apply insurance return bonus if found in profile
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param trader Trader used to insure items
|
* @param trader Trader base used to insure items
|
||||||
* @returns Timestamp to return items to player in seconds
|
* @returns Timestamp to return items to player in seconds
|
||||||
*/
|
*/
|
||||||
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number;
|
||||||
@ -90,5 +100,32 @@ export declare class InsuranceService {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
*/
|
*/
|
||||||
protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void;
|
protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Does insurance exist for a player and by trader
|
||||||
|
* @param sessionId Player id (session id)
|
||||||
|
* @param traderId Trader items insured with
|
||||||
|
* @returns True if exists
|
||||||
|
*/
|
||||||
|
protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
||||||
|
/**
|
||||||
|
* Empty out array holding insured items by sessionid + traderid
|
||||||
|
* @param sessionId Player id (session id)
|
||||||
|
* @param traderId Trader items insured with
|
||||||
|
*/
|
||||||
|
resetInsuranceTraderArray(sessionId: string, traderId: string): void;
|
||||||
|
/**
|
||||||
|
* Store insured item
|
||||||
|
* @param sessionId Player id (session id)
|
||||||
|
* @param traderId Trader item insured with
|
||||||
|
* @param itemToAdd Insured item
|
||||||
|
*/
|
||||||
|
addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void;
|
||||||
|
/**
|
||||||
|
* Get price of insurance * multiplier from config
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param inventoryItem Item to be insured
|
||||||
|
* @param traderId Trader item is insured with
|
||||||
|
* @returns price in roubles
|
||||||
|
*/
|
||||||
getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number;
|
getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number;
|
||||||
}
|
}
|
||||||
|
111
TypeScript/1LogToConsole/types/services/MailSendService.d.ts
vendored
Normal file
111
TypeScript/1LogToConsole/types/services/MailSendService.d.ts
vendored
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
||||||
|
import { NotifierHelper } from "../helpers/NotifierHelper";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { MessageType } from "../models/enums/MessageType";
|
||||||
|
import { Traders } from "../models/enums/Traders";
|
||||||
|
import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { LocalisationService } from "./LocalisationService";
|
||||||
|
export declare class MailSendService {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected notifierHelper: NotifierHelper;
|
||||||
|
protected notificationSendHelper: NotificationSendHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected readonly systemSenderId = "59e7125688a45068a6249071";
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||||
|
/**
|
||||||
|
* Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale
|
||||||
|
* @param playerId Players id to send message to
|
||||||
|
* @param sender The trader sending the message
|
||||||
|
* @param messageType What type the message will assume (e.g. QUEST_SUCCESS)
|
||||||
|
* @param message Text to send to the player
|
||||||
|
* @param items Optional items to send to player
|
||||||
|
* @param maxStorageTimeSeconds Optional time to collect items before they expire
|
||||||
|
*/
|
||||||
|
sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void;
|
||||||
|
/**
|
||||||
|
* Send a message from an NPC (e.g. prapor) to the player with or without items
|
||||||
|
* @param playerId Players id to send message to
|
||||||
|
* @param sender The trader sending the message
|
||||||
|
* @param messageType What type the message will assume (e.g. QUEST_SUCCESS)
|
||||||
|
* @param messageLocaleId The localised text to send to player
|
||||||
|
* @param items Optional items to send to player
|
||||||
|
* @param maxStorageTimeSeconds Optional time to collect items before they expire
|
||||||
|
*/
|
||||||
|
sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void;
|
||||||
|
/**
|
||||||
|
* Send a message from SYSTEM to the player with or without items
|
||||||
|
* @param playerId Players id to send message to
|
||||||
|
* @param message The text to send to player
|
||||||
|
* @param items Optional items to send to player
|
||||||
|
* @param maxStorageTimeSeconds Optional time to collect items before they expire
|
||||||
|
*/
|
||||||
|
sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void;
|
||||||
|
/**
|
||||||
|
* Send a USER message to a player with or without items
|
||||||
|
* @param playerId Players id to send message to
|
||||||
|
* @param senderId Who is sending the message
|
||||||
|
* @param message The text to send to player
|
||||||
|
* @param items Optional items to send to player
|
||||||
|
* @param maxStorageTimeSeconds Optional time to collect items before they expire
|
||||||
|
*/
|
||||||
|
sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void;
|
||||||
|
/**
|
||||||
|
* Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER)
|
||||||
|
* Helper functions in this class are availble to simplify common actions
|
||||||
|
* @param messageDetails Details needed to send a message to the player
|
||||||
|
*/
|
||||||
|
sendMessageToPlayer(messageDetails: ISendMessageDetails): void;
|
||||||
|
/**
|
||||||
|
* Send a message from the player to an NPC
|
||||||
|
* @param sessionId Player id
|
||||||
|
* @param targetNpcId NPC message is sent to
|
||||||
|
* @param message Text to send to NPC
|
||||||
|
*/
|
||||||
|
sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void;
|
||||||
|
/**
|
||||||
|
* Create a message for storage inside a dialog in the player profile
|
||||||
|
* @param senderDialog Id of dialog that will hold the message
|
||||||
|
* @param messageDetails Various details on what the message must contain/do
|
||||||
|
* @returns Message
|
||||||
|
*/
|
||||||
|
protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message;
|
||||||
|
/**
|
||||||
|
* Add items to message and adjust various properties to reflect the items being added
|
||||||
|
* @param message Message to add items to
|
||||||
|
* @param itemsToSendToPlayer Items to add to message
|
||||||
|
* @param maxStorageTimeSeconds total time items are stored in mail before being deleted
|
||||||
|
*/
|
||||||
|
protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void;
|
||||||
|
/**
|
||||||
|
* perform various sanitising actions on the items before they're considered ready for insertion into message
|
||||||
|
* @param dialogType The type of the dialog that will hold the reward items being processed
|
||||||
|
* @param messageDetails
|
||||||
|
* @returns Sanitised items
|
||||||
|
*/
|
||||||
|
protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems;
|
||||||
|
/**
|
||||||
|
* Get a dialog with a specified entity (user/trader)
|
||||||
|
* Create and store empty dialog if none exists in profile
|
||||||
|
* @param messageDetails Data on what message should do
|
||||||
|
* @returns Relevant Dialogue
|
||||||
|
*/
|
||||||
|
protected getDialog(messageDetails: ISendMessageDetails): Dialogue;
|
||||||
|
/**
|
||||||
|
* Get the appropriate sender id by the sender enum type
|
||||||
|
* @param messageDetails
|
||||||
|
* @returns gets an id of the individual sending it
|
||||||
|
*/
|
||||||
|
protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string;
|
||||||
|
}
|
@ -1,10 +1,12 @@
|
|||||||
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { LocalisationService } from "./LocalisationService";
|
||||||
/** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */
|
/** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */
|
||||||
export declare class MatchBotDetailsCacheService {
|
export declare class MatchBotDetailsCacheService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected botDetailsCache: Record<string, IBotBase>;
|
protected botDetailsCache: Record<string, IBotBase>;
|
||||||
constructor(logger: ILogger);
|
constructor(logger: ILogger, localisationService: LocalisationService);
|
||||||
/**
|
/**
|
||||||
* Store a bot in the cache, keyed by its name
|
* Store a bot in the cache, keyed by its name
|
||||||
* @param botToCache Bot details to cache
|
* @param botToCache Bot details to cache
|
||||||
|
@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { LocalisationService } from "./LocalisationService";
|
||||||
/**
|
/**
|
||||||
* Stores flea prices for items as well as methods to interact with them
|
* Stores flea prices for items as well as methods to interact with them
|
||||||
*/
|
*/
|
||||||
@ -23,12 +24,13 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected generatedDynamicPrices: boolean;
|
protected generatedDynamicPrices: boolean;
|
||||||
protected generatedStaticPrices: boolean;
|
protected generatedStaticPrices: boolean;
|
||||||
protected prices: IRagfairServerPrices;
|
protected prices: IRagfairServerPrices;
|
||||||
constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer);
|
constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
||||||
*/
|
*/
|
||||||
@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
* @param item base weapon
|
* @param item base weapon
|
||||||
* @param items weapon plus mods
|
* @param items weapon plus mods
|
||||||
* @param existingPrice price of existing base weapon
|
* @param existingPrice price of existing base weapon
|
||||||
* @returns
|
* @returns price of weapon in roubles
|
||||||
*/
|
*/
|
||||||
protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
|
protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
|
||||||
/**
|
/**
|
||||||
|
@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { LocalisationService } from "./LocalisationService";
|
||||||
import { PaymentService } from "./PaymentService";
|
import { PaymentService } from "./PaymentService";
|
||||||
export declare class RepairService {
|
export declare class RepairService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
@ -25,9 +26,10 @@ export declare class RepairService {
|
|||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected repairHelper: RepairHelper;
|
protected repairHelper: RepairHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected repairConfig: IRepairConfig;
|
protected repairConfig: IRepairConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Use trader to repair an items durability
|
* Use trader to repair an items durability
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { IConfig } from "../models/eft/common/IGlobals";
|
import { IConfig } from "../models/eft/common/IGlobals";
|
||||||
import { Inventory } from "../models/eft/common/tables/IBotType";
|
import { Inventory } from "../models/eft/common/tables/IBotType";
|
||||||
import { SeasonalEventType } from "../models/enums/SeasonalEventType";
|
import { SeasonalEventType } from "../models/enums/SeasonalEventType";
|
||||||
@ -9,18 +10,21 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { DatabaseImporter } from "../utils/DatabaseImporter";
|
import { DatabaseImporter } from "../utils/DatabaseImporter";
|
||||||
|
import { GiftService } from "./GiftService";
|
||||||
import { LocalisationService } from "./LocalisationService";
|
import { LocalisationService } from "./LocalisationService";
|
||||||
export declare class SeasonalEventService {
|
export declare class SeasonalEventService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected databaseImporter: DatabaseImporter;
|
protected databaseImporter: DatabaseImporter;
|
||||||
|
protected giftService: GiftService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected seasonalEventConfig: ISeasonalEventConfig;
|
protected seasonalEventConfig: ISeasonalEventConfig;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||||
protected get christmasEventItems(): string[];
|
protected get christmasEventItems(): string[];
|
||||||
protected get halloweenEventItems(): string[];
|
protected get halloweenEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
@ -48,7 +52,7 @@ export declare class SeasonalEventService {
|
|||||||
*/
|
*/
|
||||||
getAllSeasonalEventItems(): string[];
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as seasonal is not active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
*/
|
*/
|
||||||
getSeasonalEventItemsToBlock(): string[];
|
getSeasonalEventItemsToBlock(): string[];
|
||||||
@ -92,8 +96,9 @@ export declare class SeasonalEventService {
|
|||||||
isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean;
|
isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean;
|
||||||
/**
|
/**
|
||||||
* Check if current date falls inside any of the seasons events pased in, if so, handle them
|
* Check if current date falls inside any of the seasons events pased in, if so, handle them
|
||||||
|
* @param sessionId Players id
|
||||||
*/
|
*/
|
||||||
checkForAndEnableSeasonalEvents(): void;
|
checkForAndEnableSeasonalEvents(sessionId: string): void;
|
||||||
/**
|
/**
|
||||||
* Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService)
|
* Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService)
|
||||||
* @param nodeInventory Bots inventory to iterate over
|
* @param nodeInventory Bots inventory to iterate over
|
||||||
@ -102,10 +107,11 @@ export declare class SeasonalEventService {
|
|||||||
removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void;
|
removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void;
|
||||||
/**
|
/**
|
||||||
* Make adjusted to server code based on the name of the event passed in
|
* Make adjusted to server code based on the name of the event passed in
|
||||||
|
* @param sessionId Player id
|
||||||
* @param globalConfig globals.json
|
* @param globalConfig globals.json
|
||||||
* @param eventName Name of the event to enable. e.g. Christmas
|
* @param eventName Name of the event to enable. e.g. Christmas
|
||||||
*/
|
*/
|
||||||
protected updateGlobalEvents(globalConfig: IConfig, eventType: SeasonalEventType): void;
|
protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void;
|
||||||
/**
|
/**
|
||||||
* Change trader icons to be more event themed (Halloween only so far)
|
* Change trader icons to be more event themed (Halloween only so far)
|
||||||
* @param eventType What event is active
|
* @param eventType What event is active
|
||||||
@ -129,4 +135,10 @@ export declare class SeasonalEventService {
|
|||||||
* Add santa to maps
|
* Add santa to maps
|
||||||
*/
|
*/
|
||||||
protected addGifterBotToMaps(): void;
|
protected addGifterBotToMaps(): void;
|
||||||
|
/**
|
||||||
|
* Send gift to player if they'e not already received it
|
||||||
|
* @param playerId Player to send gift to
|
||||||
|
* @param giftkey Key of gift to give
|
||||||
|
*/
|
||||||
|
protected giveGift(playerId: string, giftkey: string): void;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
|||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { LocalisationService } from "./LocalisationService";
|
||||||
/**
|
/**
|
||||||
* Help with storing limited item purchases from traders in profile to persist them over server restarts
|
* Help with storing limited item purchases from traders in profile to persist them over server restarts
|
||||||
*/
|
*/
|
||||||
@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get the purchases made from a trader for this profile before the last trader reset
|
* Get the purchases made from a trader for this profile before the last trader reset
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user