Made GetScavSkills an extension method and made more generic

This commit is contained in:
Chomp
2025-06-28 11:53:05 +01:00
parent 0a28dc4657
commit fed9f3dd46
2 changed files with 16 additions and 21 deletions
@@ -95,5 +95,20 @@ namespace SPTarkov.Server.Core.Extensions
return Math.Floor(fenceInfo.Standing ?? 0);
}
public static Skills GetSkillsOrDefault(this PmcData profile)
{
return profile?.Skills ?? GetDefaultSkills();
}
private static Skills GetDefaultSkills()
{
return new Skills
{
Common = [],
Mastering = [],
Points = 0,
};
}
}
}