Decompiled source of LCTarotCard v1.0.2

LCTarrotCard.dll

Decompiled 3 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using JetBrains.Annotations;
using LCTarrotCard.Cards;
using LCTarrotCard.Items;
using LCTarrotCard.NetcodePatcher;
using LCTarrotCard.Ressource;
using LCTarrotCard.Util;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.Events;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("LCTarrotCard")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LCTarrotCard")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("9457633A-7E87-4BDB-8892-B9C127F9C677")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: NetcodePatchedAssembly]
internal class <Module>
{
	static <Module>()
	{
	}
}
namespace LCTarrotCard
{
	[HarmonyPatch]
	public class Networker : NetworkBehaviour
	{
		public static bool AllowExtraLife;

		private static GameObject _networkPrefab;

		private static readonly int Closed = Animator.StringToHash("Closed");

		private static readonly int Damage = Animator.StringToHash("Damage");

		private static readonly int Limp = Animator.StringToHash("Limp");

		public static Networker Instance { get; private set; }

		[ServerRpc(RequireOwnership = false)]
		public void KillPlayerServerRpc(int playerId, Vector3 velocity, CauseOfDeath causeOfDeath)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: 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_0071: 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)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3834687756u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref velocity);
					((FastBufferWriter)(ref val2)).WriteValueSafe<CauseOfDeath>(ref causeOfDeath, default(ForEnums));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3834687756u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					KillPlayerClientRpc(playerId, velocity, causeOfDeath);
				}
			}
		}

		[ClientRpc]
		public void KillPlayerClientRpc(int playerId, Vector3 velocity, CauseOfDeath causeOfDeath)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: 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_0071: 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)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: 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(458956284u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref velocity);
				((FastBufferWriter)(ref val2)).WriteValueSafe<CauseOfDeath>(ref causeOfDeath, default(ForEnums));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 458956284u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				PlayerControllerB obj = StartOfRound.Instance.allPlayerScripts[playerId];
				if (obj != null)
				{
					obj.KillPlayer(velocity, true, causeOfDeath, 0, default(Vector3));
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SetShipDoorStateServerRpc(bool opened)
		{
			//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)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2570383561u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref opened, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2570383561u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SetShipDoorStateClientRpc(opened);
				}
			}
		}

		[ClientRpc]
		public void SetShipDoorStateClientRpc(bool opened)
		{
			//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(3853642043u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref opened, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3853642043u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			HangarShipDoor[] array = Object.FindObjectsOfType<HangarShipDoor>();
			foreach (HangarShipDoor val3 in array)
			{
				if (opened)
				{
					val3.SetDoorOpen();
					val3.doorPower = 0f;
				}
				else
				{
					val3.SetDoorClosed();
					val3.doorPower = 100f;
				}
				val3.shipDoorsAnimator.SetBool(Closed, !opened);
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void OpenOrCloseRandomDoorServerRpc(int playerId)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3893186342u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3893186342u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					OpenOrCloseRandomDoorClientRpc(playerId, new Random().Next());
				}
			}
		}

		[ClientRpc]
		public void OpenOrCloseRandomDoorClientRpc(int playerId, int rngSeed)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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(4244542400u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				BytePacker.WriteValueBitPacked(val2, rngSeed);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4244542400u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			Random random = new Random(rngSeed);
			DoorLock[] array = Object.FindObjectsOfType<DoorLock>();
			foreach (DoorLock val3 in array)
			{
				if (random.Next(0, 2) == 0)
				{
					val3.OpenOrCloseDoor(StartOfRound.Instance.allPlayerScripts[playerId]);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void BreakerOffServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(964378104u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 964378104u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					BreakerOffClientRpc();
				}
			}
		}

		[ClientRpc]
		public void BreakerOffClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: 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(3070260538u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3070260538u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				RoundManager.Instance.SwitchPower(false);
				BreakerBox[] array = Object.FindObjectsOfType<BreakerBox>();
				BreakerBox[] array2 = array;
				foreach (BreakerBox val3 in array2)
				{
					val3.SetSwitchesOff();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void AgroCoilheadOrSpawnServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: 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 != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3486020106u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3486020106u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost))
			{
				return;
			}
			SpringManAI[] array = Object.FindObjectsOfType<SpringManAI>();
			int num = 0;
			SpringManAI[] array2 = array;
			foreach (SpringManAI val3 in array2)
			{
				if (!((EnemyAI)val3).isEnemyDead && ((NetworkBehaviour)val3).IsSpawned)
				{
					num++;
					((EnemyAI)val3).SwitchToBehaviourState(1);
				}
				if (num >= 2)
				{
					return;
				}
			}
			SpawnCoilheadServerRpc();
		}

		[ServerRpc(RequireOwnership = false)]
		public void SpawnCoilheadServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(866308243u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 866308243u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					EnemyVent[] array = Object.FindObjectsOfType<EnemyVent>();
					Vector3 position = array[Random.Range(0, array.Length)].floorNode.position;
					GameObject val3 = Object.Instantiate<GameObject>(Helper.Enemies.SpringMan.enemyPrefab, position, Quaternion.identity);
					val3.GetComponentInChildren<NetworkObject>().Spawn(true);
					RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val3.GetComponent<SpringManAI>());
					((EnemyAI)val3.GetComponent<SpringManAI>()).SetEnemyOutside(false);
					((EnemyAI)val3.GetComponent<SpringManAI>()).SwitchToBehaviourState(1);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void PopOrSpawnJesterServerRpc(float popDelay)
		{
			//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)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: 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 != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(900698346u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref popDelay, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 900698346u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost))
			{
				return;
			}
			bool flag = false;
			foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies)
			{
				JesterAI val3 = (JesterAI)(object)((spawnedEnemy is JesterAI) ? spawnedEnemy : null);
				if (val3 != null && !((EnemyAI)val3).isEnemyDead)
				{
					flag = true;
				}
			}
			if (!flag)
			{
				EnemyVent[] array = Object.FindObjectsOfType<EnemyVent>();
				Vector3 position = array[Random.Range(0, array.Length)].floorNode.position;
				GameObject val4 = Object.Instantiate<GameObject>(Helper.Enemies.Jester.enemyPrefab, position, Quaternion.identity);
				val4.GetComponentInChildren<NetworkObject>().Spawn(true);
				RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val4.GetComponent<JesterAI>());
				((EnemyAI)val4.GetComponent<JesterAI>()).SetEnemyOutside(false);
				((EnemyAI)val4.GetComponent<JesterAI>()).SwitchToBehaviourState(1);
			}
			((MonoBehaviour)this).StartCoroutine(PopDelay(popDelay));
		}

		[ServerRpc(RequireOwnership = false)]
		public void SpawnGiantOrDogServerRpc(int amount)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: 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 != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(6427069u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, amount);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 6427069u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost))
			{
				return;
			}
			GameObject[] array = GameObject.FindGameObjectsWithTag("OutsideAINode");
			for (int i = 0; i < amount; i++)
			{
				Vector3 position = array[Random.Range(0, array.Length)].transform.position;
				if (Random.Range(0, 2) == 0)
				{
					PluginLogger.Debug("Spawn giant");
					GameObject val3 = Object.Instantiate<GameObject>(Helper.Enemies.ForestGiant.enemyPrefab, position, Quaternion.identity);
					val3.GetComponentInChildren<NetworkObject>().Spawn(true);
					RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val3.GetComponent<ForestGiantAI>());
					((EnemyAI)val3.GetComponent<ForestGiantAI>()).SetEnemyOutside(true);
				}
				else
				{
					PluginLogger.Debug("Spawn dog");
					GameObject val4 = Object.Instantiate<GameObject>(Helper.Enemies.MouthDog.enemyPrefab, position, Quaternion.identity);
					val4.GetComponentInChildren<NetworkObject>().Spawn(true);
					RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val4.GetComponent<MouthDogAI>());
					((EnemyAI)val4.GetComponent<MouthDogAI>()).SetEnemyOutside(true);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void TeleportRandomEntityServerRpc(Vector3 position, bool inside)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: 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 != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1980060841u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref inside, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1980060841u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost))
			{
				return;
			}
			bool inside2 = inside;
			List<EnemyAI> spawnedEnemies = RoundManager.Instance.SpawnedEnemies;
			Helper.Shuffle(spawnedEnemies);
			using IEnumerator<EnemyAI> enumerator = spawnedEnemies.Where((EnemyAI enemy) => !enemy.isEnemyDead && enemy.isOutside == !inside2 && ((NetworkBehaviour)enemy).IsSpawned).GetEnumerator();
			if (enumerator.MoveNext())
			{
				EnemyAI current = enumerator.Current;
				string enemyName = current.enemyType.enemyName;
				Vector3 val3 = position;
				PluginLogger.Debug("Tp " + enemyName + " to " + ((object)(Vector3)(ref val3)).ToString());
				TeleportEnemy(current, position);
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void GhostBreatheServerRpc(Vector3 position)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3054328150u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3054328150u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					GhostBreatheClientRpc(position);
				}
			}
		}

		[ClientRpc]
		public void GhostBreatheClientRpc(Vector3 position)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1597565073u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1597565073u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					AudioSource.PlayClipAtPoint(Assets.GhostBreathe, position, 3f);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void TeleportEnemyAwayServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: 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 != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3427511879u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3427511879u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost))
			{
				return;
			}
			List<EnemyAI> spawnedEnemies = RoundManager.Instance.SpawnedEnemies;
			foreach (EnemyAI item in spawnedEnemies)
			{
				Vector3 position = item.ChooseFarthestNodeFromPosition(((Component)item).transform.position, false, 0, false, 50, false).position;
				TeleportEnemy(item, position);
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void TeleportPlayerServerRpc(int playerId, Vector3 position, bool inside = true, bool insideShip = false)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: 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_0071: 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)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1409835055u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref inside, default(ForPrimitives));
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref insideShip, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1409835055u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					TeleportPlayerClientRpc(playerId, position, inside, insideShip);
				}
			}
		}

		[ClientRpc]
		public void TeleportPlayerClientRpc(int playerId, Vector3 position, bool inside = true, bool insideShip = false)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: 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_0071: 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)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: 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(3340935527u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref inside, default(ForPrimitives));
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref insideShip, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3340935527u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId];
				if (Object.op_Implicit((Object)(object)Object.FindObjectOfType<AudioReverbPresets>()))
				{
					Object.FindObjectOfType<AudioReverbPresets>().audioPresets[2].ChangeAudioReverbForPlayer(val3);
				}
				val3.StopSinkingServerRpc();
				val3.CancelSpecialTriggerAnimations();
				val3.inSpecialInteractAnimation = false;
				val3.isClimbingLadder = false;
				val3.isInElevator = insideShip;
				val3.isInHangarShipRoom = insideShip;
				val3.isInsideFactory = inside;
				val3.averageVelocity = 0f;
				val3.velocityLastFrame = Vector3.zero;
				val3.TeleportPlayer(position, false, 0f, false, true);
				val3.beamOutParticle.Play();
				if (playerId == (int)GameNetworkManager.Instance.localPlayerController.playerClientId)
				{
					HUDManager.Instance.ShakeCamera((ScreenShakeType)1);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SetPlayerHealthServerRpc(int playerId, int health)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2066064276u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					BytePacker.WriteValueBitPacked(val2, health);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2066064276u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SetPlayerHealthClientRpc(playerId, health);
				}
			}
		}

		[ClientRpc]
		public void SetPlayerHealthClientRpc(int playerId, int health)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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(3250666723u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				BytePacker.WriteValueBitPacked(val2, health);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3250666723u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId];
			int health2 = val3.health;
			val3.health = health;
			if (((NetworkBehaviour)val3).IsOwner)
			{
				HUDManager.Instance.UpdateHealthUI(health, health2 > health);
				if (health < 10 && !val3.criticallyInjured)
				{
					HUDManager.Instance.ShakeCamera((ScreenShakeType)1);
					val3.MakeCriticallyInjured(true);
				}
				else if (val3.criticallyInjured && health > 10)
				{
					val3.MakeCriticallyInjured(false);
				}
			}
			if (health2 > health)
			{
				return;
			}
			if (((NetworkBehaviour)val3).IsOwner)
			{
				((UnityEvent)StartOfRound.Instance.LocalPlayerDamagedEvent).Invoke();
				val3.takingFallDamage = false;
				if (val3.inSpecialInteractAnimation && !val3.twoHandedAnimation)
				{
					val3.playerBodyAnimator.SetTrigger(Damage);
				}
				val3.specialAnimationWeight = 1f;
				val3.PlayQuickSpecialAnimation(0.7f);
			}
			PlayerStats obj = val3.playersManager.gameStats.allPlayerStats[val3.playerClientId];
			obj.damageTaken += health2 - health;
			val3.timeSinceTakingDamage = Time.realtimeSinceStartup;
		}

		[ServerRpc(RequireOwnership = false)]
		public void DamagePlayerServerRpc(int playerId, int damage, Vector3 velocity, CauseOfDeath causeOfDeath)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3843812035u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					BytePacker.WriteValueBitPacked(val2, damage);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref velocity);
					((FastBufferWriter)(ref val2)).WriteValueSafe<CauseOfDeath>(ref causeOfDeath, default(ForEnums));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3843812035u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					DamagePlayerClientRpc(playerId, damage, velocity, causeOfDeath);
				}
			}
		}

		[ClientRpc]
		public void DamagePlayerClientRpc(int playerId, int damage, Vector3 velocity, CauseOfDeath causeOfDeath)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2442547416u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					BytePacker.WriteValueBitPacked(val2, damage);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref velocity);
					((FastBufferWriter)(ref val2)).WriteValueSafe<CauseOfDeath>(ref causeOfDeath, default(ForEnums));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2442547416u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId];
					val3.DamagePlayer(damage, true, true, causeOfDeath, 0, false, velocity);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void MultiplyInventoryValueServerRpc(int playerId, float multiplier)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2278377068u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref multiplier, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2278377068u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					MultiplyInventoryValueClientRpc(playerId, multiplier);
				}
			}
		}

		[ClientRpc]
		public void MultiplyInventoryValueClientRpc(int playerId, float multiplier)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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(1897849939u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref multiplier, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1897849939u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				GrabbableObject[] itemSlots = StartOfRound.Instance.allPlayerScripts[playerId].ItemSlots;
				foreach (GrabbableObject val3 in itemSlots)
				{
					val3.SetScrapValue((int)((float)val3.scrapValue * multiplier));
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void MultiplyRandomScrapValueServerRpc(float multiplier)
		{
			//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)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2149202328u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref multiplier, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2149202328u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					MultiplyRandomScrapValueClientRpc(multiplier, new Random().Next());
				}
			}
		}

		[ClientRpc]
		public void MultiplyRandomScrapValueClientRpc(float multiplier, int randomSeed)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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(1951809462u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref multiplier, default(ForPrimitives));
				BytePacker.WriteValueBitPacked(val2, randomSeed);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1951809462u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			Random random = new Random(randomSeed);
			GrabbableObject[] array = Object.FindObjectsOfType<GrabbableObject>();
			GrabbableObject[] array2 = array;
			foreach (GrabbableObject val3 in array2)
			{
				if (((Behaviour)val3).enabled && val3.itemProperties.isScrap && val3.scrapValue > 0 && random.Next(0, 5) == 0)
				{
					val3.SetScrapValue((int)((float)val3.scrapValue * multiplier));
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void RevivePlayerServerRpc(int playerId)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2243418972u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2243418972u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					RevivePlayerClientRpc(playerId);
				}
			}
		}

		[ClientRpc]
		public void RevivePlayerClientRpc(int playerId)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a2: 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(2685453368u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2685453368u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId];
			if (!val3.isPlayerDead && !val3.isPlayerControlled)
			{
				return;
			}
			val3.ResetPlayerBloodObjects(true);
			val3.isClimbingLadder = false;
			val3.clampLooking = false;
			val3.inVehicleAnimation = false;
			val3.disableMoveInput = false;
			val3.ResetZAndXRotation();
			((Collider)val3.thisController).enabled = true;
			val3.health = 100;
			val3.hasBeenCriticallyInjured = false;
			val3.disableLookInput = false;
			val3.disableInteract = false;
			if (val3.isPlayerDead)
			{
				val3.isPlayerDead = false;
				val3.isPlayerControlled = true;
				val3.isInElevator = true;
				val3.isInHangarShipRoom = true;
				val3.isInsideFactory = false;
				val3.parentedToElevatorLastFrame = false;
				val3.overrideGameOverSpectatePivot = null;
				StartOfRound.Instance.SetPlayerObjectExtrapolate(false);
				val3.TeleportPlayer(StartOfRound.Instance.playerSpawnPositions[0].position, false, 0f, false, true);
				val3.setPositionOfDeadPlayer = false;
				val3.DisablePlayerModel(StartOfRound.Instance.allPlayerObjects[playerId], true, true);
				((Behaviour)val3.helmetLight).enabled = false;
				val3.Crouch(false);
				val3.criticallyInjured = false;
				if (Object.op_Implicit((Object)(object)val3.playerBodyAnimator))
				{
					val3.playerBodyAnimator.SetBool(Limp, false);
				}
				val3.bleedingHeavily = false;
				val3.activatingItem = false;
				val3.twoHanded = false;
				val3.inShockingMinigame = false;
				val3.inSpecialInteractAnimation = false;
				val3.freeRotationInInteractAnimation = false;
				val3.disableSyncInAnimation = false;
				val3.inAnimationWithEnemy = null;
				val3.holdingWalkieTalkie = false;
				val3.speakingToWalkieTalkie = false;
				val3.isSinking = false;
				val3.isUnderwater = false;
				val3.sinkingValue = 0f;
				val3.statusEffectAudio.Stop();
				val3.DisableJetpackControlsLocally();
				val3.health = 100;
				val3.mapRadarDotAnimator.SetBool("dead", false);
				val3.externalForceAutoFade = Vector3.zero;
				if (((NetworkBehaviour)val3).IsOwner)
				{
					HUDManager.Instance.gasHelmetAnimator.SetBool("gasEmitting", false);
					val3.hasBegunSpectating = false;
					HUDManager.Instance.RemoveSpectateUI();
					HUDManager.Instance.gameOverAnimator.SetTrigger("revive");
					val3.hinderedMultiplier = 1f;
					val3.isMovementHindered = 0;
					val3.sourcesCausingSinking = 0;
					val3.reverbPreset = StartOfRound.Instance.shipReverb;
				}
			}
			if (((NetworkBehaviour)val3).IsOwner)
			{
				SoundManager.Instance.earsRingingTimer = 0f;
				val3.bleedingHeavily = false;
				val3.criticallyInjured = false;
				val3.playerBodyAnimator.SetBool(Limp, false);
				val3.health = 100;
				HUDManager.Instance.UpdateHealthUI(100, false);
				val3.spectatedPlayerScript = null;
				((Behaviour)HUDManager.Instance.audioListenerLowPass).enabled = false;
				StartOfRound.Instance.SetSpectateCameraToGameOverMode(false, val3);
			}
			val3.voiceMuffledByEnemy = false;
			SoundManager.Instance.playerVoicePitchTargets[playerId] = 1f;
			SoundManager.Instance.SetPlayerPitch(1f, playerId);
			if (Object.op_Implicit((Object)(object)val3.currentVoiceChatIngameSettings))
			{
				if (!Object.op_Implicit((Object)(object)val3.currentVoiceChatIngameSettings.voiceAudio))
				{
					val3.currentVoiceChatIngameSettings.InitializeComponents();
				}
				if (!Object.op_Implicit((Object)(object)val3.currentVoiceChatIngameSettings.voiceAudio))
				{
					return;
				}
				((Component)val3.currentVoiceChatIngameSettings.voiceAudio).GetComponent<OccludeAudio>().overridingLowPass = false;
			}
			RagdollGrabbableObject[] array = Object.FindObjectsOfType<RagdollGrabbableObject>();
			RagdollGrabbableObject[] array2 = array;
			foreach (RagdollGrabbableObject val4 in array2)
			{
				if (val4.ragdoll.playerObjectId != playerId)
				{
					continue;
				}
				if (!((GrabbableObject)val4).isHeld)
				{
					if (((NetworkBehaviour)this).IsServer)
					{
						if (((NetworkBehaviour)val4).NetworkObject.IsSpawned)
						{
							((NetworkBehaviour)val4).NetworkObject.Despawn(true);
						}
						else
						{
							Object.Destroy((Object)(object)((Component)val4).gameObject);
						}
					}
				}
				else if (Object.op_Implicit((Object)(object)((GrabbableObject)val4).playerHeldBy))
				{
					((GrabbableObject)val4).playerHeldBy.DropAllHeldItems(true, false);
				}
			}
			DeadBodyInfo[] array3 = Object.FindObjectsOfType<DeadBodyInfo>();
			DeadBodyInfo[] array4 = array3;
			foreach (DeadBodyInfo val5 in array4)
			{
				if (val5.playerObjectId == playerId)
				{
					Object.Destroy((Object)(object)((Component)val5).gameObject);
				}
			}
			StartOfRound instance = StartOfRound.Instance;
			instance.livingPlayers++;
			StartOfRound.Instance.allPlayersDead = false;
			StartOfRound.Instance.UpdatePlayerVoiceEffects();
		}

		[ServerRpc(RequireOwnership = false)]
		public void AllowExtraLifeServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1979062494u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1979062494u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					AllowExtraLifeClientRpc(allow: true);
				}
			}
		}

		[ClientRpc]
		public void AllowExtraLifeClientRpc(bool allow)
		{
			//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)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1996833951u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref allow, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1996833951u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					AllowExtraLife = allow;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void ExtraLifeServerRpc(int playerId)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2363699914u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2363699914u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost) && AllowExtraLife)
				{
					AllowExtraLifeClientRpc(allow: false);
					TeleportPlayerServerRpc(playerId, StartOfRound.Instance.playerSpawnPositions[0].position, inside: false, insideShip: true);
					ExtraLifeClientRpc(playerId);
				}
			}
		}

		[ClientRpc]
		public void ExtraLifeClientRpc(int playerId)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: 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(3667127957u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3667127957u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId];
				val3.health = 100;
				val3.isPlayerDead = false;
				val3.MakeCriticallyInjured(false);
				if (((NetworkBehaviour)val3).IsOwner)
				{
					HUDManager.Instance.UpdateHealthUI(100, false);
				}
				if (((NetworkBehaviour)StartOfRound.Instance.allPlayerScripts[playerId]).IsOwner)
				{
					HUDManager.Instance.DisplayTip("Extra life", "Thanks to the high priestess card, you are given an extra chance to live", false, false, "LC_Tip1");
				}
			}
		}

		public static void TeleportEnemy(EnemyAI enemy, Vector3 position, bool exitEnter = false, bool outside = false)
		{
			//IL_0047: 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_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			if (exitEnter)
			{
				enemy.SetEnemyOutside(outside);
			}
			if (((NetworkBehaviour)enemy).OwnerClientId != GameNetworkManager.Instance.localPlayerController.actualClientId)
			{
				enemy.ChangeOwnershipOfEnemy(GameNetworkManager.Instance.localPlayerController.actualClientId);
			}
			Vector3 position2 = enemy.ChooseClosestNodeToPosition(position, false, 0).position;
			enemy.serverPosition = position2;
			((Component)enemy).transform.position = enemy.serverPosition;
			enemy.agent.Warp(enemy.serverPosition);
			enemy.SyncPositionToClients();
		}

		private static IEnumerator PopDelay(float delay)
		{
			yield return (object)new WaitForSeconds(delay);
			PluginLogger.Debug("Popping jesters");
			foreach (EnemyAI enemy in RoundManager.Instance.SpawnedEnemies)
			{
				JesterAI jester = (JesterAI)(object)((enemy is JesterAI) ? enemy : null);
				if (jester != null && !((EnemyAI)jester).isEnemyDead)
				{
					((EnemyAI)jester).SwitchToBehaviourState(2);
				}
			}
		}

		public override void OnNetworkSpawn()
		{
			if ((Object)(object)NetworkManager.Singleton != (Object)null && (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer))
			{
				Networker instance = Instance;
				if (instance != null)
				{
					((Component)instance).gameObject.GetComponent<NetworkObject>().Despawn(true);
				}
			}
			Instance = this;
			((NetworkBehaviour)this).OnNetworkSpawn();
		}

		[HarmonyPatch(typeof(StartOfRound), "Awake")]
		[HarmonyPostfix]
		private static void SpawnNetHandler()
		{
			//IL_0028: 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)
			if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer)
			{
				GameObject val = Object.Instantiate<GameObject>(_networkPrefab, Vector3.zero, Quaternion.identity);
				val.GetComponent<NetworkObject>().Spawn(false);
			}
		}

		[HarmonyPatch(typeof(GameNetworkManager), "Start")]
		[HarmonyPostfix]
		private static void Init()
		{
			if (!((Object)(object)_networkPrefab != (Object)null))
			{
				_networkPrefab = Assets.Bundle.LoadAsset<GameObject>("Assets/Tarrot/Networker.prefab");
				_networkPrefab.AddComponent<Networker>();
				NetworkManager.Singleton.AddNetworkPrefab(_networkPrefab);
			}
		}

		protected override void __initializeVariables()
		{
			((NetworkBehaviour)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_Networker()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Expected O, but got Unknown
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Expected O, but got Unknown
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Expected O, but got Unknown
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Expected O, but got Unknown
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Expected O, but got Unknown
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Expected O, but got Unknown
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Expected O, but got Unknown
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Expected O, but got Unknown
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Expected O, but got Unknown
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Expected O, but got Unknown
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Expected O, but got Unknown
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Expected O, but got Unknown
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Expected O, but got Unknown
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Expected O, but got Unknown
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Expected O, but got Unknown
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: Expected O, but got Unknown
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Expected O, but got Unknown
			//IL_0299: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Expected O, but got Unknown
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02be: Expected O, but got Unknown
			//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Expected O, but got Unknown
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f4: Expected O, but got Unknown
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Expected O, but got Unknown
			//IL_0320: Unknown result type (might be due to invalid IL or missing references)
			//IL_032a: Expected O, but got Unknown
			//IL_033b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0345: Expected O, but got Unknown
			//IL_0356: Unknown result type (might be due to invalid IL or missing references)
			//IL_0360: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(3834687756u, new RpcReceiveHandler(__rpc_handler_3834687756));
			NetworkManager.__rpc_func_table.Add(458956284u, new RpcReceiveHandler(__rpc_handler_458956284));
			NetworkManager.__rpc_func_table.Add(2570383561u, new RpcReceiveHandler(__rpc_handler_2570383561));
			NetworkManager.__rpc_func_table.Add(3853642043u, new RpcReceiveHandler(__rpc_handler_3853642043));
			NetworkManager.__rpc_func_table.Add(3893186342u, new RpcReceiveHandler(__rpc_handler_3893186342));
			NetworkManager.__rpc_func_table.Add(4244542400u, new RpcReceiveHandler(__rpc_handler_4244542400));
			NetworkManager.__rpc_func_table.Add(964378104u, new RpcReceiveHandler(__rpc_handler_964378104));
			NetworkManager.__rpc_func_table.Add(3070260538u, new RpcReceiveHandler(__rpc_handler_3070260538));
			NetworkManager.__rpc_func_table.Add(3486020106u, new RpcReceiveHandler(__rpc_handler_3486020106));
			NetworkManager.__rpc_func_table.Add(866308243u, new RpcReceiveHandler(__rpc_handler_866308243));
			NetworkManager.__rpc_func_table.Add(900698346u, new RpcReceiveHandler(__rpc_handler_900698346));
			NetworkManager.__rpc_func_table.Add(6427069u, new RpcReceiveHandler(__rpc_handler_6427069));
			NetworkManager.__rpc_func_table.Add(1980060841u, new RpcReceiveHandler(__rpc_handler_1980060841));
			NetworkManager.__rpc_func_table.Add(3054328150u, new RpcReceiveHandler(__rpc_handler_3054328150));
			NetworkManager.__rpc_func_table.Add(1597565073u, new RpcReceiveHandler(__rpc_handler_1597565073));
			NetworkManager.__rpc_func_table.Add(3427511879u, new RpcReceiveHandler(__rpc_handler_3427511879));
			NetworkManager.__rpc_func_table.Add(1409835055u, new RpcReceiveHandler(__rpc_handler_1409835055));
			NetworkManager.__rpc_func_table.Add(3340935527u, new RpcReceiveHandler(__rpc_handler_3340935527));
			NetworkManager.__rpc_func_table.Add(2066064276u, new RpcReceiveHandler(__rpc_handler_2066064276));
			NetworkManager.__rpc_func_table.Add(3250666723u, new RpcReceiveHandler(__rpc_handler_3250666723));
			NetworkManager.__rpc_func_table.Add(3843812035u, new RpcReceiveHandler(__rpc_handler_3843812035));
			NetworkManager.__rpc_func_table.Add(2442547416u, new RpcReceiveHandler(__rpc_handler_2442547416));
			NetworkManager.__rpc_func_table.Add(2278377068u, new RpcReceiveHandler(__rpc_handler_2278377068));
			NetworkManager.__rpc_func_table.Add(1897849939u, new RpcReceiveHandler(__rpc_handler_1897849939));
			NetworkManager.__rpc_func_table.Add(2149202328u, new RpcReceiveHandler(__rpc_handler_2149202328));
			NetworkManager.__rpc_func_table.Add(1951809462u, new RpcReceiveHandler(__rpc_handler_1951809462));
			NetworkManager.__rpc_func_table.Add(2243418972u, new RpcReceiveHandler(__rpc_handler_2243418972));
			NetworkManager.__rpc_func_table.Add(2685453368u, new RpcReceiveHandler(__rpc_handler_2685453368));
			NetworkManager.__rpc_func_table.Add(1979062494u, new RpcReceiveHandler(__rpc_handler_1979062494));
			NetworkManager.__rpc_func_table.Add(1996833951u, new RpcReceiveHandler(__rpc_handler_1996833951));
			NetworkManager.__rpc_func_table.Add(2363699914u, new RpcReceiveHandler(__rpc_handler_2363699914));
			NetworkManager.__rpc_func_table.Add(3667127957u, new RpcReceiveHandler(__rpc_handler_3667127957));
		}

		private static void __rpc_handler_3834687756(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: 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)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				Vector3 velocity = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref velocity);
				CauseOfDeath causeOfDeath = default(CauseOfDeath);
				((FastBufferReader)(ref reader)).ReadValueSafe<CauseOfDeath>(ref causeOfDeath, default(ForEnums));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).KillPlayerServerRpc(playerId, velocity, causeOfDeath);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_458956284(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: 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)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				Vector3 velocity = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref velocity);
				CauseOfDeath causeOfDeath = default(CauseOfDeath);
				((FastBufferReader)(ref reader)).ReadValueSafe<CauseOfDeath>(ref causeOfDeath, default(ForEnums));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).KillPlayerClientRpc(playerId, velocity, causeOfDeath);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2570383561(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_005e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool shipDoorStateServerRpc = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref shipDoorStateServerRpc, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).SetShipDoorStateServerRpc(shipDoorStateServerRpc);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3853642043(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_005e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool shipDoorStateClientRpc = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref shipDoorStateClientRpc, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).SetShipDoorStateClientRpc(shipDoorStateClientRpc);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3893186342(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).OpenOrCloseRandomDoorServerRpc(playerId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_4244542400(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				int rngSeed = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref rngSeed);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).OpenOrCloseRandomDoorClientRpc(playerId, rngSeed);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_964378104(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).BreakerOffServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3070260538(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).BreakerOffClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3486020106(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).AgroCoilheadOrSpawnServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_866308243(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).SpawnCoilheadServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_900698346(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_005e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				float popDelay = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref popDelay, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).PopOrSpawnJesterServerRpc(popDelay);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_6427069(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int amount = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref amount);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).SpawnGiantOrDogServerRpc(amount);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1980060841(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_003c: 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)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				bool inside = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref inside, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).TeleportRandomEntityServerRpc(position, inside);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3054328150(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).GhostBreatheServerRpc(position);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1597565073(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).GhostBreatheClientRpc(position);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3427511879(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).TeleportEnemyAwayServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1409835055(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: 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_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				bool inside = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref inside, default(ForPrimitives));
				bool insideShip = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref insideShip, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).TeleportPlayerServerRpc(playerId, position, inside, insideShip);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3340935527(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: 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_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				bool inside = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref inside, default(ForPrimitives));
				bool insideShip = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref insideShip, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).TeleportPlayerClientRpc(playerId, position, inside, insideShip);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2066064276(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				int health = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref health);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).SetPlayerHealthServerRpc(playerId, health);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3250666723(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				int health = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref health);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).SetPlayerHealthClientRpc(playerId, health);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3843812035(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				int damage = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref damage);
				Vector3 velocity = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref velocity);
				CauseOfDeath causeOfDeath = default(CauseOfDeath);
				((FastBufferReader)(ref reader)).ReadValueSafe<CauseOfDeath>(ref causeOfDeath, default(ForEnums));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).DamagePlayerServerRpc(playerId, damage, velocity, causeOfDeath);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2442547416(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid I