public JObject CreateEDDNMessage(JournalLocation journal) { if (!journal.HasCoordinate || journal.StarPosFromEDSM) { return(null); } JObject msg = new JObject(); msg["header"] = Header(); msg["$schemaRef"] = GetEDDNJournalSchemaRef(); JObject message = journal.GetJson(); message = RemoveCommonKeys(message); message.Remove("StarPosFromEDSM"); message.Remove("Latitude"); message.Remove("Longitude"); /* * if (!journal.Docked) * { * message.Remove("Body"); * message.Remove("BodyType"); * message.Remove("BodyID"); * } */ msg["message"] = message; return(msg); }
public JObject CreateEDDNMessage(JournalLocation journal) { if (!journal.HasCoordinate || journal.StarPosFromEDSM || journal.SystemAddress == null) { return(null); } JObject msg = new JObject(); msg["header"] = Header(); msg["$schemaRef"] = GetEDDNJournalSchemaRef(); JObject message = journal.GetJson(); if (message == null) { return(null); } message = RemoveCommonKeys(message); message = RemoveFactionReputation(message); message.Remove("StarPosFromEDSM"); message.Remove("Latitude"); message.Remove("Longitude"); message.Remove("MyReputation"); message.Remove("ActiveFine"); message = FilterJournalEvent(message, AllowedFieldsLocation); msg["message"] = message; return(msg); }