Exemplo n.º 1
0
        /// <summary>
        /// Constructor from the API.
        /// </summary>
        /// <param name="src"></param>
        internal FactionalWarfareStats(EsiAPIFactionalWarfareStats src)
        {
            src.ThrowIfNull(nameof(src));

            FactionID              = src.FactionID;
            FactionName            = EveIDToName.GetIDToName(FactionID);
            EnlistedDate           = src.EnlistedDate;
            CurrentRank            = src.CurrentRank;
            HighestRank            = src.HighestRank;
            KillsYesterday         = src.Kills?.Yesterday ?? 0;
            KillsLastWeek          = src.Kills?.LastWeek ?? 0;
            KillsTotal             = src.Kills?.Total ?? 0;
            VictoryPointsYesterday = src.VictoryPoints?.Yesterday ?? 0;
            VictoryPointsLastWeek  = src.VictoryPoints?.LastWeek ?? 0;
            VictoryPointsTotal     = src.VictoryPoints?.Total ?? 0;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Processes the queried character's factional warfare statistic information.
        /// </summary>
        /// <param name="result"></param>
        private void OnFactionalWarfareStatsUpdated(EsiAPIFactionalWarfareStats result)
        {
            var target    = m_ccpCharacter;
            int factionID = result.FactionID;

            // Character may have been deleted since we queried
            if (target != null)
            {
                // Update the enlisted in factional warfare flag
                if (factionID != 0)
                {
                    target.IsFactionalWarfareNotEnlisted = false;
                    target.FactionalWarfareStats         = new FactionalWarfareStats(result.ToXMLItem());
                }
                else
                {
                    target.IsFactionalWarfareNotEnlisted = true;
                }
                // Fires the event regarding factional warfare stats update
                EveMonClient.OnCharacterFactionalWarfareStatsUpdated(target);
            }
        }