示例#1
0
        /// <summary>
        /// Processes the queried character's attributes.
        /// </summary>
        /// <param name="result"></param>
        private void OnCharacterAttributesUpdated(EsiAPIAttributes result)
        {
            var target = m_ccpCharacter;

            // Character may have been deleted since we queried
            if (target != null)
            {
                target.Import(result);
            }
        }
示例#2
0
        /// <summary>
        /// Processes the queried character's attributes.
        /// </summary>
        /// <param name="result"></param>
        private void OnCharacterAttributesUpdated(EsiAPIAttributes result)
        {
            var target = m_ccpCharacter;

            // Character may have been deleted since we queried
            if (target != null)
            {
                target.Import(result);
                QueryCharacterData <EsiAPIShip>(ESIAPICharacterMethods.Ship,
                                                EveMonClient.Notifications.NotifyCharacterShipError,
                                                OnCharacterShipUpdated);
            }
        }
示例#3
0
        /// <summary>
        /// Imports data from the given character attribute information.
        /// </summary>
        /// <param name="attribs">The serialized character attribute information</param>
        internal void Import(EsiAPIAttributes attribs)
        {
            // Remap info
            DateTime lastRespec = DateTime.MinValue, nextRespec = attribs.RemapCooldownDate;

            if (nextRespec > DateTime.MinValue)
            {
                lastRespec = nextRespec.Subtract(TimeSpan.FromDays(365.0));
            }
            LastReMapTimed  = lastRespec;
            AvailableReMaps = attribs.BonusRemaps;
            LastReMapDate   = attribs.LastRemap;

            SetAttribute(EveAttribute.Intelligence, attribs.Intelligence);
            SetAttribute(EveAttribute.Perception, attribs.Perception);
            SetAttribute(EveAttribute.Willpower, attribs.Willpower);
            SetAttribute(EveAttribute.Charisma, attribs.Charisma);
            SetAttribute(EveAttribute.Memory, attribs.Memory);
        }
示例#4
0
        /// <summary>
        /// Imports data from the given character attribute information.
        /// </summary>
        /// <param name="attribs">The serialized character attribute information</param>
        internal void Import(EsiAPIAttributes attribs)
        {
            // Remap info
            DateTime lastRespec = DateTime.MinValue, nextRespec = attribs.RemapCooldownDate;

            if (nextRespec > DateTime.MinValue)
            {
                lastRespec = nextRespec.Subtract(TimeSpan.FromDays(365.0));
            }
            LastReMapTimed  = lastRespec;
            AvailableReMaps = attribs.BonusRemaps;
            LastReMapDate   = attribs.LastRemap;

            // Attributes
            m_attributes[(int)EveAttribute.Intelligence].Base = attribs.Intelligence;
            m_attributes[(int)EveAttribute.Perception].Base   = attribs.Perception;
            m_attributes[(int)EveAttribute.Willpower].Base    = attribs.Willpower;
            m_attributes[(int)EveAttribute.Charisma].Base     = attribs.Charisma;
            m_attributes[(int)EveAttribute.Memory].Base       = attribs.Memory;
        }