diff --git a/JET_ProfileEditor/ExtClasses.cs b/JET_ProfileEditor/ExtClasses.cs index 4d40fda..f700119 100644 --- a/JET_ProfileEditor/ExtClasses.cs +++ b/JET_ProfileEditor/ExtClasses.cs @@ -1,4 +1,4 @@ -using Newtonsoft.Json; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -195,6 +195,14 @@ public class GridProps } public class ServerGlobals + { + //moved the Global Declaration to the Data Class -Fenex + public Data data { get; set; } + } + + //basicly a dirty fix adding compatibility for the "data" json node right before the "config" json node -Fenex + //"HealthEffect" and "ItemPreset" related stuff might not work in the profile editor since the json path changed -Fenex + public class Data { public Global config { get; set; } } @@ -223,4 +231,4 @@ public class TraderSuit public string _id { get; set; } public string suiteId { get; set; } } -} \ No newline at end of file +} diff --git a/JET_ProfileEditor/MainWindow.xaml.cs b/JET_ProfileEditor/MainWindow.xaml.cs index 0cb27fb..c82aade 100644 --- a/JET_ProfileEditor/MainWindow.xaml.cs +++ b/JET_ProfileEditor/MainWindow.xaml.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using MahApps.Metro.Controls; @@ -244,7 +244,8 @@ private void LoadDataWorker_DoWork(object sender, DoWorkEventArgs e) if (globalLang.Interface.ContainsKey(skill.Id)) commonSkills.Add(new SkillInfo { progress = (int)skill.Progress, name = globalLang.Interface[skill.Id], id = skill.Id }); } - foreach (var md in serverGlobals.config.Mastering) + //changed ...config... to ...data.config... -Fenex + foreach (var md in serverGlobals.data.config.Mastering) { string weapons = string.Empty; foreach (var tmp in md.Templates.Where(x => globalLang.Templates.ContainsKey(x))) @@ -268,7 +269,8 @@ private void LoadDataWorker_DoWork(object sender, DoWorkEventArgs e) temp.Add(add); Lang.Character.Skills.Mastering = temp.ToArray(); } - Dispatcher.Invoke(() => { allmastering_exp.Maximum = serverGlobals.config.Mastering.OrderByDescending(x => x.Level3).First()?.Level3 ?? 1000; }); + //changed ...config... to ...data.config... -Fenex + Dispatcher.Invoke(() => { allmastering_exp.Maximum = serverGlobals.data.config.Mastering.OrderByDescending(x => x.Level3).First()?.Level3 ?? 1000; }); } if (Lang.Character.TraderStandings != null) { @@ -1234,4 +1236,4 @@ private async void ShutdownCozServerRunned() System.Windows.Application.Current.Shutdown(); } } -} \ No newline at end of file +}