From 214c13d1fa44e42009ad697ad45cce525bf8f8e6 Mon Sep 17 00:00:00 2001 From: Starrah Date: Mon, 27 Apr 2026 12:50:45 +0800 Subject: [PATCH] =?UTF-8?q?[F]=20OneKeyEntryEnd=E7=9A=84=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?bug=201.=20=E5=9C=A81.65=E4=BB=A5=E4=B8=8A=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E5=BC=80=E6=B8=B8=E5=AE=A2=E6=A8=A1=E5=BC=8F=E3=80=81?= =?UTF-8?q?=E4=B8=80=E9=A6=96=E6=AD=8C=E4=B8=8D=E6=89=93=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E7=BB=93=E6=9D=9FPC=EF=BC=8C=E6=B8=B8=E6=88=8F=E4=BC=9A?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=B4=A9=E6=BA=83=E3=80=82=E7=94=B11.65?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9A=84NetDataManager.GetGuestLogId?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=BC=95=E8=B5=B7=EF=BC=8C=E5=85=B7=E4=BD=93?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=E8=AF=A6=E8=A7=81=E4=BB=A3=E7=A0=81=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E6=B3=A8=E9=87=8A=E3=80=82=202.=20=EF=BC=88=E8=BD=BB?= =?UTF-8?q?=E5=BE=AEbug=EF=BC=8C=E4=B8=8D=E5=BD=B1=E5=93=8D=E4=BB=BB?= =?UTF-8?q?=E4=BD=95=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=8F=AA=E6=98=AF=E4=BC=9A?= =?UTF-8?q?=E5=9C=A8=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=89=93=E5=8D=B0=E5=87=BA?= =?UTF-8?q?=E4=B8=80=E8=A1=8CError=E4=B8=8D=E5=A5=BD=E7=9C=8B)=20`DoQuickS?= =?UTF-8?q?kip`=E8=B0=83=E7=94=A8AddProcess=E3=80=81=E5=B0=9D=E8=AF=95?= =?UTF-8?q?=E7=BB=93=E6=9D=9FPC=E5=90=8E=EF=BC=8C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E8=B7=B3=E5=87=BA=E5=BE=AA=E7=8E=AF=EF=BC=8C?= =?UTF-8?q?=E9=80=A0=E6=88=90=E8=BF=AD=E4=BB=A3=E5=99=A8=E7=BB=A7=E7=BB=AD?= =?UTF-8?q?=E9=81=8D=E5=8E=86=E6=97=B6=E6=8A=9B=E5=BC=82=E5=B8=B8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AquaMai.Mods/UX/OneKeyEntryEnd.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/AquaMai.Mods/UX/OneKeyEntryEnd.cs b/AquaMai.Mods/UX/OneKeyEntryEnd.cs index 4b93081c..a10f365b 100644 --- a/AquaMai.Mods/UX/OneKeyEntryEnd.cs +++ b/AquaMai.Mods/UX/OneKeyEntryEnd.cs @@ -86,7 +86,7 @@ public static void DoQuickSkip() SharedInstances.ProcessDataContainer.processManager.AddProcess(new FadeProcess(SharedInstances.ProcessDataContainer, process.Process, new UnlockMusicProcess(SharedInstances.ProcessDataContainer))); } - break; + return; // 执行上面的AddProcess操作,会引起processList中链表中内容的改变,foreach继续遍历就会`System.InvalidOperationException: Collection was modified`. 但是反正该做的事已经做完了,所以直接return就好 } } @@ -97,4 +97,16 @@ public static void DoQuickSkip() new MusicSelectProcess(SharedInstances.ProcessDataContainer))); } } + + [EnableGameVersion(26500, noWarn: true)] + [HarmonyPatch(typeof(NetDataManager), "GetGuestLogId")] + [HarmonyFinalizer] + public static Exception GetGuestLogIdFix(Exception __exception, ref ulong __result) + { + // 如果在游客模式下,一首歌都没打就跳关了: + // NetDataManager.GetGuestLogId中会调用Singleton.Instance.GetGameScore,这个函数查不到对应的GameScoreList对象,就会返回null;于是就NPE了 + // 我们则捕获这里的异常,返回数字0(这正是1.60之前的行为) + if (__exception != null) __result = 0L; + return null; + } } \ No newline at end of file