Save time spent in raid to profile

This commit is contained in:
Dev 2023-07-17 09:36:10 +01:00
parent b7886138fc
commit 02d43d491c
2 changed files with 8 additions and 1 deletions

View File

@ -169,6 +169,9 @@ export class MatchController
const pmcData: IPmcData = this.profileHelper.getPmcProfile(sessionId); const pmcData: IPmcData = this.profileHelper.getPmcProfile(sessionId);
const extractName = info.exitName; const extractName = info.exitName;
// Save time spent in raid
pmcData.Stats.TotalInGameTime += info.raidSeconds;
// clean up cached bots now raid is over // clean up cached bots now raid is over
this.botGenerationCacheService.clearStoredBots(); this.botGenerationCacheService.clearStoredBots();
@ -182,7 +185,7 @@ export class MatchController
} }
/** /**
* Is extract by car * Was extract by car
* @param extractName name of extract * @param extractName name of extract
* @returns true if car extract * @returns true if car extract
*/ */

View File

@ -247,6 +247,10 @@ export class ProfileHelper
return this.saveServer.getProfile(sessionID).characters.scav; return this.saveServer.getProfile(sessionID).characters.scav;
} }
/**
* Get baseline counter values for a fresh profile
* @returns Stats
*/
public getDefaultCounters(): Stats public getDefaultCounters(): Stats
{ {
return { return {