From a0d58ca7b697f4b370f6cac4420fbf7dec685889 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Wed, 16 Aug 2023 16:46:59 +1000 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=97=B6=E5=96=9C=E5=A5=BD?= =?UTF-8?q?=E5=BA=A6=E5=88=B7=E6=96=B0=20Fix=20#34?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WinDesign/winBetterBuy.xaml.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs index e4a291b..29f0b86 100644 --- a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs +++ b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs @@ -58,6 +58,22 @@ namespace VPet_Simulator.Windows LsbCategory.SelectedIndex = (int)type; if (rMoney != null) rMoney.Text = mw.Core.Save.Money.ToString("f2"); + + //喜好度刷新 + foreach (var sub in mw.Set.PetData) + { + if (sub.Name.StartsWith("buytime_")) + { + var name = sub.Name.Substring(8); + var food = mw.Foods.FirstOrDefault(x => x.Name == name); + if(food != null) + { + food.LoadEatTimeSource(mw); + food.NotifyOfPropertyChange("Eattime"); + } + } + } + Show(); } public void OrderItemSource(Food.FoodType type, int sortrule, bool sortasc, string searchtext = null)