private async Task ImportInternal() { DecorationsSaveSlotInfo selected = await SaveDataUtils.GetDecorationsSaveSlot(saveSlotInfoSelector); if (selected == null) { return; } ApplySaveDataDecorations(selected); }
private void ApplySaveDataDecorations(DecorationsSaveSlotInfo saveSlotDecorations) { foreach (JewelOverrideViewModel child in Jewels) { child.CanReportStateChange = false; } try { foreach (JewelOverrideViewModel child in Jewels) { child.IsOverriding = true; string gameName = $"{Core.Localization.GetDefault(child.Name)} {child.SlotSize}"; JewelInfo foundGameJewel = MasterData.FindJewelInfoByName(gameName); uint quantity = 0; if (foundGameJewel.Name != null) { if (saveSlotDecorations.Decorations.TryGetValue(foundGameJewel.ItemId, out quantity)) { child.IsOverriding = true; } } child.Count = (int)quantity; } } finally { foreach (JewelOverrideViewModel child in Jewels) { child.CanReportStateChange = true; } } ComputeVisibility(); HasChanged = true; }