From 432af5cd3fcf9ed16b9c87e462639ce9cff9009f Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 13 Oct 2023 13:38:23 +0100 Subject: [PATCH] Update types --- .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ .../types/controllers/MatchController.d.ts | 21 ++++++++++++++++++- .../models/spt/config/IInRaidConfig.d.ts | 2 ++ .../models/spt/config/ITraderConfig.d.ts | 7 +++++++ 63 files changed, 609 insertions(+), 21 deletions(-) diff --git a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number; diff --git a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts index ce9bc7f..23b65bf 100644 --- a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts @@ -1,4 +1,5 @@ import { ApplicationContext } from "../context/ApplicationContext"; +import { LootGenerator } from "../generators/LootGenerator"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; @@ -12,16 +13,24 @@ import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService"; +import { MailSendService } from "../services/MailSendService"; import { MatchLocationService } from "../services/MatchLocationService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; protected profileHelper: ProfileHelper; protected matchLocationService: MatchLocationService; protected traderHelper: TraderHelper; @@ -29,11 +38,14 @@ export declare class MatchController { protected configServer: ConfigServer; protected profileSnapshotService: ProfileSnapshotService; protected botGenerationCacheService: BotGenerationCacheService; + protected mailSendService: MailSendService; + protected lootGenerator: LootGenerator; protected applicationContext: ApplicationContext; protected matchConfig: IMatchConfig; protected inraidConfig: IInRaidConfig; + protected traderConfig: ITraderConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext); getEnabled(): boolean; /** Handle raid/profile/list */ getProfile(info: IGetProfileRequestData): IPmcData[]; @@ -59,6 +71,13 @@ export declare class MatchController { protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string; /** Handle client/match/offline/end */ endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void; + /** + * Did player take a COOP extract + * @param extractName Name of extract player took + * @returns True if coop extract + */ + protected extractWasViaCoop(extractName: string): boolean; + protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts index 3d3b1a2..cf30967 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts @@ -8,6 +8,8 @@ export interface IInRaidConfig extends IBaseConfig { save: Save; /** Names of car extracts */ carExtracts: string[]; + /** Names of coop extracts */ + coopExtracts: string[]; /** Fene rep gain from a single car extract */ carExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts index 85adf73..e44d715 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts @@ -1,4 +1,5 @@ import { MinMax } from "../../../models/common/MinMax"; +import { LootRequest } from "../services/LootRequest"; import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; @@ -35,6 +36,12 @@ export interface FenceConfig { /** Block seasonal items from appearing when season is inactive */ blacklistSeasonalItems: boolean; blacklist: string[]; + coopExtractGift: CoopExtractReward; +} +export interface CoopExtractReward extends LootRequest { + sendGift: boolean; + messageLocaleIds: string[]; + giftExpiryHours: number; } export interface DiscountOptions { assortSize: number;