private void PopulateDescriptor(Skill skill, SkillLevel level, XmlDocument document, bool applyToTarget) { var suffix = applyToTarget ? "_Target" : ""; var xpath = $"Datatable/SimulationDescriptor[@Name='{level.GetIdentifier(skill)}{suffix}']"; var node = document.SelectSingleNode(xpath); if (node == null) { return; } level.Descriptors.Add(new SkillDescriptor { Modifiers = CreateModifiers(node), AppliesToTarget = applyToTarget }); }