Extract coder into function from updateProfileBaseState + log nickname on game start
This commit is contained in:
parent
ee3766aad3
commit
7a1140c229
@ -97,7 +97,7 @@ export class GameController
|
||||
const fullProfile = this.profileHelper.getFullProfile(sessionID);
|
||||
const pmcProfile = fullProfile.characters.pmc;
|
||||
|
||||
this.logger.debug(`Started game with sessionId: ${sessionID}`);
|
||||
this.logger.debug(`Started game with sessionId: ${sessionID} ${pmcProfile.Info?.Nickname}`);
|
||||
|
||||
if (pmcProfile.Health)
|
||||
{
|
||||
|
@ -126,10 +126,7 @@ export class InRaidHelper
|
||||
public updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData
|
||||
{
|
||||
// remove old skill fatigue
|
||||
for (const skill of saveProgressRequest.profile.Skills.Common)
|
||||
{
|
||||
skill.PointsEarnedDuringSession = 0.0;
|
||||
}
|
||||
this.resetSkillPointsEarnedDuringRaid(saveProgressRequest.profile);
|
||||
|
||||
// set profile data
|
||||
profileData.Info.Level = saveProgressRequest.profile.Info.Level;
|
||||
@ -161,6 +158,14 @@ export class InRaidHelper
|
||||
return profileData;
|
||||
}
|
||||
|
||||
protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void
|
||||
{
|
||||
for (const skill of profile.Skills.Common)
|
||||
{
|
||||
skill.PointsEarnedDuringSession = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Take body part effects from client profile and apply to server profile
|
||||
* @param saveProgressRequest post-raid request
|
||||
|
Loading…
Reference in New Issue
Block a user