Example #1
0
        /// <summary>
        /// Processed the queried character's skill queue information.
        /// </summary>
        /// <param name="result"></param>
        private void OnCharacterSheetUpdated(CCPAPIResult <SerializableAPICharacterSheet> result)
        {
            // Character may have been deleted or set to not be monitored since we queried
            if (m_ccpCharacter == null || !m_ccpCharacter.Monitored)
            {
                return;
            }

            // Notify an error occurred
            if (m_ccpCharacter.ShouldNotifyError(result, CCPAPICharacterMethods.CharacterSheet))
            {
                EveMonClient.Notifications.NotifyCharacterSheetError(m_ccpCharacter, result);
            }

            // Quits if there is an error
            if (result.HasError)
            {
                return;
            }

            // Query the Character's info
            QueryCharacterInfo();

            // Imports the data
            m_ccpCharacter.Import(result);

            // Notify for insufficient balance
            m_ccpCharacter.NotifyInsufficientBalance();

            // Save the file to our cache
            LocalXmlCache.SaveAsync(result.Result.Name, result.XmlDocument).ConfigureAwait(false);
        }
Example #2
0
        /// <summary>
        /// Processed the queried character's character sheet information.
        /// </summary>
        /// <param name="result"></param>
        private void OnCharacterSheetUpdated(EsiResult <EsiAPICharacterSheet> result)
        {
            // Character may have been deleted or set to not be monitored since we queried
            if (m_ccpCharacter == null || !m_ccpCharacter.Monitored)
            {
                return;
            }

            // Notify an error occurred
            if (m_ccpCharacter.ShouldNotifyError(result, ESIAPICharacterMethods.CharacterSheet))
            {
                EveMonClient.Notifications.NotifyCharacterSheetError(m_ccpCharacter, result);
            }

            // Quits if there is an error
            if (result.HasError)
            {
                return;
            }

            // Query the Character's data
            QueryCharacterData <EsiAPILocation>(ESIAPICharacterMethods.Location,
                                                OnCharacterLocationUpdated);
            QueryCharacterData <EsiAPIClones>(ESIAPICharacterMethods.Clones,
                                              OnCharacterClonesUpdated);
            QueryCharacterData <EsiAPIJumpFatigue>(ESIAPICharacterMethods.JumpFatigue,
                                                   OnCharacterFatigueUpdated);
            QueryCharacterData <EsiAPIAttributes>(ESIAPICharacterMethods.Attributes,
                                                  OnCharacterAttributesUpdated);
            QueryCharacterData <EsiAPIShip>(ESIAPICharacterMethods.Ship,
                                            OnCharacterShipUpdated);
            QueryCharacterData <EsiAPISkills>(ESIAPICharacterMethods.Skills,
                                              OnCharacterSkillsUpdated);
            QueryCharacterData <List <int> >(ESIAPICharacterMethods.Implants,
                                             OnCharacterImplantsUpdated);

            // Imports the data
            m_ccpCharacter.Import(result);

            // Notify for insufficient balance
            m_ccpCharacter.NotifyInsufficientBalance();

            // Save the file to our cache
            LocalXmlCache.SaveAsync(result.Result.Name, Util.SerializeToXmlDocument(result.Result)).ConfigureAwait(false);
        }