using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security.Permissions; using System.Threading; using .$Mirage.Revive.Domain; using .$Mirage.Revive.Hook; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using FSharpPlus; using FSharpPlus.Control; using GameNetcodeStuff; using LobbyCompatibility.Enums; using LobbyCompatibility.Features; using Microsoft.FSharp.Collections; using Microsoft.FSharp.Control; using Microsoft.FSharp.Core; using Microsoft.FSharp.Core.CompilerServices; using Mirage.Revive.Domain; using Mirage.Revive.Hook; using Mirage.Revive.Unity; using MirageRevive.NetcodePatcher; using On; using On.GameNetcodeStuff; using Unity.Collections; using Unity.Netcode; using UnityEngine; [assembly: FSharpInterfaceDataVersion(2, 0, 0)] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("DunGen")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.ASPP")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.UnityNav")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.XR.CoreUtils")] [assembly: IgnoresAccessChecksTo("Unity.XR.Management")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.ConformanceAutomation")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MetaQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MockRuntime")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.OculusQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.RuntimeDebugger")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.SpatialTracking")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("UnityEngine.XR.LegacyInputHelpers")] [assembly: AssemblyCompany("MirageRevive")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+b678040b73b05cff93508fa92e44b83f62cc77c0")] [assembly: AssemblyProduct("MirageRevive")] [assembly: AssemblyTitle("MirageRevive")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyCompany("qwbarch, Cpt.Dristyler")] [assembly: AssemblyDescription("MirageRevive — rebuilt for current Lethal Company (v81) by Cpt.Dristyler. Original by qwbarch.")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: NetcodePatchedAssembly] internal class { static () { } } namespace Mirage.Revive { [Serializable] [BepInPlugin("qwbarch.MirageRevive", "MirageRevive", "1.3.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public void Awake() { Mirage.Revive.Domain.Config.initConfig(((BaseUnityPlugin)this).Config); Mirage.Revive.Domain.Netcode.initNetcodePatcher(); Compatibility.initLobbyCompatibility(); Mirage.Revive.Hook.Config.syncConfig(); Mirage.Revive.Hook.MaskedPlayerEnemy.revivePlayersOnDeath(); Mirage.Revive.Domain.Logger.logInfo.Invoke(PrintfModule.PrintFormatToStringThen>((PrintfFormat, Unit, string, string>)(object)new PrintfFormat, Unit, string, string, string>("MirageRevive v%s — rebuilt for current Lethal Company (v81) by Cpt.Dristyler (original: qwbarch).")).Invoke("1.3.1")); } } } namespace { internal static class $Plugin { } } namespace Mirage.Revive.Hook { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class MaskedPlayerEnemy { [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static class revivePlayersOnDeath@61 { internal static void Invoke(orig_Awake orig, PlayerControllerB self) { orig.Invoke(self); BodyDeactivator.BodyDeactivator bodyDeactivator = ((Component)self).gameObject.AddComponent(); } } [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static class revivePlayersOnDeath@67-1 { internal static void Invoke(orig_Start orig, GameNetworkManager self) { orig.Invoke(self); List prefabs = ((Component)self).GetComponent().NetworkConfig.Prefabs.m_Prefabs; foreach (NetworkPrefab item in prefabs) { MaskedPlayerEnemy component = item.Prefab.gameObject.GetComponent(); if ((object)component != null && string.Equals(((EnemyAI)component).enemyType.enemyName, "Masked")) { MaskedPlayerEnemy.maskedEnemyPrefab = ((Component)component).gameObject; } } GameObject maskedEnemyPrefab = MaskedPlayerEnemy.maskedEnemyPrefab; if ((object)maskedEnemyPrefab == null) { Mirage.Revive.Domain.Logger.logWarning.Invoke("HauntedMaskItem prefab is missing. Another mod is messing with this prefab when they shouldn't be."); } } } [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static class revivePlayersOnDeath@79-2 { internal static void Invoke(orig_StartGame orig, StartOfRound self) { orig.Invoke(self); killedPlayers.Clear(); } } [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static class revivePlayersOnDeath@87-3 { internal static void Invoke(orig_KillPlayerServerRpc orig, PlayerControllerB self, int playerId, bool spawnBody, Vector3 bodyVelocity, int causeOfDeath, int deathAnimation, Vector3 positionOffset, bool setOverrideDropItems) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, playerId, spawnBody, bodyVelocity, causeOfDeath, deathAnimation, positionOffset, setOverrideDropItems); if (((NetworkBehaviour)self).IsHost) { PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController; if (!HashCompare.GenericEqualityIntrinsic(self, localPlayerController)) { spawnMaskedEnemy(self, causeOfDeath, deathAnimation, spawnBody, bodyVelocity); } } } } [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static class revivePlayersOnDeath@92-4 { internal static void Invoke(orig_KillPlayer orig, PlayerControllerB self, Vector3 bodyVelocity, bool spawnBody, CauseOfDeath causeOfDeath, int deathAnimation, Vector3 positionOffset, bool setOverrideDropItems) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected I4, but got Unknown orig.Invoke(self, bodyVelocity, spawnBody, causeOfDeath, deathAnimation, positionOffset, setOverrideDropItems); if (((NetworkBehaviour)self).IsHost && HashCompare.GenericEqualityIntrinsic(self, StartOfRound.Instance.localPlayerController)) { spawnMaskedEnemy(self, (int)causeOfDeath, deathAnimation, spawnBody, bodyVelocity); } } } [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal sealed class revivePlayersOnDeath@103-6 : GeneratedSequenceBase { public orig_EndOfGame orig; public StartOfRound self; public int bodiesEnsured; public int connectedPlayersOnServer; public int scrapCollected; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public IEnumerator @enum; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public int pc; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public IEnumerator current; public revivePlayersOnDeath@103-6(orig_EndOfGame orig, StartOfRound self, int bodiesEnsured, int connectedPlayersOnServer, int scrapCollected, IEnumerator @enum, int pc, IEnumerator current) { this.orig = orig; this.self = self; this.bodiesEnsured = bodiesEnsured; this.connectedPlayersOnServer = connectedPlayersOnServer; this.scrapCollected = scrapCollected; this.@enum = @enum; this.pc = pc; this.current = current; base..ctor(); } public override int GenerateNext(ref IEnumerable next) { switch (pc) { default: pc = 1; current = orig.Invoke(self, bodiesEnsured, connectedPlayersOnServer, scrapCollected); return 1; case 1: @enum = ((IEnumerable)self.allPlayerScripts).GetEnumerator(); pc = 2; while (@enum.MoveNext()) { PlayerControllerB val = @enum.Current; val.deadBody = null; } goto case 2; case 2: pc = 3; IntrinsicFunctions.Dispose>(@enum); @enum = null; pc = 3; break; case 3: break; } current = null; return 0; } public override void Close() { Exception ex = default(Exception); while (true) { switch (pc) { case 3: if (ex != null) { throw ex; } return; } try { switch (pc) { default: pc = 3; IntrinsicFunctions.Dispose>(@enum); break; case 0: case 1: case 3: break; } pc = 3; current = null; } catch (object obj) { Exception ex2 = (Exception)obj; ex = ex2; } } } public override bool get_CheckClose() { switch (pc) { default: return true; case 1: return false; case 0: case 3: return false; } } [CompilerGenerated] [DebuggerNonUserCode] public override IEnumerator get_LastGenerated() { return current; } [CompilerGenerated] [DebuggerNonUserCode] public override IEnumerator GetFreshEnumerator() { return (IEnumerator)(object)new revivePlayersOnDeath@103-6(orig, self, bodiesEnsured, connectedPlayersOnServer, scrapCollected, null, 0, null); } } [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static class revivePlayersOnDeath@101-5 { internal static IEnumerator Invoke(orig_EndOfGame orig, StartOfRound self, int bodiesEnsured, int connectedPlayersOnServer, int scrapCollected) { return (IEnumerator)(object)new revivePlayersOnDeath@103-6(orig, self, bodiesEnsured, connectedPlayersOnServer, scrapCollected, null, 0, null); } } [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static Random random => .$Mirage.Revive.Hook.MaskedPlayerEnemy.random@14; [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static HashSet killedPlayers => .$Mirage.Revive.Hook.MaskedPlayerEnemy.killedPlayers@17; [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static GameObject maskedEnemyPrefab { get { return .$Mirage.Revive.Hook.MaskedPlayerEnemy.maskedEnemyPrefab@19; } set { .$Mirage.Revive.Hook.MaskedPlayerEnemy.maskedEnemyPrefab@19 = value; } } [CompilationArgumentCounts(new int[] { 1, 1, 1, 1, 1 })] internal static void spawnMaskedEnemy(PlayerControllerB player, int causeOfDeath, int deathAnimation, bool spawnBody, a bodyVelocity) { if (killedPlayers.Add(player.playerClientId)) { spawnMaskedEnemy$cont@23(player, causeOfDeath, deathAnimation, spawnBody, bodyVelocity, null); } } public static void revivePlayersOnDeath() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown PlayerControllerB.Awake += new hook_Awake(revivePlayersOnDeath@61.Invoke); GameNetworkManager.Start += new hook_Start(revivePlayersOnDeath@67-1.Invoke); StartOfRound.StartGame += new hook_StartGame(revivePlayersOnDeath@79-2.Invoke); PlayerControllerB.KillPlayerServerRpc += new hook_KillPlayerServerRpc(revivePlayersOnDeath@87-3.Invoke); PlayerControllerB.KillPlayer += new hook_KillPlayer(revivePlayersOnDeath@92-4.Invoke); StartOfRound.EndOfGame += new hook_EndOfGame(revivePlayersOnDeath@101-5.Invoke); } internal static bool spawnRateSuccess@38(Mirage.Revive.Domain.Config.SyncedConfig config, Unit unitVar0) { return random.Next(1, 101) <= config.reviveChance@; } } } namespace .$Mirage.Revive.Hook { internal static class MaskedPlayerEnemy { [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static readonly Random random@14; [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static readonly HashSet killedPlayers@17; [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static GameObject maskedEnemyPrefab@19; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal static int init@; static MaskedPlayerEnemy() { random@14 = new Random(); killedPlayers@17 = new HashSet(); maskedEnemyPrefab@19 = null; } } } namespace Mirage.Revive.Unity { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class BodyDeactivator { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class BodyDeactivator : NetworkBehaviour { public void DeactivateBody(EnemyAI enemy) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB component = ((Component)this).GetComponent(); DeadBodyInfo deadBody = component.deadBody; if ((object)deadBody != null && 0 == 0) { component.redirectToEnemy = enemy; component.deadBody.DeactivateBody(false); if (((NetworkBehaviour)this).IsHost) { DeactivateBodyClientRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)this).NetworkObject)); } } } [ClientRpc] public void DeactivateBodyClientRpc(NetworkObjectReference reference) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(727223059u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref reference, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 727223059u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((NetworkBehaviour)this).IsHost) { NetworkObject val3 = null; if (((NetworkObjectReference)(ref reference)).TryGet(ref val3, (NetworkManager)null)) { DeactivateBody(((Component)val3).GetComponent()); } else { Mirage.Revive.Domain.Logger.logError.Invoke("DeactivateBodyClientRpc received an invalid network object reference."); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_BodyDeactivator() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(727223059u, (RpcReceiveHandler)new RpcReceiveHandler(__rpc_handler_727223059)); } private static void __rpc_handler_727223059(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference reference = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref reference, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)2; ((BodyDeactivator)(object)target).DeactivateBodyClientRpc(reference); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "BodyDeactivator"; } } } } namespace .$Mirage.Revive.Unity { internal static class BodyDeactivator { } } namespace Mirage.Revive.Hook { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class Config { [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static class syncConfig@7 { internal static void Invoke(orig_ConnectClientToPlayerObject orig, PlayerControllerB self) { orig.Invoke(self); if (NetworkManager.Singleton.IsHost) { Mirage.Revive.Domain.Config.registerHandler(Mirage.Revive.Domain.Config.SyncAction.RequestSync); return; } Mirage.Revive.Domain.Config.registerHandler(Mirage.Revive.Domain.Config.SyncAction.ReceiveSync); Mirage.Revive.Domain.Config.requestSync(); } } [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static class syncConfig@16-1 { internal static void Invoke(orig_StartDisconnect orig, GameNetworkManager self) { orig.Invoke(self); Mirage.Revive.Domain.Config.revertSync(); } } public static void syncConfig() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown PlayerControllerB.ConnectClientToPlayerObject += new hook_ConnectClientToPlayerObject(syncConfig@7.Invoke); GameNetworkManager.StartDisconnect += new hook_StartDisconnect(syncConfig@16-1.Invoke); } } } namespace .$Mirage.Revive.Hook { internal static class Config { } } namespace Mirage.Revive.Domain { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class Config { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class LocalConfig { internal ConfigEntry ReviveChance@; internal ConfigEntry ReviveOnlyWhenPlayerAlone@; public ConfigEntry ReviveChance { [CompilerGenerated] [DebuggerNonUserCode] get { return ReviveChance@; } } public ConfigEntry ReviveOnlyWhenPlayerAlone { [CompilerGenerated] [DebuggerNonUserCode] get { return ReviveOnlyWhenPlayerAlone@; } } public LocalConfig(ConfigFile config) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown ReviveChance@ = config.Bind("Revive", "Revive chance", 10, new ConfigDescription("The chance a player will revive as a masked enemy, on player death.", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); ReviveOnlyWhenPlayerAlone@ = config.Bind("Revive", "Revive only when alone", false, "If enabled, revivals only happen when the player dies alone (where others will almost never see the masked enemy come to life from your body)." + "If disabled, revivals will always happen based on the configured chance, which means players that are near you can see the masked enemy coming back to life."); } } [Serializable] [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public sealed class SyncedConfig : IEquatable, IStructuralEquatable, IComparable, IComparable, IStructuralComparable { [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal int reviveChance@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal bool reviveOnlyWhenPlayerAlone@; [CompilationMapping(/*Could not decode attribute arguments.*/)] public int reviveChance { [CompilerGenerated] [DebuggerNonUserCode] get { return reviveChance@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public bool reviveOnlyWhenPlayerAlone { [CompilerGenerated] [DebuggerNonUserCode] get { return reviveOnlyWhenPlayerAlone@; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(SyncedConfig))] public SyncedConfig(int reviveChance, bool reviveOnlyWhenPlayerAlone) { reviveChance@ = reviveChance; reviveOnlyWhenPlayerAlone@ = reviveOnlyWhenPlayerAlone; } [CompilerGenerated] public override string ToString() { return ExtraTopLevelOperators.PrintFormatToString>((PrintfFormat, Unit, string, string>)(object)new PrintfFormat, Unit, string, string, SyncedConfig>("%+A")).Invoke(this); } [CompilerGenerated] public sealed int CompareTo(SyncedConfig obj) { if (this != null) { if (obj != null) { IComparer genericComparer = LanguagePrimitives.GenericComparer; int num = reviveChance@; int num2 = obj.reviveChance@; int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0); if (num3 < 0) { return num3; } if (num3 > 0) { return num3; } genericComparer = LanguagePrimitives.GenericComparer; bool flag = reviveOnlyWhenPlayerAlone@; bool flag2 = obj.reviveOnlyWhenPlayerAlone@; return (flag ? 1 : 0) - (flag2 ? 1 : 0); } return 1; } if (obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int CompareTo(object obj) { return CompareTo((SyncedConfig)obj); } [CompilerGenerated] public sealed int CompareTo(object obj, IComparer comp) { SyncedConfig syncedConfig = (SyncedConfig)obj; if (this != null) { if ((SyncedConfig)obj != null) { int num = reviveChance@; int num2 = syncedConfig.reviveChance@; int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0); if (num3 < 0) { return num3; } if (num3 > 0) { return num3; } bool flag = reviveOnlyWhenPlayerAlone@; bool flag2 = syncedConfig.reviveOnlyWhenPlayerAlone@; return (flag ? 1 : 0) - (flag2 ? 1 : 0); } return 1; } if ((SyncedConfig)obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int GetHashCode(IEqualityComparer comp) { if (this != null) { int num = 0; num = -1640531527 + ((reviveOnlyWhenPlayerAlone@ ? 1 : 0) + ((num << 6) + (num >> 2))); return -1640531527 + (reviveChance@ + ((num << 6) + (num >> 2))); } return 0; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] public bool Equals(SyncedConfig obj, IEqualityComparer comp) { if (this != null) { if (obj != null) { if (reviveChance@ == obj.reviveChance@) { return reviveOnlyWhenPlayerAlone@ == obj.reviveOnlyWhenPlayerAlone@; } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed bool Equals(object obj, IEqualityComparer comp) { if (obj is SyncedConfig obj2) { return Equals(obj2, comp); } return false; } [CompilerGenerated] public sealed bool Equals(SyncedConfig obj) { if (this != null) { if (obj != null) { if (reviveChance@ == obj.reviveChance@) { return reviveOnlyWhenPlayerAlone@ == obj.reviveOnlyWhenPlayerAlone@; } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is SyncedConfig obj2) { return Equals(obj2); } return false; } } [Serializable] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [DebuggerDisplay("{__DebugDisplay(),nq}")] [CompilationMapping(/*Could not decode attribute arguments.*/)] public sealed class SyncAction : IEquatable, IStructuralEquatable, IComparable, IComparable, IStructuralComparable { public static class Tags { public const int RequestSync = 0; public const int ReceiveSync = 1; } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] [field: DebuggerNonUserCode] public int Tag { [DebuggerNonUserCode] get; } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] [field: DebuggerNonUserCode] public static SyncAction RequestSync { [CompilationMapping(/*Could not decode attribute arguments.*/)] [DebuggerNonUserCode] get; } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] public bool IsRequestSync { [CompilerGenerated] [DebuggerNonUserCode] get { return Tag == 0; } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] [field: DebuggerNonUserCode] public static SyncAction ReceiveSync { [CompilationMapping(/*Could not decode attribute arguments.*/)] [DebuggerNonUserCode] get; } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] public bool IsReceiveSync { [CompilerGenerated] [DebuggerNonUserCode] get { return Tag == 1; } } static SyncAction() { _unique_RequestSync = new SyncAction(0); _unique_ReceiveSync = new SyncAction(1); } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicNestedTypes | DynamicallyAccessedMemberTypes.NonPublicNestedTypes | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(SyncAction))] [CompilerGenerated] [DebuggerNonUserCode] internal SyncAction(int _tag) { this._tag = _tag; } [SpecialName] [CompilerGenerated] [DebuggerNonUserCode] internal object __DebugDisplay() { return ExtraTopLevelOperators.PrintFormatToString>((PrintfFormat, Unit, string, string>)(object)new PrintfFormat, Unit, string, string, string>("%+0.8A")).Invoke(this); } [CompilerGenerated] public override string ToString() { return ExtraTopLevelOperators.PrintFormatToString>((PrintfFormat, Unit, string, string>)(object)new PrintfFormat, Unit, string, string, SyncAction>("%+A")).Invoke(this); } [CompilerGenerated] public sealed int CompareTo(SyncAction obj) { if (this != null) { if (obj != null) { int tag = _tag; int tag2 = obj._tag; if (tag == tag2) { return 0; } return tag - tag2; } return 1; } if (obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int CompareTo(object obj) { return CompareTo((SyncAction)obj); } [CompilerGenerated] public sealed int CompareTo(object obj, IComparer comp) { SyncAction syncAction = (SyncAction)obj; if (this != null) { if ((SyncAction)obj != null) { int tag = _tag; int tag2 = syncAction._tag; if (tag == tag2) { return 0; } return tag - tag2; } return 1; } if ((SyncAction)obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int GetHashCode(IEqualityComparer comp) { return this?._tag ?? 0; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] public bool Equals(SyncAction obj, IEqualityComparer comp) { if (this != null) { if (obj != null) { int tag = _tag; int tag2 = obj._tag; return tag == tag2; } return false; } return obj == null; } [CompilerGenerated] public sealed bool Equals(object obj, IEqualityComparer comp) { if (obj is SyncAction obj2) { return Equals(obj2, comp); } return false; } [CompilerGenerated] public sealed bool Equals(SyncAction obj) { if (this != null) { if (obj != null) { int tag = _tag; int tag2 = obj._tag; return tag == tag2; } return false; } return obj == null; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is SyncAction obj2) { return Equals(obj2); } return false; } } [Serializable] internal sealed class getConfig@65 : FSharpFunc { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public SyncedConfig k; [CompilerGenerated] [DebuggerNonUserCode] internal getConfig@65(SyncedConfig k) { this.k = k; } public override SyncedConfig Invoke(Unit _arg1) { return k; } } [Serializable] internal sealed class onReceiveSync@116 : FSharpFunc>, FSharpFunc>> { internal static readonly onReceiveSync@116 @_instance = new onReceiveSync@116(); [CompilerGenerated] [DebuggerNonUserCode] internal onReceiveSync@116() { } public override FSharpFunc> Invoke(Tuple> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class onReceiveSync@120-1 : FSharpFunc>, FSharpFunc>> { internal static readonly onReceiveSync@120-1 @_instance = new onReceiveSync@120-1(); [CompilerGenerated] [DebuggerNonUserCode] internal onReceiveSync@120-1() { } public override FSharpFunc> Invoke(Tuple> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class onReceiveSync@124-2 : FSharpFunc>, FSharpFunc>> { internal static readonly onReceiveSync@124-2 @_instance = new onReceiveSync@124-2(); [CompilerGenerated] [DebuggerNonUserCode] internal onReceiveSync@124-2() { } public override FSharpFunc> Invoke(Tuple> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class callback@135 : FSharpFunc { internal static readonly callback@135 @_instance = new callback@135(); [CompilerGenerated] [DebuggerNonUserCode] internal callback@135() { } public override Unit Invoke(ulong clientId, FastBufferReader arg10@) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) onRequestSync(clientId, arg10@); return null; } } [Serializable] internal sealed class callback@136-1 : FSharpFunc { internal static readonly callback@136-1 @_instance = new callback@136-1(); [CompilerGenerated] [DebuggerNonUserCode] internal callback@136-1() { } public override Unit Invoke(ulong arg00@, FastBufferReader reader) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) onReceiveSync(arg00@, reader); return null; } } [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal sealed class registerHandler@137 { public FSharpFunc> callback; public registerHandler@137(FSharpFunc> callback) { this.callback = callback; base..ctor(); } internal void Invoke(ulong delegateArg0, FastBufferReader delegateArg1) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) FSharpFunc.InvokeFast(callback, delegateArg0, delegateArg1); } } [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static FSharpOption localConfig { get { return .$Mirage.Revive.Domain.Config.localConfig@45; } set { .$Mirage.Revive.Domain.Config.localConfig@45 = value; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static FSharpOption syncedConfig { get { return .$Mirage.Revive.Domain.Config.syncedConfig@46; } set { .$Mirage.Revive.Domain.Config.syncedConfig@46 = value; } } internal static SyncedConfig toSyncedConfig() { return new SyncedConfig(localConfig.Value.ReviveChance@.Value, localConfig.Value.ReviveOnlyWhenPlayerAlone@.Value); } internal static string toNamedMessage(SyncAction _arg1) { if (_arg1.Tag != 1) { return "qwbarch.MirageRevive" + "_OnRequestConfigSync"; } return "qwbarch.MirageRevive" + "_OnReceiveConfigSync"; } internal static CustomMessagingManager messageManager() { return NetworkManager.Singleton.CustomMessagingManager; } internal static bool isClient() { return NetworkManager.Singleton.IsClient; } internal static bool isHost() { return NetworkManager.Singleton.IsHost; } internal static void initConfig(ConfigFile configFile) { localConfig = FSharpOption.Some(new LocalConfig(configFile)); } public static SyncedConfig getConfig() { SyncedConfig k = toSyncedConfig(); FSharpFunc val = new getConfig@65(k); FSharpOption val2 = syncedConfig; if (val2 == null) { return val.Invoke((Unit)null); } return val2.Value; } internal static byte[] serializeToBytes(A value) { DataContractSerializer dataContractSerializer = new DataContractSerializer(typeof(A)); using MemoryStream memoryStream = new MemoryStream(); try { dataContractSerializer.WriteObject(memoryStream, value); return memoryStream.ToArray(); } catch (object obj) { Exception ex = (Exception)obj; Logger.logError.Invoke(PrintfModule.PrintFormatToStringThen((PrintfFormat)(object)new PrintfFormat("Failed to serialize value: %P()", new object[1] { ex }, (Type[])null))); return null; } } internal static A deserializeFromBytes(byte[] data) { DataContractSerializer dataContractSerializer = new DataContractSerializer(typeof(A)); using MemoryStream stream = new MemoryStream(data); try { return IntrinsicFunctions.UnboxGeneric(dataContractSerializer.ReadObject(stream)); } catch (object obj) { Exception ex = (Exception)obj; Logger.logError.Invoke(PrintfModule.PrintFormatToStringThen((PrintfFormat)(object)new PrintfFormat("Failed to deserialize bytes: %P()", new object[1] { ex }, (Type[])null))); A result = default(A); return result; } } [CompilationArgumentCounts(new int[] { 1, 1, 1 })] internal static void sendMessage(SyncAction action, ulong clientId, FastBufferWriter stream) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) NetworkDelivery val = (NetworkDelivery)((((FastBufferWriter)(ref stream)).Capacity <= 1300) ? 2 : 4); NetworkManager.Singleton.CustomMessagingManager.SendNamedMessage(toNamedMessage(action), clientId, stream, val); } internal static void revertSync() { syncedConfig = null; } internal unsafe static void requestSync() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (NetworkManager.Singleton.IsClient) { FastBufferWriter stream = new FastBufferWriter(sizeof(int), (Allocator)2, -1); try { sendMessage(SyncAction.RequestSync, 0uL, stream); } finally { ((IDisposable)(FastBufferWriter)(ref stream)).Dispose(); } } } [CompilationArgumentCounts(new int[] { 1, 1 })] internal unsafe static void onRequestSync(ulong clientId, a _arg1) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (!NetworkManager.Singleton.IsHost) { return; } byte[] array = serializeToBytes(getConfig()); int num = array.Length; FastBufferWriter stream = new FastBufferWriter(num + sizeof(int), (Allocator)2, -1); try { ForPrimitives val = default(ForPrimitives); ((FastBufferWriter)(ref stream)).WriteValueSafe(ref num, val); ((FastBufferWriter)(ref stream)).WriteBytesSafe(array, -1, 0); sendMessage(SyncAction.ReceiveSync, clientId, stream); } catch (object obj) { Exception ex = (Exception)obj; Logger.logError.Invoke(PrintfModule.PrintFormatToStringThen((PrintfFormat)(object)new PrintfFormat("Failed during onRequestSync: %P()", new object[1] { ex }, (Type[])null))); } finally { ((IDisposable)(FastBufferWriter)(ref stream)).Dispose(); } } [CompilationArgumentCounts(new int[] { 1, 1 })] internal unsafe static void onReceiveSync(a _arg1, FastBufferReader reader) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) if (!NetworkManager.Singleton.IsHost) { MonadFxStrictBuilder> val = new MonadFxStrictBuilder>(); FSharpResult item = default(FSharpResult); FSharpResult val2 = (((FastBufferReader)(ref reader)).TryBeginRead(sizeof(int)) ? FSharpFunc>, Unit>.InvokeFast>((FSharpFunc>, FSharpFunc>>)onReceiveSync@116.@_instance, new Tuple>(null, item), (Unit)null) : FSharpResult.NewError("onReceiveSync failed while reading beginning of buffer.")); Bind val3 = null; FSharpResult val4 = default(FSharpResult); item = val4; FSharpResult val5 = ((val2.Tag == 0) ? f@1(reader, val2.ResultValue) : FSharpResult.NewError(val2.ErrorValue)); if (val5.Tag == 1) { Logger.logError.Invoke(val5.ErrorValue); } } } internal static void registerHandler(SyncAction action) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown string text = toNamedMessage(action); object @_instance; if (action.Tag != 1) { syncedConfig = FSharpOption.Some(toSyncedConfig()); @_instance = callback@135.@_instance; } else { @_instance = callback@136-1.@_instance; } FSharpFunc> callback = (FSharpFunc>)@_instance; HandleNamedMessageDelegate val = new HandleNamedMessageDelegate(new registerHandler@137(callback).Invoke); NetworkManager.Singleton.CustomMessagingManager.RegisterNamedMessageHandler(text, val); } [CompilerGenerated] internal static FSharpResult f@1-1(FastBufferReader reader, FSharpRef bytesLength, Unit unitVar0) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) byte[] array = ArrayModule.ZeroCreate(bytesLength.contents); ((FastBufferReader)(ref reader)).ReadBytesSafe(ref new FSharpRef(array).contents@, bytesLength.contents, 0); syncedConfig = FSharpOption.Some(deserializeFromBytes(array)); FSharpResult item = default(FSharpResult); return FSharpFunc>, Unit>.InvokeFast>((FSharpFunc>, FSharpFunc>>)onReceiveSync@124-2.@_instance, new Tuple>(null, item), (Unit)null); } [CompilerGenerated] internal static FSharpResult f@1(FastBufferReader reader, Unit unitVar0) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) FSharpRef val = new FSharpRef(0); ForPrimitives val2 = default(ForPrimitives); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val.contents@, val2); FSharpResult item = default(FSharpResult); FSharpResult val3 = (((FastBufferReader)(ref reader)).TryBeginRead(val.contents) ? FSharpFunc>, Unit>.InvokeFast>((FSharpFunc>, FSharpFunc>>)onReceiveSync@120-1.@_instance, new Tuple>(null, item), (Unit)null) : FSharpResult.NewError("onReceiveSync failed. Host could not synchronize config.")); Bind val4 = null; FSharpResult val5 = default(FSharpResult); item = val5; if (val3.Tag != 0) { return FSharpResult.NewError(val3.ErrorValue); } return f@1-1(reader, val, val3.ResultValue); } } } namespace .$Mirage.Revive.Domain { internal static class Config { [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static FSharpOption localConfig@45; [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static FSharpOption syncedConfig@46; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal static int init@; static Config() { localConfig@45 = null; syncedConfig@46 = null; } } } namespace Mirage.Revive.Domain { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class Logger { [Serializable] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Size = 1)] [Struct] [DebuggerDisplay("{__DebugDisplay(),nq}")] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal struct LogType : IEquatable, IStructuralEquatable, IComparable, IComparable, IStructuralComparable { internal static class Tags { public const int LogInfo = 0; public const int LogDebug = 1; public const int LogWarning = 2; public const int LogError = 3; } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] [field: DebuggerNonUserCode] internal int Tag { [DebuggerNonUserCode] get; } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static LogType LogInfo { [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] get { return new LogType(0); } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal bool IsLogInfo { [CompilerGenerated] [DebuggerNonUserCode] get { return Tag == 0; } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static LogType LogDebug { [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] get { return new LogType(1); } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal bool IsLogDebug { [CompilerGenerated] [DebuggerNonUserCode] get { return Tag == 1; } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static LogType LogWarning { [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] get { return new LogType(2); } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal bool IsLogWarning { [CompilerGenerated] [DebuggerNonUserCode] get { return Tag == 2; } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static LogType LogError { [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] get { return new LogType(3); } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal bool IsLogError { [CompilerGenerated] [DebuggerNonUserCode] get { return Tag == 3; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(LogType))] [CompilerGenerated] [DebuggerNonUserCode] internal LogType(int _tag) { this._tag = _tag; } [SpecialName] [CompilerGenerated] [DebuggerNonUserCode] internal object __DebugDisplay() { return ExtraTopLevelOperators.PrintFormatToString>((PrintfFormat, Unit, string, string>)(object)new PrintfFormat, Unit, string, string, string>("%+0.8A")).Invoke(this); } [CompilerGenerated] public override string ToString() { return ExtraTopLevelOperators.PrintFormatToString>((PrintfFormat, Unit, string, string>)(object)new PrintfFormat, Unit, string, string, LogType>("%+A")).Invoke(this); } [CompilerGenerated] public sealed int CompareTo(LogType obj) { int tag = _tag; int tag2 = obj._tag; if (tag == tag2) { return 0; } return tag - tag2; } [CompilerGenerated] public sealed int CompareTo(object obj) { return CompareTo((LogType)obj); } [CompilerGenerated] public sealed int CompareTo(object obj, IComparer comp) { LogType logType = (LogType)obj; int tag = _tag; int tag2 = logType._tag; if (tag == tag2) { return 0; } return tag - tag2; } [CompilerGenerated] public sealed int GetHashCode(IEqualityComparer comp) { return _tag; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] internal bool Equals(LogType obj, IEqualityComparer comp) { int tag = _tag; int tag2 = obj._tag; return tag == tag2; } [CompilerGenerated] public sealed bool Equals(object obj, IEqualityComparer comp) { if (obj is LogType obj2) { return Equals(obj2, comp); } return false; } [CompilerGenerated] public sealed bool Equals(LogType obj) { int tag = _tag; int tag2 = obj._tag; return tag == tag2; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is LogType) { return Equals((LogType)obj); } return false; } } [Serializable] internal sealed class logMessage@12 : FSharpFunc { internal static readonly logMessage@12 @_instance = new logMessage@12(); [CompilerGenerated] [DebuggerNonUserCode] internal logMessage@12() { } public override Unit Invoke(string data) { logger.LogInfo((object)data); return null; } } [Serializable] internal sealed class logMessage@13-1 : FSharpFunc { internal static readonly logMessage@13-1 @_instance = new logMessage@13-1(); [CompilerGenerated] [DebuggerNonUserCode] internal logMessage@13-1() { } public override Unit Invoke(string data) { logger.LogDebug((object)data); return null; } } [Serializable] internal sealed class logMessage@14-2 : FSharpFunc { internal static readonly logMessage@14-2 @_instance = new logMessage@14-2(); [CompilerGenerated] [DebuggerNonUserCode] internal logMessage@14-2() { } public override Unit Invoke(string data) { logger.LogWarning((object)data); return null; } } [Serializable] internal sealed class logMessage@15-3 : FSharpFunc { internal static readonly logMessage@15-3 @_instance = new logMessage@15-3(); [CompilerGenerated] [DebuggerNonUserCode] internal logMessage@15-3() { } public override Unit Invoke(string data) { logger.LogError((object)data); return null; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static ManualLogSource logger => .$Mirage.Revive.Domain.Logger.logger@8; [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static FSharpFunc logInfo => .$Mirage.Revive.Domain.Logger.logInfo@17; [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static FSharpFunc logDebug => .$Mirage.Revive.Domain.Logger.logDebug@18; [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static FSharpFunc logWarning => .$Mirage.Revive.Domain.Logger.logWarning@19; [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static FSharpFunc logError => .$Mirage.Revive.Domain.Logger.logError@20; internal static FSharpFunc logMessage(LogType logType) { return (FSharpFunc)(logType.Tag switch { 1 => logMessage@13-1.@_instance, 2 => logMessage@14-2.@_instance, 3 => logMessage@15-3.@_instance, _ => logMessage@12.@_instance, }); } } } namespace .$Mirage.Revive.Domain { internal static class Logger { [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static readonly ManualLogSource logger@8; [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static readonly FSharpFunc logInfo@17; [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static readonly FSharpFunc logDebug@18; [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static readonly FSharpFunc logWarning@19; [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal static readonly FSharpFunc logError@20; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal static int init@; static Logger() { logger@8 = Logger.CreateLogSource("qwbarch.MirageRevive"); logInfo@17 = Mirage.Revive.Domain.Logger.logMessage(Mirage.Revive.Domain.Logger.LogType.LogInfo); logDebug@18 = Mirage.Revive.Domain.Logger.logMessage(Mirage.Revive.Domain.Logger.LogType.LogDebug); logWarning@19 = Mirage.Revive.Domain.Logger.logMessage(Mirage.Revive.Domain.Logger.LogType.LogWarning); logError@20 = Mirage.Revive.Domain.Logger.logMessage(Mirage.Revive.Domain.Logger.LogType.LogError); } } } namespace Mirage.Revive.Domain { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class Netcode { [Serializable] internal sealed class initNetcodePatcher@41 : FSharpFunc { internal static readonly initNetcodePatcher@41 @_instance = new initNetcodePatcher@41(); [CompilerGenerated] [DebuggerNonUserCode] internal initNetcodePatcher@41() { } public override MethodInfo[] Invoke(Type _arg1) { return _arg1.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); } } [Serializable] internal sealed class initNetcodePatcher@41-1 : FSharpFunc { internal static readonly initNetcodePatcher@41-1 @_instance = new initNetcodePatcher@41-1(); [CompilerGenerated] [DebuggerNonUserCode] internal initNetcodePatcher@41-1() { } public override Unit Invoke(MethodInfo method) { invokeMethod(method); return null; } } [Literal] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal const BindingFlags flags = BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic; internal static void invokeMethod(MethodInfo method) { object[] customAttributes = method.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length > 0) { object obj = method.Invoke(null, null); } } public static void initNetcodePatcher() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); FSharpFunc @_instance; @_instance = initNetcodePatcher@41.@_instance; Bind val = null; MethodInfo[] array = null; MethodInfo[] array2 = ArrayModule.Collect(@_instance, types); Iterate val2 = null; Iterate.Iterate(array2, (FSharpFunc)initNetcodePatcher@41-1.@_instance); } } } namespace .$Mirage.Revive.Domain { internal static class Netcode { } } namespace Mirage.Revive { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class Compatibility { [Serializable] internal sealed class initLobbyCompatibility@14 : FSharpFunc> { internal static readonly initLobbyCompatibility@14 @_instance = new initLobbyCompatibility@14(); [CompilerGenerated] [DebuggerNonUserCode] internal initLobbyCompatibility@14() { } public override FSharpAsync Invoke(Unit unitVar) { PluginHelper.RegisterPlugin("MirageRevive", Version.Parse("1.3.1"), (CompatibilityLevel)2, (VersionStrictness)2); return ExtraTopLevelOperators.DefaultAsyncBuilder.Zero(); } } public static void initLobbyCompatibility() { if (Chainloader.PluginInfos.ContainsKey("BMX.LobbyCompatibility")) { FSharpAsync val = ExtraTopLevelOperators.DefaultAsyncBuilder.Delay((FSharpFunc>)initLobbyCompatibility@14.@_instance); FSharpAsync.RunSynchronously(val, (FSharpOption)null, (FSharpOption)null); } } } } namespace .$Mirage.Revive { internal static class Compatibility { } } namespace Mirage.Revive { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class PluginInfo { [Literal] [DebuggerBrowsable(DebuggerBrowsableState.Never)] public const string pluginName = "MirageRevive"; [Literal] [DebuggerBrowsable(DebuggerBrowsableState.Never)] public const string pluginId = "qwbarch.MirageRevive"; [Literal] [DebuggerBrowsable(DebuggerBrowsableState.Never)] public const string pluginVersion = "1.3.1"; } } namespace .$Mirage.Revive { internal static class PluginInfo { } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class AssemblyInfo { } namespace { internal static class $AssemblyInfo { } } namespace .$.NETStandard,Version=v2.1 { internal static class AssemblyAttributes { } } namespace .$MirageRevive { internal static class AssemblyInfo { } } namespace System.Diagnostics.CodeAnalysis { [Serializable] [Flags] [CompilerGenerated] [DebuggerNonUserCode] internal enum DynamicallyAccessedMemberTypes { All = -1, None = 0, PublicParameterlessConstructor = 1, PublicConstructors = 3, NonPublicConstructors = 4, PublicMethods = 8, NonPublicMethods = 0x10, PublicFields = 0x20, NonPublicFields = 0x40, PublicNestedTypes = 0x80, NonPublicNestedTypes = 0x100, PublicProperties = 0x200, NonPublicProperties = 0x400, PublicEvents = 0x800, NonPublicEvents = 0x1000, Interfaces = 0x2000 } [CompilerGenerated] internal class DynamicDependencyAttribute : Attribute { [CompilerGenerated] [DebuggerNonUserCode] private DynamicallyAccessedMemberTypes MemberType@; [CompilerGenerated] [DebuggerNonUserCode] private Type Type@; [CompilerGenerated] [DebuggerNonUserCode] public DynamicallyAccessedMemberTypes MemberType { [CompilerGenerated] [DebuggerNonUserCode] get { return MemberType@; } } [CompilerGenerated] [DebuggerNonUserCode] public Type Type { [CompilerGenerated] [DebuggerNonUserCode] get { return Type@; } } [CompilerGenerated] [DebuggerNonUserCode] public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes MemberType, Type Type) { MemberType@ = MemberType; Type@ = Type; } } } namespace MirageRevive.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }