mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 02:50:44 -05:00
Added 0.01 rep gain when successfully exiting a raid as a scav
Fixed incorrect check of rep on pmc profile Renamed inraid config property from `scavExtractGain` to `scavExtractStandingGain`
This commit is contained in:
parent
ec825d990c
commit
c97f5c2327
@ -24,7 +24,7 @@
|
|||||||
],
|
],
|
||||||
"carExtractBaseStandingGain": 0.2,
|
"carExtractBaseStandingGain": 0.2,
|
||||||
"coopExtractBaseStandingGain": 0.25,
|
"coopExtractBaseStandingGain": 0.25,
|
||||||
"scavExtractGain": 0.01,
|
"scavExtractStandingGain": 0.01,
|
||||||
"pmcKillProbabilityForScavGain": 0.2,
|
"pmcKillProbabilityForScavGain": 0.2,
|
||||||
"keepFiRSecureContainerOnDeath": false,
|
"keepFiRSecureContainerOnDeath": false,
|
||||||
"alwaysKeepFoundInRaidonRaidEnd": false,
|
"alwaysKeepFoundInRaidonRaidEnd": false,
|
||||||
|
@ -15,7 +15,7 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
/** Fence rep gain from a single coop extract */
|
/** Fence rep gain from a single coop extract */
|
||||||
coopExtractBaseStandingGain: number;
|
coopExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractStandingGain: number;
|
||||||
/** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */
|
/** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */
|
||||||
pmcKillProbabilityForScavGain: number;
|
pmcKillProbabilityForScavGain: number;
|
||||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
@ -19,6 +19,7 @@ import {
|
|||||||
import { IStartLocalRaidRequestData } from "@spt/models/eft/match/IStartLocalRaidRequestData";
|
import { IStartLocalRaidRequestData } from "@spt/models/eft/match/IStartLocalRaidRequestData";
|
||||||
import { IStartLocalRaidResponseData } from "@spt/models/eft/match/IStartLocalRaidResponseData";
|
import { IStartLocalRaidResponseData } from "@spt/models/eft/match/IStartLocalRaidResponseData";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
|
import { ExitStatus } from "@spt/models/enums/ExitStatis";
|
||||||
import { MessageType } from "@spt/models/enums/MessageType";
|
import { MessageType } from "@spt/models/enums/MessageType";
|
||||||
import { QuestStatus } from "@spt/models/enums/QuestStatus";
|
import { QuestStatus } from "@spt/models/enums/QuestStatus";
|
||||||
import { Traders } from "@spt/models/enums/Traders";
|
import { Traders } from "@spt/models/enums/Traders";
|
||||||
@ -566,13 +567,17 @@ export class LocationLifecycleService {
|
|||||||
|
|
||||||
this.applyTraderStandingAdjustments(scavProfile.TradersInfo, request.results.profile.TradersInfo);
|
this.applyTraderStandingAdjustments(scavProfile.TradersInfo, request.results.profile.TradersInfo);
|
||||||
|
|
||||||
// Clamp fence standing
|
// Clamp fence standing within -7 to 15 range
|
||||||
const fenceId = Traders.FENCE;
|
const currentFenceStanding = request.results.profile.TradersInfo[Traders.FENCE].standing;
|
||||||
const currentFenceStanding = request.results.profile.TradersInfo[fenceId].standing;
|
scavProfile.TradersInfo[Traders.FENCE].standing = Math.min(Math.max(currentFenceStanding, -7), 15);
|
||||||
pmcProfile.TradersInfo[fenceId].standing = Math.min(Math.max(currentFenceStanding, -7), 15); // Ensure it stays between -7 and 15
|
|
||||||
|
|
||||||
// Copy fence values to PMC
|
// Successful extract as scav, give some rep
|
||||||
pmcProfile.TradersInfo[fenceId] = scavProfile.TradersInfo[fenceId];
|
if (request.results.ExitStatus === ExitStatus.SURVIVED) {
|
||||||
|
scavProfile.TradersInfo[Traders.FENCE].standing += this.inRaidConfig.scavExtractStandingGain;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy scav fence values to PMC profile
|
||||||
|
pmcProfile.TradersInfo[Traders.FENCE] = scavProfile.TradersInfo[Traders.FENCE];
|
||||||
|
|
||||||
// Must occur after encyclopedia updated
|
// Must occur after encyclopedia updated
|
||||||
this.mergePmcAndScavEncyclopedias(scavProfile, pmcProfile);
|
this.mergePmcAndScavEncyclopedias(scavProfile, pmcProfile);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user