From a987618cd272c6279ce3ad07c27d9a4d6c6512ab Mon Sep 17 00:00:00 2001 From: ZouJin Date: Mon, 8 Apr 2024 20:12:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=8F=90=E8=B5=B7y=E4=B8=BA0?= =?UTF-8?q?,=20=E5=88=99=E4=B8=8D=E5=8A=A0=E8=BD=BD=E8=BF=99=E4=B8=80?= =?UTF-8?q?=E7=B3=BB=E5=88=97=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Core/Graph/GraphCore.cs | 13 +++++++------ .../ExtensionFunction.cs | 2 +- VPet-Simulator.Windows.Interface/IMainWindow.cs | 10 ++++++++++ VPet-Simulator.Windows/MainWindow.cs | 2 +- VPet-Simulator.Windows/MainWindow_Property.cs | 2 +- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/VPet-Simulator.Core/Graph/GraphCore.cs b/VPet-Simulator.Core/Graph/GraphCore.cs index 28884e0..ab49b2b 100644 --- a/VPet-Simulator.Core/Graph/GraphCore.cs +++ b/VPet-Simulator.Core/Graph/GraphCore.cs @@ -289,12 +289,12 @@ namespace VPet_Simulator.Core /// public void Set(LpsDocument lps) { - if (lps.FindLine("touchhead") != null) + if (lps.FindLine("touchhead") != null && lps["touchhead"][(gdbe)"py"] != 0) { TouchHeadLocate = new Point(lps["touchhead"][(gdbe)"px"], lps["touchhead"][(gdbe)"py"]); TouchHeadSize = new Size(lps["touchhead"][(gdbe)"sw"], lps["touchhead"][(gdbe)"wh"]); } - if (lps.FindLine("touchbody") != null) + if (lps.FindLine("touchbody") != null && lps["touchbody"][(gdbe)"py"] != 0) { TouchBodyLocate = new Point(lps["touchbody"][(gdbe)"px"], lps["touchbody"][(gdbe)"py"]); TouchBodySize = new Size(lps["touchbody"][(gdbe)"sw"], lps["touchbody"][(gdbe)"sh"]); @@ -302,21 +302,22 @@ namespace VPet_Simulator.Core if (lps.FindLine("touchraised") != null) { - TouchRaisedLocate = new Point[] { + if (lps["touchraised"][(gdbe)"happy_py"] != 0) + TouchRaisedLocate = new Point[] { new Point(lps["touchraised"].GetDouble("happy_px", TouchRaisedLocate[0].X), lps["touchraised"].GetDouble("happy_py", TouchRaisedLocate[0].Y)), new Point(lps["touchraised"].GetDouble("nomal_px", TouchRaisedLocate[1].X), lps["touchraised"].GetDouble("nomal_py", TouchRaisedLocate[1].Y)), new Point(lps["touchraised"].GetDouble("poorcondition_px", TouchRaisedLocate[2].X), lps["touchraised"].GetDouble("poorcondition_py", TouchRaisedLocate[2].Y)), new Point(lps["touchraised"].GetDouble("ill_px", TouchRaisedLocate[3].X), lps["touchraised"].GetDouble("ill_py", TouchRaisedLocate[3].Y)) }; - - TouchRaisedSize = new Size[] { + if (lps["touchraised"][(gdbe)"happy_sh"] != 0) + TouchRaisedSize = new Size[] { new Size(lps["touchraised"].GetDouble("happy_sw", TouchRaisedSize[0].Width), lps["touchraised"].GetDouble("happy_sh", TouchRaisedSize[0].Height)), new Size(lps["touchraised"].GetDouble("nomal_sw", TouchRaisedSize[1].Width), lps["touchraised"].GetDouble("nomal_sh", TouchRaisedSize[1].Height)), new Size(lps["touchraised"].GetDouble("poorcondition_sw", TouchRaisedSize[2].Width), lps["touchraised"].GetDouble("poorcondition_sh", TouchRaisedSize[2].Height)), new Size(lps["touchraised"].GetDouble("ill_sw", TouchRaisedSize[3].Width), lps["touchraised"].GetDouble("ill_sh", TouchRaisedSize[3].Height)) }; } - if (lps.FindLine("raisepoint") != null) + if (lps.FindLine("raisepoint") != null && lps["raisepoint"][(gdbe)"happy_y"] != 0) { RaisePoint = new Point[] { new Point(lps["raisepoint"].GetDouble("happy_x",RaisePoint[0].X), lps["raisepoint"].GetDouble("happy_y",RaisePoint[0].Y)), diff --git a/VPet-Simulator.Windows.Interface/ExtensionFunction.cs b/VPet-Simulator.Windows.Interface/ExtensionFunction.cs index 142a3f1..d0aa641 100644 --- a/VPet-Simulator.Windows.Interface/ExtensionFunction.cs +++ b/VPet-Simulator.Windows.Interface/ExtensionFunction.cs @@ -67,7 +67,7 @@ namespace VPet_Simulator.Windows.Interface lvlimit *= 10; if (Math.Abs(work.MoneyBase) > lvlimit) //等级获取速率限制 return true; - return rel > 1.3; // 推荐rel为1左右 超过1.3就是超模 + return rel > 1.4; // 推荐rel为1左右 超过1.3就是超模 } /// /// 数值梯度下降法 修复超模工作 diff --git a/VPet-Simulator.Windows.Interface/IMainWindow.cs b/VPet-Simulator.Windows.Interface/IMainWindow.cs index 2fcf4c5..dc00daf 100644 --- a/VPet-Simulator.Windows.Interface/IMainWindow.cs +++ b/VPet-Simulator.Windows.Interface/IMainWindow.cs @@ -166,8 +166,16 @@ namespace VPet_Simulator.Windows.Interface Grid PetGrid { get; } /// /// 当创建/加入新的多人联机窗口(访客表)时触发 + /// 如果你想写联机功能,请监听这个事件 /// event Action MutiPlayerHandle; + /// + /// 当创建/加入新的多人联机窗口(访客表)时触发 + /// 用于给MOD定义自己的联机窗口时准备的, 一般联机功能不需要调用这个 + /// + /// + void MutiPlayerStart(IMPWindows mp); + /// /// 显示吃东西(夹层)动画 /// @@ -179,6 +187,8 @@ namespace VPet_Simulator.Windows.Interface /// /// 物品 void TakeItem(Food item); + + } } diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index f41b5a3..bad7f58 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -2062,7 +2062,7 @@ namespace VPet_Simulator.Windows TextBlock tlvplus; public event Action MutiPlayerHandle; - internal void MutiPlayerStart(IMPWindows mp) + public void MutiPlayerStart(IMPWindows mp) { MutiPlayerHandle?.Invoke(mp); } diff --git a/VPet-Simulator.Windows/MainWindow_Property.cs b/VPet-Simulator.Windows/MainWindow_Property.cs index ed83d5b..a58cd76 100644 --- a/VPet-Simulator.Windows/MainWindow_Property.cs +++ b/VPet-Simulator.Windows/MainWindow_Property.cs @@ -18,7 +18,7 @@ public partial class MainWindow /// /// 版本号 /// - public int version { get; } = 11003; + public int version { get; } = 11004; /// /// 版本号 ///