zochris / SCPSL-SpectatorDisabler

Prevents players from spectating and rushing to the last survivors once they respawn. Built on the EXILED framework for SCP: Secret Laboratory
Other
4 stars 1 forks source link

Newest update broke SCP-049-2 #70

Closed Wilnath closed 1 month ago

Wilnath commented 3 months ago

What happened?

Plugin can't find target methods for some patch anymore. They probably reworked SCP-049 reviving in some way so patches might have to be reworked entirely. Classic.

SCP:SL version

13.5

EXILED version

8.9.5

SpectatorDisabler version

latest

Relevant log output

[2024-06-08 20:04:06.580 +02:00] [ERROR] [Exiled.Loader] Plugin "SpectatorDisabler" threw an exception while enabling: HarmonyLib.HarmonyException: Patching exception in method static System.Collections.Generic.IEnumerable`1<System.Reflection.MethodBase> SpectatorDisabler.Patches.Scp049OnServerRoleSetPatch::TargetMethods() ---> System.Exception: Method static System.Collections.Generic.IEnumerable`1<System.Reflection.MethodBase> SpectatorDisabler.Patches.Scp049OnServerRoleSetPatch::TargetMethods() returned an unexpected result: some element was null
                                   at HarmonyLib.PatchClassProcessor.RunMethod[S,T] (T defaultIfNotExisting, T defaultIfFailing, System.Func`2[T,TResult] failOnResult, System.Object[] parameters) [0x00117] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
                                    --- End of inner exception stack trace ---
                                   at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
                                   at HarmonyLib.PatchClassProcessor.Patch () [0x00093] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
                                   at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
                                   at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
                                   at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
                                   at HarmonyLib.Harmony.PatchAll () [0x0001b] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
                                   at SpectatorDisabler.SpectatorDisabler.OnEnabled () [0x00033] in <884b946abe424b45a80ea609b02d7bc5>:0
                                   at Exiled.Loader.Loader.EnablePlugins () [0x000c6] in <3c2aac4d5c3141bf85c639e3fe40b7f4>:0
zochris commented 3 months ago

Sorry, I completely missed this issue. The fix seems trivial so far, but I need to test if something else broke.