Decompiled source of SelfReviveMultiplayer v1.0.3

SelfReviveMultiplayer.dll

Decompiled a year ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("SelfReviveMultiplayer")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SelfReviveMultiplayer")]
[assembly: AssemblyTitle("SelfReviveMultiplayer")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SelfReviveMultiplayer;

public class MuckPatch
{
	[HarmonyPostfix]
	[HarmonyPatch(typeof(GraveInteract), "Update")]
	public static void Update(ref GraveInteract __instance, ref int ___id)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Invalid comparison between Unknown and I4
		if ((int)GameManager.state != 2 && __instance.timeLeft <= 0f)
		{
			ClientSend.RevivePlayer(__instance.playerId, ___id, true);
		}
	}
}
[BepInPlugin("SelfReviveMultiplayer", "SelfReviveMultiplayer", "1.0.2")]
public class SelfReviveMultiplayer : BaseUnityPlugin
{
	public const string GUID = "SelfReviveMultiplayer";

	public const string NAME = "SelfReviveMultiplayer";

	public const string VERSION = "1.0.2";

	public void Awake()
	{
		Harmony.CreateAndPatchAll(typeof(MuckPatch), (string)null);
		((BaseUnityPlugin)this).Logger.LogMessage((object)"Loaded SelfReviveMultiplayer");
	}
}