Skip to content

Commit

Permalink
Tweaked Previous Commit to Be More Extensive
Browse files Browse the repository at this point in the history
  • Loading branch information
DelnarErsike committed Mar 13, 2024
1 parent d40ef46 commit 397c4a9
Showing 1 changed file with 8 additions and 32 deletions.
40 changes: 8 additions & 32 deletions Chummer/Backend/Improvements/Improvement.cs
Expand Up @@ -1775,10 +1775,7 @@ Contact objTargetContact
if (strKey == ImprovedName || lstExtraImprovedName.Contains(strKey))
{
yield return new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.Base));
if (Maximum != 0)
yield return new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.RatingMaximum));
nameof(Skill.RelevantImprovements));
}
}

Expand All @@ -1790,21 +1787,15 @@ Contact objTargetContact
|| lstExtraImprovedName.Contains(objTargetSkill.InternalId))
{
yield return new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.Base));
if (Maximum != 0)
yield return new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.RatingMaximum));
nameof(Skill.RelevantImprovements));
}
else
{
string strDisplayName = objTargetSkill.CurrentDisplayName;
if (strDisplayName == ImprovedName || lstExtraImprovedName.Contains(strDisplayName))
{
yield return new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.Base));
if (Maximum != 0)
yield return new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.RatingMaximum));
nameof(Skill.RelevantImprovements));
}
}
}
Expand All @@ -1819,10 +1810,7 @@ Contact objTargetContact
if (objTargetSkill != null)
{
yield return new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.Base));
if (Maximum != 0)
yield return new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.RatingMaximum));
nameof(Skill.RelevantImprovements));
}
}
}
Expand Down Expand Up @@ -4127,10 +4115,7 @@ await _objCharacter.SkillsSection.Skills.FirstOrDefaultAsync(async x => await x.
if (strKey == ImprovedName || lstExtraImprovedName.Contains(strKey))
{
lstReturn.Add(new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.Base)));
if (Maximum != 0)
lstReturn.Add(new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.RatingMaximum)));
nameof(Skill.RelevantImprovements)));
}
}, token).ConfigureAwait(false);

Expand All @@ -4142,10 +4127,7 @@ await _objCharacter.SkillsSection.Skills.FirstOrDefaultAsync(async x => await x.
|| lstExtraImprovedName.Contains(objTargetSkill.InternalId))
{
lstReturn.Add(new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.Base)));
if (Maximum != 0)
lstReturn.Add(new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.RatingMaximum)));
nameof(Skill.RelevantImprovements)));
}
else
{
Expand All @@ -4154,10 +4136,7 @@ await _objCharacter.SkillsSection.Skills.FirstOrDefaultAsync(async x => await x.
{
lstReturn.Add(new Tuple<INotifyMultiplePropertiesChangedAsync, string>(
objTargetSkill,
nameof(Skill.Base)));
if (Maximum != 0)
lstReturn.Add(new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.RatingMaximum)));
nameof(Skill.RelevantImprovements)));
}
}
}, token).ConfigureAwait(false);
Expand All @@ -4172,10 +4151,7 @@ await _objCharacter.SkillsSection.Skills.FirstOrDefaultAsync(async x => await x.
if (objTargetSkill != null)
{
lstReturn.Add(new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.Base)));
if (Maximum != 0)
lstReturn.Add(new Tuple<INotifyMultiplePropertiesChangedAsync, string>(objTargetSkill,
nameof(Skill.RatingMaximum)));
nameof(Skill.RelevantImprovements)));
}
}
}
Expand Down

0 comments on commit 397c4a9

Please sign in to comment.