/// <summary> /// Gets the last known docked description. /// </summary> /// <returns></returns> public string GetLastKnownDockedText() { if (String.IsNullOrEmpty(LastKnownLocation)) { return(EveMonConstants.UnknownText); } // Show the tooltip on when the user provides api key APIKey apiKey = Identity.FindAPIKeyWithAccess(CCPAPICharacterMethods.CharacterInfo); if (apiKey == null) { return(EveMonConstants.UnknownText); } // Check if in an NPC station or in an outpost Station station = LastKnownStation; // Not in any station ? if (station == null) { return(String.Empty); } ConquerableStation outpost = station as ConquerableStation; return(outpost?.FullName ?? station.Name); }
/// <summary> /// Gets the location. /// </summary> /// <returns></returns> private string GetLocation() { if (m_locationID == 0) { return(String.Empty); } string location = m_locationID.ToString(CultureConstants.InvariantCulture); if (m_locationID > Int32.MaxValue) { return(location); } int locationID = Convert.ToInt32(LocationID); Station station = Station.GetByID(locationID); ConquerableStation outpost = station as ConquerableStation; SolarSystem = station == null ? StaticGeography.GetSolarSystemByID(locationID) : station.SolarSystem; FullLocation = station == null ? SolarSystem == null ? location : SolarSystem.FullLocation : outpost != null ? outpost.FullLocation : station.FullLocation; return(station == null ? SolarSystem == null ? location : SolarSystem.Name : station.Name); }
/// <summary> /// Gets the station. /// </summary> /// <param name="id">The ID of the installation.</param> /// <returns>Name of the installation.</returns> private string GetInstallation(long id) { Station station = null; ConquerableStation outpost = null; // If 'id' is a 32bit number it may be a conquerable outpost station or station, // so we look it up in our datafile if (id <= Int32.MaxValue) { station = Station.GetByID((int)id); outpost = station as ConquerableStation; } // In case the 'id' doesn't correspond to a station, it's a starbase structure // and installation will be assigned manually based on activity // otherwise assigns the station name return(station == null ? Activity == BlueprintActivity.Manufacturing ? "POS - Assembly Array" : "POS - Laboratory" : outpost != null ? outpost.FullName : station.Name); }