From cce8bf799745709c6b9953c28313156b0b0aa03e Mon Sep 17 00:00:00 2001 From: ZouJin Date: Wed, 16 Aug 2023 15:37:21 +1000 Subject: [PATCH] =?UTF-8?q?=E7=A4=BC=E7=89=A9=E7=9B=B8=E5=85=B3=E6=94=AF?= =?UTF-8?q?=E6=8C=81(=E6=9C=AA=E5=8F=91=E5=B8=83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Core/Graph/GraphInfo.cs | 4 ++++ .../WinDesign/winBetterBuy.xaml | 1 + .../WinDesign/winBetterBuy.xaml.cs | 16 ++++++++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/VPet-Simulator.Core/Graph/GraphInfo.cs b/VPet-Simulator.Core/Graph/GraphInfo.cs index c68c741..d67188d 100644 --- a/VPet-Simulator.Core/Graph/GraphInfo.cs +++ b/VPet-Simulator.Core/Graph/GraphInfo.cs @@ -227,6 +227,10 @@ namespace VPet_Simulator.Core /// 喝东西 /// Drink, + /// + /// 收到礼物 + /// + Gift, } /// /// 动作: 动画的动作 Start Loop End diff --git a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml index 786a17c..1f53205 100644 --- a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml +++ b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml @@ -209,6 +209,7 @@ + diff --git a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs index c8a8106..e4a291b 100644 --- a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs +++ b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs @@ -237,8 +237,20 @@ namespace VPet_Simulator.Windows } } - - var name = mw.Core.Graph.FindName(item.Type == Food.FoodType.Drink ? GraphType.Drink : GraphType.Eat); + GraphType gt; + switch (item.Type) + { + default: + gt = GraphType.Eat; + break; + case Food.FoodType.Drink: + gt = GraphType.Drink; + break; + case Food.FoodType.Gift: + gt = GraphType.Gift; + break; + } + var name = mw.Core.Graph.FindName(gt); var ig = mw.Core.Graph.FindGraph(name, AnimatType.Single, mw.Core.Save.Mode); if (ig != null) { -- GitLab