File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ public static void DoQuickSkip()
8686 SharedInstances . ProcessDataContainer . processManager . AddProcess ( new FadeProcess ( SharedInstances . ProcessDataContainer , process . Process ,
8787 new UnlockMusicProcess ( SharedInstances . ProcessDataContainer ) ) ) ;
8888 }
89- break ;
89+ return ; // 执行上面的AddProcess操作,会引起processList中链表中内容的改变,foreach继续遍历就会`System.InvalidOperationException: Collection was modified`. 但是反正该做的事已经做完了,所以直接return就好
9090 }
9191 }
9292
@@ -97,4 +97,16 @@ public static void DoQuickSkip()
9797 new MusicSelectProcess ( SharedInstances . ProcessDataContainer ) ) ) ;
9898 }
9999 }
100+
101+ [ EnableGameVersion ( 26500 , noWarn : true ) ]
102+ [ HarmonyPatch ( typeof ( NetDataManager ) , "GetGuestLogId" ) ]
103+ [ HarmonyFinalizer ]
104+ public static Exception GetGuestLogIdFix ( Exception __exception , ref ulong __result )
105+ {
106+ // 如果在游客模式下,一首歌都没打就跳关了:
107+ // NetDataManager.GetGuestLogId中会调用Singleton<GamePlayManager>.Instance.GetGameScore,这个函数查不到对应的GameScoreList对象,就会返回null;于是就NPE了
108+ // 我们则捕获这里的异常,返回数字0(这正是1.60之前的行为)
109+ if ( __exception != null ) __result = 0L ;
110+ return null ;
111+ }
100112}
You can’t perform that action at this time.
0 commit comments