/// <summary> /// Imports data from a serialization object /// </summary> /// <param name="serial"></param> internal void Import(IEnumerable <SerializableQueuedSkill> serial) { m_isPaused = false; // If the queue is paused, CCP sends empty start and end time. // So we base the start time on when the skill queue was started. var startTimeWhenPaused = startTime; // Imports the queued skills and checks whether they are paused m_items.Clear(); foreach (var serialSkill in serial) { // When the skill queue is paused, startTime and endTime are empty in the XML document. // As a result, the serialization leaves the DateTime with its default value. if (serialSkill.EndTime == default(DateTime)) { m_isPaused = true; } // Creates the skill queue m_items.Add(new QueuedSkill(m_character, serialSkill, m_isPaused, ref startTimeWhenPaused)); } // Fires the event regarding the character skill queue update. EveClient.OnCharacterSkillQueueChanged(m_character); }