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:
parent
58cbba4c7b
commit
d8be5f71a6
@ -15,14 +15,15 @@ export interface IEndLocalRaidRequestData {
|
|||||||
|
|
||||||
export interface IEndRaidResult {
|
export interface IEndRaidResult {
|
||||||
profile: IPmcData;
|
profile: IPmcData;
|
||||||
/** "Survived/Transit etc" */
|
/** "Survived/Transit" etc */
|
||||||
result: string;
|
result: string;
|
||||||
ExitStatus: ExitStatus;
|
|
||||||
killerId: string;
|
killerId: string;
|
||||||
killerAid: string;
|
killerAid: string;
|
||||||
|
/** "Gate 3" etc */
|
||||||
exitName: string;
|
exitName: string;
|
||||||
inSession: boolean;
|
inSession: boolean;
|
||||||
favorite: boolean;
|
favorite: boolean;
|
||||||
|
/** Seconds in raid */
|
||||||
playTime: number;
|
playTime: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -579,11 +579,16 @@ export class LocationLifecycleService {
|
|||||||
this.applyTraderStandingAdjustments(scavProfile.TradersInfo, request.results.profile.TradersInfo);
|
this.applyTraderStandingAdjustments(scavProfile.TradersInfo, request.results.profile.TradersInfo);
|
||||||
|
|
||||||
// Clamp fence standing within -7 to 15 range
|
// Clamp fence standing within -7 to 15 range
|
||||||
|
const fenceMax = 15;
|
||||||
|
const fenceMin = -7;
|
||||||
const currentFenceStanding = request.results.profile.TradersInfo[Traders.FENCE].standing;
|
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
|
// 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;
|
scavProfile.TradersInfo[Traders.FENCE].standing += this.inRaidConfig.scavExtractStandingGain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user