/// <summary> /// Performs the given remapping /// </summary> /// <param name="point"></param> /// <exception cref="System.ArgumentNullException">point</exception> public void Remap(RemappingPoint point) { point.ThrowIfNull(nameof(point)); for (int i = 0; i < m_attributes.Length; i++) { EveAttribute attrib = (EveAttribute)i; m_attributes[i].Base = point[attrib]; } }
/// <summary> /// Updates the controls with the values from the current remapping point. /// </summary> /// <param name="point"></param> /// <exception cref="System.ArgumentNullException">point</exception> public void UpdateValuesFrom(RemappingPoint point) { point.ThrowIfNull(nameof(point)); // Creates a scratchpad with the base values from the provided point. CharacterScratchpad scratchpad = new CharacterScratchpad(m_character.After(m_plan.ChosenImplantSet)); for (int i = 0; i < 5; i++) { scratchpad[(EveAttribute)i].Base = point[(EveAttribute)i]; } RemappingResult remapping = new RemappingResult(m_remapping, scratchpad); remapping.Update(); // Update the controls UpdateControls(m_character, m_plan, remapping, m_description); // Fires the event AttributeChanged?.ThreadSafeInvoke(this, new AttributeChangedEventArgs(remapping)); }