fix buff logic for nulls
This commit is contained in:
@@ -577,8 +577,8 @@ public class RepairService(
|
||||
var template = hasTemplate.Value;
|
||||
|
||||
// Returns SkillTypes.LIGHT_VESTS/HEAVY_VESTS/WEAPON_TREATMENT
|
||||
var itemSkillType = (SkillTypes) GetItemSkillType(template);
|
||||
if (itemSkillType == null)
|
||||
var itemSkillType = GetItemSkillType(template);
|
||||
if (itemSkillType is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -598,8 +598,8 @@ public class RepairService(
|
||||
{
|
||||
SkillTypes.LightVests,
|
||||
SkillTypes.HeavyVests
|
||||
}.Contains(itemSkillType) &&
|
||||
_profileHelper.GetSkillFromProfile(pmcData, itemSkillType)?.Progress < 1000
|
||||
}.Contains(itemSkillType.Value) &&
|
||||
_profileHelper.GetSkillFromProfile(pmcData, itemSkillType.Value)?.Progress < 1000
|
||||
)
|
||||
{
|
||||
return false;
|
||||
@@ -626,7 +626,7 @@ public class RepairService(
|
||||
var receivedDurabilityMaxPercent = buffSettings.ReceivedDurabilityMaxPercent;
|
||||
|
||||
var skillLevel =
|
||||
Math.Truncate((_profileHelper.GetSkillFromProfile(pmcData, itemSkillType)?.Progress ?? 0) / 100);
|
||||
Math.Truncate((_profileHelper.GetSkillFromProfile(pmcData, itemSkillType.Value)?.Progress ?? 0) / 100);
|
||||
|
||||
if (repairDetails.RepairPoints is null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user