Beispiel #1
0
        /// <summary>
        /// Constructor for a result bound to a remapping point.
        /// </summary>
        /// <param name="point">Associated remapping point, may be null.</param>
        /// <param name="baseScratchpad"></param>
        public RemappingResult(RemappingPoint point, CharacterScratchpad baseScratchpad)
            : this(baseScratchpad)
        {
            if (point == null)
                return;

            Point = point;
        }
Beispiel #2
0
        /// <summary>
        /// Clones the remapping point.
        /// </summary>
        /// <returns></returns>
        public RemappingPoint Clone()
        {
            RemappingPoint clone = new RemappingPoint();

            Array.Copy(m_attributes, clone.m_attributes, 5);
            clone.Status = Status;
            clone.Guid   = Guid;
            return(clone);
        }
Beispiel #3
0
        /// <summary>
        /// Constructor for a result bound to a remapping point.
        /// </summary>
        /// <param name="point">Associated remapping point, may be null.</param>
        /// <param name="baseScratchpad"></param>
        public RemappingResult(RemappingPoint point, CharacterScratchpad baseScratchpad)
            : this(baseScratchpad)
        {
            if (point == null)
            {
                return;
            }

            Point = point;
        }
Beispiel #4
0
        /// <summary>
        /// Deserialization constructor.
        /// </summary>
        /// <param name="owner">The owner.</param>
        /// <param name="serial">The serial.</param>
        internal PlanEntry(BasePlan owner, SerializablePlanEntry serial)
        {
            m_owner = owner;
            m_entryType = serial.Type;
            m_skill = GetSkill(serial);
            m_level = serial.Level;
            m_notes = serial.Notes;
            m_priority = serial.Priority;

            m_planGroups.AddRange(serial.PlanGroups);

            if (serial.Remapping != null)
                m_remapping = new RemappingPoint(serial.Remapping);
        }
Beispiel #5
0
        /// <summary>
        /// Deserialization constructor.
        /// </summary>
        /// <param name="owner">The owner.</param>
        /// <param name="serial">The serial.</param>
        internal PlanEntry(BasePlan owner, SerializablePlanEntry serial)
        {
            m_owner     = owner;
            m_entryType = serial.Type;
            m_skill     = GetSkill(serial);
            m_level     = serial.Level;
            m_notes     = serial.Notes;
            m_priority  = serial.Priority;

            m_planGroups.AddRange(serial.PlanGroups);

            if (serial.Remapping != null)
            {
                m_remapping = new RemappingPoint(serial.Remapping);
            }
        }
        /// <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));
        }
Beispiel #7
0
 /// <summary>
 /// Clones the remapping point.
 /// </summary>
 /// <returns></returns>
 public RemappingPoint Clone()
 {
     RemappingPoint clone = new RemappingPoint();
     Array.Copy(m_attributes, clone.m_attributes, 5);
     clone.Status = Status;
     clone.Guid = Guid;
     return clone;
 }