private async void InitTracking() { await WorldData.GetDataListFromJsonAsync(); await LootChestData.GetDataListFromJsonAsync(); if (Settings.Default.IsTrackingActiveAtToolStart) { StartTracking(); } }
public void SetDungeonChestInformation(int id, string uniqueName) { if (_currentGuid != null && uniqueName != null) { try { var dun = GetCurrentDungeon((Guid)_currentGuid); if (dun == null || _currentGuid == null || dun.DungeonChests?.Any(x => x.Id == id) == true) { return; } var dunChest = new DungeonChestFragment { UniqueName = uniqueName, IsBossChest = LootChestData.IsBossChest(uniqueName), IsChestOpen = false, Id = id }; if (_mainWindow.Dispatcher.CheckAccess()) { dun.DungeonChests?.Add(dunChest); } else { _mainWindow.Dispatcher.Invoke(delegate { dun.DungeonChests?.Add(dunChest); }); } dun.Faction = LootChestData.GetFaction(uniqueName); dun.Mode = LootChestData.GetDungeonMode(uniqueName); } catch (Exception e) { Log.Error(nameof(SetDungeonChestInformation), e); } } }