private void TryToAddGameFromHeartbeatFile(string filepath, int processId) { var response = MagFilter.LaunchControl.GetHeartbeatStatus(filepath); if (response.IsValid) { var gameSession = _map.GetGameSessionByServerAccount(response.Status.ServerName, response.Status.AccountName); bool newGame = false; if (gameSession == null) { gameSession = new GameSession(); newGame = true; } UpdateGameSessionFromHeartbeatStatus(gameSession, filepath, response); if (newGame) { _map.AddGameSession(gameSession); } if (!_configurator.ContainsMagFilterPath(response.Status.MagFilterFilePath)) { var gameConfig = new Configurator.GameConfig() { MagFilterPath = response.Status.MagFilterFilePath, MagFilterVersion = response.Status.MagFilterVersion }; _configurator.AddGameConfig(gameConfig); Logger.WriteInfo(string.Format( "MagFilter#{0} found: {1}", _configurator.GetNumberGameConfigs(), gameConfig)); } NotifyGameChange(gameSession, GameChangeType.StartGame); } }
private void RecordGameDll() { var info = ThwargFilter.LaunchControl.GetThwargFilterInfo(); _configurator.AddGameConfig( new Configurator.GameConfig() { ThwargFilterPath = info.ThwargFilterPath, ThwargFilterVersion = info.ThwargFilterVersion } ); }