Removed property that client no longer sends - updated corrisponding code that used it (fixes 0 rep gain on successful scav raid)

Only apply rep gain when current rep is below max (15)
This commit is contained in:
Dev 2024-11-16 19:57:27 +00:00
parent 58cbba4c7b
commit d8be5f71a6
2 changed files with 10 additions and 4 deletions

View File

@ -15,14 +15,15 @@ export interface IEndLocalRaidRequestData {
export interface IEndRaidResult {
profile: IPmcData;
/** "Survived/Transit etc" */
/** "Survived/Transit" etc */
result: string;
ExitStatus: ExitStatus;
killerId: string;
killerAid: string;
/** "Gate 3" etc */
exitName: string;
inSession: boolean;
favorite: boolean;
/** Seconds in raid */
playTime: number;
}

View File

@ -579,11 +579,16 @@ export class LocationLifecycleService {
this.applyTraderStandingAdjustments(scavProfile.TradersInfo, request.results.profile.TradersInfo);
// Clamp fence standing within -7 to 15 range
const fenceMax = 15;
const fenceMin = -7;
const currentFenceStanding = request.results.profile.TradersInfo[Traders.FENCE].standing;
scavProfile.TradersInfo[Traders.FENCE].standing = Math.min(Math.max(currentFenceStanding, -7), 15);
scavProfile.TradersInfo[Traders.FENCE].standing = Math.min(Math.max(currentFenceStanding, fenceMin), fenceMax);
// Successful extract as scav, give some rep
if (request.results.ExitStatus === ExitStatus.SURVIVED) {
if (
request.results.result.toLowerCase() === "survived" &&
scavProfile.TradersInfo[Traders.FENCE].standing < fenceMax
) {
scavProfile.TradersInfo[Traders.FENCE].standing += this.inRaidConfig.scavExtractStandingGain;
}