Update types
This commit is contained in:
parent
aeac2053d3
commit
af9cacc6e9
@ -43,6 +43,11 @@ export declare class GameController {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it
|
||||||
|
* @param pmcProfile Player profile
|
||||||
|
*/
|
||||||
|
protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* When player logs in, iterate over all active effects and reduce timer
|
* When player logs in, iterate over all active effects and reduce timer
|
||||||
* TODO - add body part HP regen
|
* TODO - add body part HP regen
|
||||||
|
@ -4,7 +4,8 @@ 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 { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
@ -124,6 +125,22 @@ export declare class QuestController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log that repeatable quest failed a condition check
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showRepeatableQuestInvalidConditionError(handoverQuestRequest: IHandoverQuestRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log quest item handed over did not match what is required
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param itemHandedOver Non-matching item found
|
||||||
|
* @param handoverRequirements Quest handover requirements
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showQuestItemHandoverMatchError(handoverQuestRequest: IHandoverQuestRequestData, itemHandedOver: Item, handoverRequirements: AvailableForConditions, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Increment a backend counter stored value by an amount,
|
* Increment a backend counter stored value by an amount,
|
||||||
* Create counter if it does not exist
|
* Create counter if it does not exist
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
import { IInventoryConfig } from "../models/spt/config/IInventoryConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class PaymentHelper {
|
export declare class PaymentHelper {
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Check whether tpl is Money
|
* Is the passed in tpl money (also checks custom currencies in inventoryConfig.customMoneyTpls)
|
||||||
* @param {string} tpl
|
* @param {string} tpl
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
|
@ -3,6 +3,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
kind: "aki-inventory";
|
kind: "aki-inventory";
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, RewardDetails>;
|
||||||
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
|
customMoneyTpls: string[];
|
||||||
}
|
}
|
||||||
export interface RewardDetails {
|
export interface RewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -16,7 +16,7 @@ export declare class PmcChatResponseService {
|
|||||||
protected pmcResponsesConfig: IPmcChatResponse;
|
protected pmcResponsesConfig: IPmcChatResponse;
|
||||||
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Chooses a random victim from those provided and sends a message to the player, can be positive or negative
|
* For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param pmcVictims Array of bots killed by player
|
* @param pmcVictims Array of bots killed by player
|
||||||
*/
|
*/
|
||||||
@ -46,11 +46,11 @@ export declare class PmcChatResponseService {
|
|||||||
*/
|
*/
|
||||||
protected allCaps(isVictim: boolean): boolean;
|
protected allCaps(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Should the word 'bro' be appended to the message being sent to player
|
* Should a suffix be appended to the end of the message being sent to player
|
||||||
* @param isVictim Was responder a victim of player
|
* @param isVictim Was responder a victim of player
|
||||||
* @returns true = should be stripped
|
* @returns true = should be stripped
|
||||||
*/
|
*/
|
||||||
appendBroToMessageEnd(isVictim: boolean): boolean;
|
appendSuffixToMessageEnd(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Choose a type of response based on the weightings in pmc response config
|
* Choose a type of response based on the weightings in pmc response config
|
||||||
* @param isVictim Was responder killed by player
|
* @param isVictim Was responder killed by player
|
||||||
@ -64,10 +64,21 @@ export declare class PmcChatResponseService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
||||||
|
/**
|
||||||
|
* Get all locale keys that start with `pmcresponse-suffix`
|
||||||
|
* @returns array of keys
|
||||||
|
*/
|
||||||
|
protected getResponseSuffixLocaleKeys(): string[];
|
||||||
/**
|
/**
|
||||||
* Randomly draw a victim of the the array and return thier details
|
* Randomly draw a victim of the the array and return thier details
|
||||||
* @param pmcVictims Possible victims to choose from
|
* @param pmcVictims Possible victims to choose from
|
||||||
* @returns IUserDialogInfo
|
* @returns IUserDialogInfo
|
||||||
*/
|
*/
|
||||||
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
||||||
|
/**
|
||||||
|
* Convert a victim object into a IUserDialogInfo object
|
||||||
|
* @param pmcVictim victim to convert
|
||||||
|
* @returns IUserDialogInfo
|
||||||
|
*/
|
||||||
|
protected getVictimDetails(pmcVictim: Victim): IUserDialogInfo;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,11 @@ export declare class GameController {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it
|
||||||
|
* @param pmcProfile Player profile
|
||||||
|
*/
|
||||||
|
protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* When player logs in, iterate over all active effects and reduce timer
|
* When player logs in, iterate over all active effects and reduce timer
|
||||||
* TODO - add body part HP regen
|
* TODO - add body part HP regen
|
||||||
|
@ -4,7 +4,8 @@ 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 { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
@ -124,6 +125,22 @@ export declare class QuestController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log that repeatable quest failed a condition check
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showRepeatableQuestInvalidConditionError(handoverQuestRequest: IHandoverQuestRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log quest item handed over did not match what is required
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param itemHandedOver Non-matching item found
|
||||||
|
* @param handoverRequirements Quest handover requirements
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showQuestItemHandoverMatchError(handoverQuestRequest: IHandoverQuestRequestData, itemHandedOver: Item, handoverRequirements: AvailableForConditions, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Increment a backend counter stored value by an amount,
|
* Increment a backend counter stored value by an amount,
|
||||||
* Create counter if it does not exist
|
* Create counter if it does not exist
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
import { IInventoryConfig } from "../models/spt/config/IInventoryConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class PaymentHelper {
|
export declare class PaymentHelper {
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Check whether tpl is Money
|
* Is the passed in tpl money (also checks custom currencies in inventoryConfig.customMoneyTpls)
|
||||||
* @param {string} tpl
|
* @param {string} tpl
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
|
@ -3,6 +3,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
kind: "aki-inventory";
|
kind: "aki-inventory";
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, RewardDetails>;
|
||||||
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
|
customMoneyTpls: string[];
|
||||||
}
|
}
|
||||||
export interface RewardDetails {
|
export interface RewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -16,7 +16,7 @@ export declare class PmcChatResponseService {
|
|||||||
protected pmcResponsesConfig: IPmcChatResponse;
|
protected pmcResponsesConfig: IPmcChatResponse;
|
||||||
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Chooses a random victim from those provided and sends a message to the player, can be positive or negative
|
* For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param pmcVictims Array of bots killed by player
|
* @param pmcVictims Array of bots killed by player
|
||||||
*/
|
*/
|
||||||
@ -46,11 +46,11 @@ export declare class PmcChatResponseService {
|
|||||||
*/
|
*/
|
||||||
protected allCaps(isVictim: boolean): boolean;
|
protected allCaps(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Should the word 'bro' be appended to the message being sent to player
|
* Should a suffix be appended to the end of the message being sent to player
|
||||||
* @param isVictim Was responder a victim of player
|
* @param isVictim Was responder a victim of player
|
||||||
* @returns true = should be stripped
|
* @returns true = should be stripped
|
||||||
*/
|
*/
|
||||||
appendBroToMessageEnd(isVictim: boolean): boolean;
|
appendSuffixToMessageEnd(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Choose a type of response based on the weightings in pmc response config
|
* Choose a type of response based on the weightings in pmc response config
|
||||||
* @param isVictim Was responder killed by player
|
* @param isVictim Was responder killed by player
|
||||||
@ -64,10 +64,21 @@ export declare class PmcChatResponseService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
||||||
|
/**
|
||||||
|
* Get all locale keys that start with `pmcresponse-suffix`
|
||||||
|
* @returns array of keys
|
||||||
|
*/
|
||||||
|
protected getResponseSuffixLocaleKeys(): string[];
|
||||||
/**
|
/**
|
||||||
* Randomly draw a victim of the the array and return thier details
|
* Randomly draw a victim of the the array and return thier details
|
||||||
* @param pmcVictims Possible victims to choose from
|
* @param pmcVictims Possible victims to choose from
|
||||||
* @returns IUserDialogInfo
|
* @returns IUserDialogInfo
|
||||||
*/
|
*/
|
||||||
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
||||||
|
/**
|
||||||
|
* Convert a victim object into a IUserDialogInfo object
|
||||||
|
* @param pmcVictim victim to convert
|
||||||
|
* @returns IUserDialogInfo
|
||||||
|
*/
|
||||||
|
protected getVictimDetails(pmcVictim: Victim): IUserDialogInfo;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,11 @@ export declare class GameController {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it
|
||||||
|
* @param pmcProfile Player profile
|
||||||
|
*/
|
||||||
|
protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* When player logs in, iterate over all active effects and reduce timer
|
* When player logs in, iterate over all active effects and reduce timer
|
||||||
* TODO - add body part HP regen
|
* TODO - add body part HP regen
|
||||||
|
@ -4,7 +4,8 @@ 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 { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
@ -124,6 +125,22 @@ export declare class QuestController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log that repeatable quest failed a condition check
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showRepeatableQuestInvalidConditionError(handoverQuestRequest: IHandoverQuestRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log quest item handed over did not match what is required
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param itemHandedOver Non-matching item found
|
||||||
|
* @param handoverRequirements Quest handover requirements
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showQuestItemHandoverMatchError(handoverQuestRequest: IHandoverQuestRequestData, itemHandedOver: Item, handoverRequirements: AvailableForConditions, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Increment a backend counter stored value by an amount,
|
* Increment a backend counter stored value by an amount,
|
||||||
* Create counter if it does not exist
|
* Create counter if it does not exist
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
import { IInventoryConfig } from "../models/spt/config/IInventoryConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class PaymentHelper {
|
export declare class PaymentHelper {
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Check whether tpl is Money
|
* Is the passed in tpl money (also checks custom currencies in inventoryConfig.customMoneyTpls)
|
||||||
* @param {string} tpl
|
* @param {string} tpl
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
|
@ -3,6 +3,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
kind: "aki-inventory";
|
kind: "aki-inventory";
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, RewardDetails>;
|
||||||
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
|
customMoneyTpls: string[];
|
||||||
}
|
}
|
||||||
export interface RewardDetails {
|
export interface RewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -16,7 +16,7 @@ export declare class PmcChatResponseService {
|
|||||||
protected pmcResponsesConfig: IPmcChatResponse;
|
protected pmcResponsesConfig: IPmcChatResponse;
|
||||||
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Chooses a random victim from those provided and sends a message to the player, can be positive or negative
|
* For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param pmcVictims Array of bots killed by player
|
* @param pmcVictims Array of bots killed by player
|
||||||
*/
|
*/
|
||||||
@ -46,11 +46,11 @@ export declare class PmcChatResponseService {
|
|||||||
*/
|
*/
|
||||||
protected allCaps(isVictim: boolean): boolean;
|
protected allCaps(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Should the word 'bro' be appended to the message being sent to player
|
* Should a suffix be appended to the end of the message being sent to player
|
||||||
* @param isVictim Was responder a victim of player
|
* @param isVictim Was responder a victim of player
|
||||||
* @returns true = should be stripped
|
* @returns true = should be stripped
|
||||||
*/
|
*/
|
||||||
appendBroToMessageEnd(isVictim: boolean): boolean;
|
appendSuffixToMessageEnd(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Choose a type of response based on the weightings in pmc response config
|
* Choose a type of response based on the weightings in pmc response config
|
||||||
* @param isVictim Was responder killed by player
|
* @param isVictim Was responder killed by player
|
||||||
@ -64,10 +64,21 @@ export declare class PmcChatResponseService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
||||||
|
/**
|
||||||
|
* Get all locale keys that start with `pmcresponse-suffix`
|
||||||
|
* @returns array of keys
|
||||||
|
*/
|
||||||
|
protected getResponseSuffixLocaleKeys(): string[];
|
||||||
/**
|
/**
|
||||||
* Randomly draw a victim of the the array and return thier details
|
* Randomly draw a victim of the the array and return thier details
|
||||||
* @param pmcVictims Possible victims to choose from
|
* @param pmcVictims Possible victims to choose from
|
||||||
* @returns IUserDialogInfo
|
* @returns IUserDialogInfo
|
||||||
*/
|
*/
|
||||||
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
||||||
|
/**
|
||||||
|
* Convert a victim object into a IUserDialogInfo object
|
||||||
|
* @param pmcVictim victim to convert
|
||||||
|
* @returns IUserDialogInfo
|
||||||
|
*/
|
||||||
|
protected getVictimDetails(pmcVictim: Victim): IUserDialogInfo;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,11 @@ export declare class GameController {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it
|
||||||
|
* @param pmcProfile Player profile
|
||||||
|
*/
|
||||||
|
protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* When player logs in, iterate over all active effects and reduce timer
|
* When player logs in, iterate over all active effects and reduce timer
|
||||||
* TODO - add body part HP regen
|
* TODO - add body part HP regen
|
||||||
|
@ -4,7 +4,8 @@ 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 { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
@ -124,6 +125,22 @@ export declare class QuestController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log that repeatable quest failed a condition check
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showRepeatableQuestInvalidConditionError(handoverQuestRequest: IHandoverQuestRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log quest item handed over did not match what is required
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param itemHandedOver Non-matching item found
|
||||||
|
* @param handoverRequirements Quest handover requirements
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showQuestItemHandoverMatchError(handoverQuestRequest: IHandoverQuestRequestData, itemHandedOver: Item, handoverRequirements: AvailableForConditions, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Increment a backend counter stored value by an amount,
|
* Increment a backend counter stored value by an amount,
|
||||||
* Create counter if it does not exist
|
* Create counter if it does not exist
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
import { IInventoryConfig } from "../models/spt/config/IInventoryConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class PaymentHelper {
|
export declare class PaymentHelper {
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Check whether tpl is Money
|
* Is the passed in tpl money (also checks custom currencies in inventoryConfig.customMoneyTpls)
|
||||||
* @param {string} tpl
|
* @param {string} tpl
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
|
@ -3,6 +3,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
kind: "aki-inventory";
|
kind: "aki-inventory";
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, RewardDetails>;
|
||||||
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
|
customMoneyTpls: string[];
|
||||||
}
|
}
|
||||||
export interface RewardDetails {
|
export interface RewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -16,7 +16,7 @@ export declare class PmcChatResponseService {
|
|||||||
protected pmcResponsesConfig: IPmcChatResponse;
|
protected pmcResponsesConfig: IPmcChatResponse;
|
||||||
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Chooses a random victim from those provided and sends a message to the player, can be positive or negative
|
* For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param pmcVictims Array of bots killed by player
|
* @param pmcVictims Array of bots killed by player
|
||||||
*/
|
*/
|
||||||
@ -46,11 +46,11 @@ export declare class PmcChatResponseService {
|
|||||||
*/
|
*/
|
||||||
protected allCaps(isVictim: boolean): boolean;
|
protected allCaps(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Should the word 'bro' be appended to the message being sent to player
|
* Should a suffix be appended to the end of the message being sent to player
|
||||||
* @param isVictim Was responder a victim of player
|
* @param isVictim Was responder a victim of player
|
||||||
* @returns true = should be stripped
|
* @returns true = should be stripped
|
||||||
*/
|
*/
|
||||||
appendBroToMessageEnd(isVictim: boolean): boolean;
|
appendSuffixToMessageEnd(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Choose a type of response based on the weightings in pmc response config
|
* Choose a type of response based on the weightings in pmc response config
|
||||||
* @param isVictim Was responder killed by player
|
* @param isVictim Was responder killed by player
|
||||||
@ -64,10 +64,21 @@ export declare class PmcChatResponseService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
||||||
|
/**
|
||||||
|
* Get all locale keys that start with `pmcresponse-suffix`
|
||||||
|
* @returns array of keys
|
||||||
|
*/
|
||||||
|
protected getResponseSuffixLocaleKeys(): string[];
|
||||||
/**
|
/**
|
||||||
* Randomly draw a victim of the the array and return thier details
|
* Randomly draw a victim of the the array and return thier details
|
||||||
* @param pmcVictims Possible victims to choose from
|
* @param pmcVictims Possible victims to choose from
|
||||||
* @returns IUserDialogInfo
|
* @returns IUserDialogInfo
|
||||||
*/
|
*/
|
||||||
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
||||||
|
/**
|
||||||
|
* Convert a victim object into a IUserDialogInfo object
|
||||||
|
* @param pmcVictim victim to convert
|
||||||
|
* @returns IUserDialogInfo
|
||||||
|
*/
|
||||||
|
protected getVictimDetails(pmcVictim: Victim): IUserDialogInfo;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,11 @@ export declare class GameController {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it
|
||||||
|
* @param pmcProfile Player profile
|
||||||
|
*/
|
||||||
|
protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* When player logs in, iterate over all active effects and reduce timer
|
* When player logs in, iterate over all active effects and reduce timer
|
||||||
* TODO - add body part HP regen
|
* TODO - add body part HP regen
|
||||||
|
@ -4,7 +4,8 @@ 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 { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
@ -124,6 +125,22 @@ export declare class QuestController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log that repeatable quest failed a condition check
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showRepeatableQuestInvalidConditionError(handoverQuestRequest: IHandoverQuestRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log quest item handed over did not match what is required
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param itemHandedOver Non-matching item found
|
||||||
|
* @param handoverRequirements Quest handover requirements
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showQuestItemHandoverMatchError(handoverQuestRequest: IHandoverQuestRequestData, itemHandedOver: Item, handoverRequirements: AvailableForConditions, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Increment a backend counter stored value by an amount,
|
* Increment a backend counter stored value by an amount,
|
||||||
* Create counter if it does not exist
|
* Create counter if it does not exist
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
import { IInventoryConfig } from "../models/spt/config/IInventoryConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class PaymentHelper {
|
export declare class PaymentHelper {
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Check whether tpl is Money
|
* Is the passed in tpl money (also checks custom currencies in inventoryConfig.customMoneyTpls)
|
||||||
* @param {string} tpl
|
* @param {string} tpl
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
|
@ -3,6 +3,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
kind: "aki-inventory";
|
kind: "aki-inventory";
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, RewardDetails>;
|
||||||
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
|
customMoneyTpls: string[];
|
||||||
}
|
}
|
||||||
export interface RewardDetails {
|
export interface RewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -16,7 +16,7 @@ export declare class PmcChatResponseService {
|
|||||||
protected pmcResponsesConfig: IPmcChatResponse;
|
protected pmcResponsesConfig: IPmcChatResponse;
|
||||||
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Chooses a random victim from those provided and sends a message to the player, can be positive or negative
|
* For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param pmcVictims Array of bots killed by player
|
* @param pmcVictims Array of bots killed by player
|
||||||
*/
|
*/
|
||||||
@ -46,11 +46,11 @@ export declare class PmcChatResponseService {
|
|||||||
*/
|
*/
|
||||||
protected allCaps(isVictim: boolean): boolean;
|
protected allCaps(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Should the word 'bro' be appended to the message being sent to player
|
* Should a suffix be appended to the end of the message being sent to player
|
||||||
* @param isVictim Was responder a victim of player
|
* @param isVictim Was responder a victim of player
|
||||||
* @returns true = should be stripped
|
* @returns true = should be stripped
|
||||||
*/
|
*/
|
||||||
appendBroToMessageEnd(isVictim: boolean): boolean;
|
appendSuffixToMessageEnd(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Choose a type of response based on the weightings in pmc response config
|
* Choose a type of response based on the weightings in pmc response config
|
||||||
* @param isVictim Was responder killed by player
|
* @param isVictim Was responder killed by player
|
||||||
@ -64,10 +64,21 @@ export declare class PmcChatResponseService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
||||||
|
/**
|
||||||
|
* Get all locale keys that start with `pmcresponse-suffix`
|
||||||
|
* @returns array of keys
|
||||||
|
*/
|
||||||
|
protected getResponseSuffixLocaleKeys(): string[];
|
||||||
/**
|
/**
|
||||||
* Randomly draw a victim of the the array and return thier details
|
* Randomly draw a victim of the the array and return thier details
|
||||||
* @param pmcVictims Possible victims to choose from
|
* @param pmcVictims Possible victims to choose from
|
||||||
* @returns IUserDialogInfo
|
* @returns IUserDialogInfo
|
||||||
*/
|
*/
|
||||||
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
||||||
|
/**
|
||||||
|
* Convert a victim object into a IUserDialogInfo object
|
||||||
|
* @param pmcVictim victim to convert
|
||||||
|
* @returns IUserDialogInfo
|
||||||
|
*/
|
||||||
|
protected getVictimDetails(pmcVictim: Victim): IUserDialogInfo;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,11 @@ export declare class GameController {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it
|
||||||
|
* @param pmcProfile Player profile
|
||||||
|
*/
|
||||||
|
protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* When player logs in, iterate over all active effects and reduce timer
|
* When player logs in, iterate over all active effects and reduce timer
|
||||||
* TODO - add body part HP regen
|
* TODO - add body part HP regen
|
||||||
|
@ -4,7 +4,8 @@ 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 { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
@ -124,6 +125,22 @@ export declare class QuestController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
handoverQuest(pmcData: IPmcData, handoverQuestRequest: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log that repeatable quest failed a condition check
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showRepeatableQuestInvalidConditionError(handoverQuestRequest: IHandoverQuestRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Show warning to user and write to log quest item handed over did not match what is required
|
||||||
|
* @param handoverQuestRequest Quest request
|
||||||
|
* @param itemHandedOver Non-matching item found
|
||||||
|
* @param handoverRequirements Quest handover requirements
|
||||||
|
* @param output Response to send to user
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected showQuestItemHandoverMatchError(handoverQuestRequest: IHandoverQuestRequestData, itemHandedOver: Item, handoverRequirements: AvailableForConditions, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Increment a backend counter stored value by an amount,
|
* Increment a backend counter stored value by an amount,
|
||||||
* Create counter if it does not exist
|
* Create counter if it does not exist
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
import { IInventoryConfig } from "../models/spt/config/IInventoryConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class PaymentHelper {
|
export declare class PaymentHelper {
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Check whether tpl is Money
|
* Is the passed in tpl money (also checks custom currencies in inventoryConfig.customMoneyTpls)
|
||||||
* @param {string} tpl
|
* @param {string} tpl
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
|
@ -3,6 +3,8 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
kind: "aki-inventory";
|
kind: "aki-inventory";
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, RewardDetails>;
|
||||||
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
|
customMoneyTpls: string[];
|
||||||
}
|
}
|
||||||
export interface RewardDetails {
|
export interface RewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
|
@ -16,7 +16,7 @@ export declare class PmcChatResponseService {
|
|||||||
protected pmcResponsesConfig: IPmcChatResponse;
|
protected pmcResponsesConfig: IPmcChatResponse;
|
||||||
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
constructor(randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Chooses a random victim from those provided and sends a message to the player, can be positive or negative
|
* For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param pmcVictims Array of bots killed by player
|
* @param pmcVictims Array of bots killed by player
|
||||||
*/
|
*/
|
||||||
@ -46,11 +46,11 @@ export declare class PmcChatResponseService {
|
|||||||
*/
|
*/
|
||||||
protected allCaps(isVictim: boolean): boolean;
|
protected allCaps(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Should the word 'bro' be appended to the message being sent to player
|
* Should a suffix be appended to the end of the message being sent to player
|
||||||
* @param isVictim Was responder a victim of player
|
* @param isVictim Was responder a victim of player
|
||||||
* @returns true = should be stripped
|
* @returns true = should be stripped
|
||||||
*/
|
*/
|
||||||
appendBroToMessageEnd(isVictim: boolean): boolean;
|
appendSuffixToMessageEnd(isVictim: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Choose a type of response based on the weightings in pmc response config
|
* Choose a type of response based on the weightings in pmc response config
|
||||||
* @param isVictim Was responder killed by player
|
* @param isVictim Was responder killed by player
|
||||||
@ -64,10 +64,21 @@ export declare class PmcChatResponseService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
protected getResponseLocaleKeys(keyType: string, isVictim?: boolean): string[];
|
||||||
|
/**
|
||||||
|
* Get all locale keys that start with `pmcresponse-suffix`
|
||||||
|
* @returns array of keys
|
||||||
|
*/
|
||||||
|
protected getResponseSuffixLocaleKeys(): string[];
|
||||||
/**
|
/**
|
||||||
* Randomly draw a victim of the the array and return thier details
|
* Randomly draw a victim of the the array and return thier details
|
||||||
* @param pmcVictims Possible victims to choose from
|
* @param pmcVictims Possible victims to choose from
|
||||||
* @returns IUserDialogInfo
|
* @returns IUserDialogInfo
|
||||||
*/
|
*/
|
||||||
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
protected chooseRandomVictim(pmcVictims: Victim[]): IUserDialogInfo;
|
||||||
|
/**
|
||||||
|
* Convert a victim object into a IUserDialogInfo object
|
||||||
|
* @param pmcVictim victim to convert
|
||||||
|
* @returns IUserDialogInfo
|
||||||
|
*/
|
||||||
|
protected getVictimDetails(pmcVictim: Victim): IUserDialogInfo;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user