private void GetMarketBoardData() { if (!Configuration.General.GetMarketBoardData) { return; } if (LogLineEvent?.KaptureEvent?.Item == null) { return; } if (!LogLineEvent.KaptureEvent.Item.IsMarketable) { return; } if (LogLineEvent?.KaptureEvent?.Reporter?.HomeWorld == null) { return; } var worldId = LogLineEvent.KaptureEvent.Reporter.HomeWorld.Id; var itemId = LogLineEvent.KaptureEvent.Item.Id; if (worldId == 0 || itemId == 0) { return; } LogLineEvent.KaptureEvent.Item.MarketBoard = UniversalisWrapper.GetInstance().GetMarketBoard(worldId, itemId); }
private void SetupKaptureService() { _httpClient = new HttpClient(); _kaptureVersion = Assembly.GetExecutingAssembly() .GetCustomAttribute <AssemblyInformationalVersionAttribute>().InformationalVersion; _updaterSettings = new PluginUpdaterSettings { AuthorName = "kalilistic", RepoName = "Kapture", IncludePreRelease = _configuration.General.CheckForBetaEnabled, PluginPath = ActGlobals.oFormActMain.PluginGetSelfData(this).pluginFile.DirectoryName, HTTPClient = _httpClient, Version = _kaptureVersion, UpdateMessage = Strings.PluginUpdateAvailable, RestartMessage = Strings.PluginUpdateSuccess, FailureMessage = Strings.PluginUpdateFailed }; UniversalisWrapper.Initialize(_httpClient); }
public void Setup() { _httpClient = new HttpClient(); _wrapper = new UniversalisWrapper(_httpClient); }