Further safety checks.
This commit is contained in:
parent
79a47f5d9b
commit
cdb0279bdb
@ -56,6 +56,8 @@ class Mod implements IPreAkiLoadMod, IPostAkiLoadMod
|
||||
|
||||
const pmcData: IPmcData = profile.characters.pmc; // Get the PMC and Scav data
|
||||
const scavData: IPmcData = profile.characters.scav;
|
||||
|
||||
if (!pmcData.Skills || !scavData.Skills) return; // If the PMC or Scav skills do not exist, return
|
||||
|
||||
pmcData.Skills.Common.forEach((skill) => // Loop through all skills
|
||||
{
|
||||
@ -111,6 +113,8 @@ class Mod implements IPreAkiLoadMod, IPostAkiLoadMod
|
||||
const pmcData: IPmcData = profile.characters.pmc;
|
||||
const scavData: IPmcData = profile.characters.scav;
|
||||
|
||||
if (!pmcData.Info || !scavData.Info) return; // If the PMC or Scav info does not exist, return
|
||||
|
||||
const maxExperience = Math.max(pmcData.Info.Experience, scavData.Info.Experience); // Get the max experience
|
||||
const maxLevel = Math.max(pmcData.Info.Level, scavData.Info.Level); // Get the max level
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user