/// <summary> /// Gets the station information from its ID. Works on NPC, conquerable, and citadel stations. /// </summary> /// <param name="id">The id.</param> /// <returns>The station information</returns> internal static Station GetIDToStation(long id) { var station = StaticGeography.GetStationByID(id); if (station == null && id != 0L) { SerializableOutpost serStation; // Citadels have ID over maximum int value if (id < int.MaxValue) { serStation = s_conq.LookupID(id); } else { serStation = s_cita.LookupID(id); } if (serStation != null) { station = new Station(serStation); } } return(station); }
/// <summary> /// Gets the station information from its ID. Works on NPC stations and citadels. /// Since conquerable stations were converted, no attempt is made to check the ESI /// station endpoint online as all stations should (TM) be in the SDE... /// </summary> /// <param name="id">The id.</param> /// <returns>The station information</returns> internal static Station GetIDToStation(long id, CCPCharacter character = null) { var station = StaticGeography.GetStationByID(id); if (station == null && id > int.MaxValue) { // Citadels have ID over maximum int value var serStation = s_cita.LookupIDESI(id, character)?.Station; if (serStation != null) { station = new Station(serStation); } else { station = Station.CreateInaccessible(id); } } return(station); }