Ejemplo n.º 1
0
        /// <summary>
        /// Fetches the data to the given serialization object, used by inheritors.
        /// </summary>
        /// <param name="serial">The serial.</param>
        /// <exception cref="System.ArgumentNullException">serial</exception>
        protected void Export(SerializableSettingsCharacter serial)
        {
            serial.ThrowIfNull(nameof(serial));

            serial.Guid               = Guid;
            serial.ID                 = Identity.CharacterID;
            serial.Name               = m_name;
            serial.HomeStationID      = homeStation;
            serial.Birthday           = Birthday;
            serial.Race               = Race;
            serial.BloodLine          = Bloodline;
            serial.Ancestry           = Ancestry;
            serial.Gender             = Gender;
            serial.CorporationName    = CorporationName;
            serial.CorporationID      = CorporationID;
            serial.AllianceName       = AllianceName;
            serial.AllianceID         = AllianceID;
            serial.FreeSkillPoints    = FreeSkillPoints;
            serial.FreeRespecs        = AvailableReMaps;
            serial.CloneState         = AccountStatusSettings.ToString();
            serial.CloneJumpDate      = JumpCloneLastJumpDate;
            serial.LastRespecDate     = LastReMapDate;
            serial.LastTimedRespec    = LastReMapTimed;
            serial.RemoteStationDate  = RemoteStationDate;
            serial.JumpActivationDate = JumpActivationDate;
            serial.JumpFatigueDate    = JumpFatigueDate;
            serial.JumpLastUpdateDate = JumpLastUpdateDate;
            serial.Balance            = Balance;

            // Info
            serial.Label             = m_label;
            serial.ShipName          = ShipName;
            serial.ShipTypeName      = ShipTypeName;
            serial.SecurityStatus    = SecurityStatus;
            serial.LastKnownLocation = LastKnownLocation;

            // Employment History
            serial.EmploymentHistory.AddRange(EmploymentHistory.Export());

            // Attributes
            serial.Attributes.Intelligence = Intelligence.Base;
            serial.Attributes.Perception   = Perception.Base;
            serial.Attributes.Willpower    = Willpower.Base;
            serial.Attributes.Charisma     = Charisma.Base;
            serial.Attributes.Memory       = Memory.Base;

            // Implants sets
            serial.ImplantSets = ImplantSets.Export();

            // Skills
            serial.Skills.AddRange(Skills.Export());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Fetches the data to the given serialization object, used by inheritors.
        /// </summary>
        /// <param name="ci"></param>
        protected void Export(SerializableSettingsCharacter serial)
        {
            serial.Guid             = m_guid;
            serial.ID               = m_identity.CharacterID;
            serial.Name             = m_name;
            serial.Birthday         = m_birthday;
            serial.Race             = m_race;
            serial.Ancestry         = m_ancestry;
            serial.Gender           = m_gender;
            serial.BloodLine        = m_bloodLine;
            serial.CorporationName  = m_corporationName;
            serial.CorporationID    = m_corporationID;
            serial.AllianceName     = m_allianceName;
            serial.AllianceID       = m_allianceID;
            serial.CloneSkillPoints = m_cloneSkillPoints;
            serial.CloneName        = m_cloneName;
            serial.Balance          = m_balance;

            // Attributes
            serial.Attributes.Intelligence = Intelligence.Base;
            serial.Attributes.Perception   = Perception.Base;
            serial.Attributes.Willpower    = Willpower.Base;
            serial.Attributes.Charisma     = Charisma.Base;
            serial.Attributes.Memory       = Memory.Base;

            // Implants sets
            serial.ImplantSets = ImplantSets.Export();

            // Certificates
            serial.Certificates = new List <SerializableCharacterCertificate>();
            foreach (var cert in Certificates.Where(x => x.IsGranted))
            {
                serial.Certificates.Add(new SerializableCharacterCertificate {
                    CertificateID = cert.ID
                });
            }

            // Skills
            serial.Skills = new List <SerializableCharacterSkill>();
            foreach (var skill in Skills.Where(x => x.IsKnown || x.IsOwned))
            {
                serial.Skills.Add(skill.Export());
            }
        }