diff --git a/config/config.json b/config/config.json new file mode 100644 index 0000000..371cc85 --- /dev/null +++ b/config/config.json @@ -0,0 +1,3 @@ +{ + "DebugMode": false +} \ No newline at end of file diff --git a/types/helpers/ProfileHelper.d.ts b/types/helpers/ProfileHelper.d.ts index 9d4ff98..4c5ef61 100644 --- a/types/helpers/ProfileHelper.d.ts +++ b/types/helpers/ProfileHelper.d.ts @@ -24,6 +24,19 @@ export declare class ProfileHelper { constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, fenceService: FenceService); resetProfileQuestCondition(sessionID: string, conditionId: string): void; getCompleteProfile(sessionID: string): IPmcData[]; + /** + * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen + * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using + * the now updated profile values as a base, meaning it shows x2 xp gained + * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return + * Delete snapshot of pre-raid profile prior to returning profile data + * @param sessionId Session id + * @param output pmc and scav profiles array + * @param pmcProfile post-raid pmc profile + * @param scavProfile post-raid scav profile + * @returns updated profile array + */ + postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[]; isNicknameTaken(info: IValidateNicknameRequestData, sessionID: string): boolean; /** * Add experience to a PMC inside the players profile diff --git a/types/helpers/RagfairOfferHelper.d.ts b/types/helpers/RagfairOfferHelper.d.ts index 8d03bee..0b7317c 100644 --- a/types/helpers/RagfairOfferHelper.d.ts +++ b/types/helpers/RagfairOfferHelper.d.ts @@ -46,7 +46,7 @@ export declare class RagfairOfferHelper { constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; - processOffers(sessionID: string): boolean; + processOffersOnProfile(sessionID: string): boolean; protected getProfileOffers(sessionID: string): IRagfairOffer[]; protected deleteOfferByOfferId(sessionID: string, offerId: string): void; protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; diff --git a/types/helpers/RagfairSellHelper.d.ts b/types/helpers/RagfairSellHelper.d.ts index 6ec004a..91b8a20 100644 --- a/types/helpers/RagfairSellHelper.d.ts +++ b/types/helpers/RagfairSellHelper.d.ts @@ -11,6 +11,12 @@ export declare class RagfairSellHelper { protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); - calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; - rollForSale(sellChance: number, count: number): SellResult[]; + calculateSellChance(baseChancePercent: number, offerPriceRub: number, playerListedPriceRub: number): number; + /** + * Determine if the offer being listed will be sold + * @param sellChancePercent chance item will sell + * @param itemSellCount count of items to sell + * @returns Array of purchases of item(s) lsited + */ + rollForSale(sellChancePercent: number, itemSellCount: number): SellResult[]; } diff --git a/types/models/enums/AmmoTypes.d.ts b/types/models/enums/AmmoTypes.d.ts index b52ddcf..254b410 100644 --- a/types/models/enums/AmmoTypes.d.ts +++ b/types/models/enums/AmmoTypes.d.ts @@ -23,7 +23,7 @@ export declare enum Ammo762x54 { BT_GZH = "5e023d34e8a400319a28ed44", BS_GZH = "5e023d48186a883be655e551" } -export declare enum Ammo338Lapua { +export declare enum Ammo86x70 { TAC_X = "5fc382b6d6fa9c00c571bbc3", UCW = "5fc382c1016cce60e8341b20", AP = "5fc382a9d724d907e2077dab", @@ -85,13 +85,13 @@ export declare enum Ammo9x21 { PE_GZH = "5a26ac06c4a282000c5a90a8", BT_GZH = "5a26ac0ec4a28200741e1e18" } -export declare enum Ammo357Mag { +export declare enum Ammo9x33R { FMJ = "62330b3ed4dc74626d570b95", HOLLOW_POINT = "62330bfadc5883093563729b", SOFT_POINT = "62330c40bdd19b369e1e53d1", JACKET_HP = "62330c18744e5e31df12f516" } -export declare enum Ammo45ACP { +export declare enum Ammo1143x23ACP { MATCH_FMJ = "5e81f423763d9f754677bf2e", HYDRA_SHOK = "5efb0fc6aeb21837e749c801", LASERMATCH_FMJ = "5efb0d4f4bc50b58e81710f3", @@ -126,7 +126,7 @@ export declare enum Ammo556x45 { MK_318_MOD_0_SOST = "60194943740c5d77f6705eea", SSA_AP = "601949593ae8f707c4608daa" } -export declare enum Ammo300Blackout { +export declare enum Ammo762x35 { M62_TRACER = "619636be6db0f2477964e710", BCP_FMJ = "5fbe3ffdf8b6a877a729ea82", AP = "5fd20ff893a8961fc660a954", diff --git a/types/models/spt/config/IRagfairConfig.d.ts b/types/models/spt/config/IRagfairConfig.d.ts index 6369eda..3088717 100644 --- a/types/models/spt/config/IRagfairConfig.d.ts +++ b/types/models/spt/config/IRagfairConfig.d.ts @@ -12,6 +12,7 @@ export interface Sell { chance: Chance; time: Time; reputation: Reputation; + simulatedSellHours: number; } export interface Chance { base: number; diff --git a/types/utils/TimeUtil.d.ts b/types/utils/TimeUtil.d.ts index f437f8a..e72fbc1 100644 --- a/types/utils/TimeUtil.d.ts +++ b/types/utils/TimeUtil.d.ts @@ -19,4 +19,10 @@ export declare class TimeUtil { * @returns current date in format: 00.00.0000 (dd.mm.yyyy) */ getDateMailFormat(): string; + /** + * Convert hours into seconds + * @param hours hours to convert to seconds + * @returns number + */ + getHoursAsSeconds(hours: number): number; }