From c255cc1ca15689fbe42774648ad4b256914eeb49 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Mon, 15 Apr 2024 14:16:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=81=94=E6=9C=BA=E5=9D=90?= =?UTF-8?q?=E4=B8=8B=E5=8A=A8=E7=94=BB=E6=88=96=E4=BE=A7=E8=BA=BA=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E9=99=90=E6=97=B6=E9=94=99=E8=AF=AF=20#353?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MutiPlayer/MPFriends.xaml.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/VPet-Simulator.Windows/MutiPlayer/MPFriends.xaml.cs b/VPet-Simulator.Windows/MutiPlayer/MPFriends.xaml.cs index faf0cb3..9166d3f 100644 --- a/VPet-Simulator.Windows/MutiPlayer/MPFriends.xaml.cs +++ b/VPet-Simulator.Windows/MutiPlayer/MPFriends.xaml.cs @@ -11,6 +11,7 @@ using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; +using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Threading; @@ -255,7 +256,7 @@ public partial class MPFriends : WindowX, IMPFriend DisplayFoodAnimation(feed.Item.GetGraph(), Dispatcher.Invoke(() => ImageSources.FindImage("food_" + (feed.Item.Image ?? feed.Item.Name), "food"))); if (feed.EnableFunction) { - mw.Main.LabelDisplayShow("{0}花费${3}给{4}的{1}买了{2}".Translate(byname, mw.GameSavesData.GameSave.Name, + mw.Main.LabelDisplayShow("{0}花费${3}给{4}的{1}买了{2}".Translate(byname, mw.GameSavesData.GameSave.Name, feed.Item.TranslateName, feed.Item.Price, friend.Name)); wmp.Log("{0}花费${3}{4}的给{1}买了{2}".Translate(byname, mw.GameSavesData.GameSave.Name, feed.Item.TranslateName, feed.Item.Price, friend.Name)); @@ -685,10 +686,10 @@ public partial class MPFriends : WindowX, IMPFriend if (gi.Type != GraphType.Common) return false; } - var img = Core.Graph.FindGraph(gi.Name, gi.Animat, Core.Save.Mode); - if (img != null) + var img = Core.Graph.FindGraphs(gi.Name, gi.Animat, Core.Save.Mode).FindAll(x => x.GraphInfo.Type == gi.Type); + if (img.Count != 0) { - Main.Display(img, () => DisplayAuto(gi)); + Main.Display(img[Function.Rnd.Next(img.Count)], () => DisplayAuto(gi)); return true; } return false;