diff --git a/Bloxstrap/Watcher.cs b/Bloxstrap/Watcher.cs index eef397e..d56c95f 100644 --- a/Bloxstrap/Watcher.cs +++ b/Bloxstrap/Watcher.cs @@ -28,21 +28,21 @@ namespace Bloxstrap string? watcherDataArg = App.LaunchSettings.WatcherFlag.Data; -#if DEBUG if (String.IsNullOrEmpty(watcherDataArg)) { +#if DEBUG string path = new RobloxPlayerData().ExecutablePath; using var gameClientProcess = Process.Start(path); _watcherData = new() { ProcessId = gameClientProcess.Id }; - } #else - if (String.IsNullOrEmpty(watcherDataArg)) throw new Exception("Watcher data not specified"); #endif - - if (!String.IsNullOrEmpty(watcherDataArg)) + } + else + { _watcherData = JsonSerializer.Deserialize(Encoding.UTF8.GetString(Convert.FromBase64String(watcherDataArg))); + } if (_watcherData is null) throw new Exception("Watcher data is invalid");