Compare commits
2 Commits
1974f48264
...
79a47f5d9b
Author | SHA1 | Date | |
---|---|---|---|
79a47f5d9b | |||
8dc9f60862 |
@ -60,6 +60,9 @@ class Mod implements IPreAkiLoadMod, IPostAkiLoadMod
|
||||
pmcData.Skills.Common.forEach((skill) => // Loop through all skills
|
||||
{
|
||||
const scavSkill = scavData.Skills.Common.find(p => p.Id === skill.Id); // Find the scav skill
|
||||
|
||||
if (!scavSkill || !skill) return; // If the scav or pmc skill does not exist, return
|
||||
|
||||
const maxProgress = Math.max(skill.Progress, scavSkill.Progress); // Get the max progress
|
||||
|
||||
if (maxProgress != skill.Progress)
|
||||
@ -181,7 +184,11 @@ class Mod implements IPreAkiLoadMod, IPostAkiLoadMod
|
||||
if (skill.PointsEarnedDuringSession > 0)
|
||||
{
|
||||
totalSkillXP += skill.PointsEarnedDuringSession;
|
||||
pmcData.Skills.Common.find(p => p.Id === skill.Id).Progress += skill.PointsEarnedDuringSession; // Add the skill experience to the PMC profile
|
||||
|
||||
const pmcSkill = pmcData.Skills.Common.find(p => p.Id === skill.Id); // Find the PMC skill
|
||||
if (!pmcSkill || !skill) return; // If the PMC or Scav skill does not exist, return
|
||||
|
||||
pmcSkill.Progress += skill.PointsEarnedDuringSession; // Add the skill experience to the PMC profile
|
||||
this.logger.debug(`[ScavXpCounts] Added ${skill.PointsEarnedDuringSession.toFixed(2)} experience to ${skill.Id}`);
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user