Decompiled source of NightOfTheLivingMimic v1.1.12

SDBBZR.dll

Decompiled 2 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.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LethalConfig;
using LethalConfig.ConfigItems;
using LethalConfig.ConfigItems.Options;
using Microsoft.CodeAnalysis;
using SlayerDeadBodiesBecomeZombiesRandomly.Patches;
using TMPro;
using Unity.Netcode;
using UnityEngine;
using com.github.zehsteam.TwitchChatAPI;
using com.github.zehsteam.TwitchChatAPI.Objects;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("SDBBZR")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Slayer's Dead Bodies Become Zombies Randomly")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+895588286b4cbcb5f7bb3757a43bcf3999e2c39a")]
[assembly: AssemblyProduct("SDBBZR")]
[assembly: AssemblyTitle("SDBBZR")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
internal class <Module>
{
	static <Module>()
	{
	}
}
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace SlayerDeadBodiesBecomeZombiesRandomly
{
	internal class BodyCheck : MonoBehaviour
	{
		private float timeSinceLastCheck = 0f;

		public ulong owner = 0uL;

		public int timesRevived = 0;

		public bool currentlyZombie = false;

		public DeadBodyInfo instance;

		public static int timerModifier;

		public bool doingCheck = false;

		public void Update()
		{
			if (!((NetworkBehaviour)StartOfRound.Instance.localPlayerController).IsHost || currentlyZombie || StartOfRound.Instance.shipIsLeaving || (timesRevived >= 1 && !SDBBZRMain.continuous.Value))
			{
				return;
			}
			if ((Object)(object)instance?.grabBodyObject?.playerHeldBy != (Object)null)
			{
				if (!doingCheck)
				{
					doingCheck = true;
					ulong playerSteamId = instance.grabBodyObject.playerHeldBy.playerSteamId;
					if (ShouldBecomeZombie(playerSteamId))
					{
						becomeZombieCheck(chaos: true);
					}
				}
			}
			else
			{
				doingCheck = false;
			}
			timeSinceLastCheck += Time.deltaTime;
			if (timeSinceLastCheck >= (float)(SDBBZRMain.timer.Value + timerModifier))
			{
				becomeZombieCheck();
				timeSinceLastCheck = 0f;
			}
		}

		public bool ShouldBecomeZombie(ulong playerSteamId)
		{
			ConfigEntry<bool> chaosMode = SDBBZRMain.chaosMode;
			if (chaosMode != null && chaosMode.Value)
			{
				return true;
			}
			bool result = false;
			if (SDBBZRMain.CursedPlayersList.Contains(playerSteamId))
			{
				result = Random.value < 0.31f;
				if (SDBBZRMain.SuperCursedIDS.Contains(playerSteamId) && SDBBZRMain.CursedPlayersList.Contains(76561198077184650uL))
				{
					result = Random.value < 0.69f;
				}
			}
			return result;
		}

		public void becomeZombieCheck(bool chaos = false)
		{
			if (!(SDBBZRMain.percentChance.Value + (float)Networker.Instance.chanceModifier <= 0f))
			{
				int num = Random.Range(0, 101);
				Debug.Log((object)num);
				num += timesRevived * SDBBZRMain.chanceDecrease.Value;
				if (chaos)
				{
					setZombie();
				}
				else if ((float)num < SDBBZRMain.percentChance.Value + (float)Networker.Instance.chanceModifier)
				{
					setZombie();
				}
			}
		}

		public void setZombie()
		{
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: 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)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)Misc.GetPlayerByUserID(instance.playerScript.actualClientId) == (Object)null)
			{
				SDBBZRMain.CustomLogger.LogInfo((object)$"setZombie: Player with ID {instance.playerScript.actualClientId} not found. Aborting zombie creation.");
				return;
			}
			timeSinceLastCheck = 0f;
			currentlyZombie = true;
			GameObject val = Object.Instantiate<GameObject>(Misc.getEnemyByName("Masked").enemyType.enemyPrefab, ((Component)instance.grabBodyObject).transform.position, Quaternion.Euler(new Vector3(0f, 0f, 0f)));
			val.GetComponentInChildren<NetworkObject>().Spawn(true);
			RoundManager.Instance.SpawnedEnemies.Add(val.GetComponent<EnemyAI>());
			MaskedPlayerEnemy component = val.GetComponent<MaskedPlayerEnemy>();
			component.mimickingPlayer = instance.playerScript;
			NetworkObjectReference val2 = NetworkObjectReference.op_Implicit(val.GetComponentInChildren<NetworkObject>());
			zombieBody zombieBody2 = val.AddComponent<zombieBody>();
			zombieBody2.bodyID = owner;
			Networker.Instance.fixMaskedServerRpc(instance.playerScript.actualClientId, ((NetworkObjectReference)(ref val2)).NetworkObjectId);
		}
	}
	internal class zombieBody : MonoBehaviour
	{
		public ulong bodyID = 0uL;
	}
	internal class ConfigManager
	{
		public static void SetupLethalConfig()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			//IL_0028: Expected O, but got Unknown
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Expected O, but got Unknown
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Expected O, but got Unknown
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Expected O, but got Unknown
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Expected O, but got Unknown
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Expected O, but got Unknown
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Expected O, but got Unknown
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Expected O, but got Unknown
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Expected O, but got Unknown
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Expected O, but got Unknown
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Expected O, but got Unknown
			ConfigEntry<float> percentChance = SDBBZRMain.percentChance;
			FloatSliderOptions val = new FloatSliderOptions();
			((BaseRangeOptions<float>)val).Min = 0.1f;
			((BaseRangeOptions<float>)val).Max = 100f;
			FloatSliderConfigItem val2 = new FloatSliderConfigItem(percentChance, val);
			IntInputFieldConfigItem val3 = new IntInputFieldConfigItem(SDBBZRMain.timer, false);
			BoolCheckBoxConfigItem val4 = new BoolCheckBoxConfigItem(SDBBZRMain.continuous, false);
			IntInputFieldConfigItem val5 = new IntInputFieldConfigItem(SDBBZRMain.chanceDecrease, false);
			BoolCheckBoxConfigItem val6 = new BoolCheckBoxConfigItem(SDBBZRMain.maskTurn, false);
			BoolCheckBoxConfigItem val7 = new BoolCheckBoxConfigItem(SDBBZRMain.chaosMode, false);
			BoolCheckBoxConfigItem val8 = new BoolCheckBoxConfigItem(SDBBZRMain.ShowDebugChatboxes, false);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val2);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val3);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val4);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val5);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val6);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val8);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val7);
			if (SDBBZRMain.TwitchChatAPIPresent)
			{
				BoolCheckBoxConfigItem val9 = new BoolCheckBoxConfigItem(TwitchHandler.enableSubs);
				IntInputFieldConfigItem val10 = new IntInputFieldConfigItem(TwitchHandler.t1sub);
				IntInputFieldConfigItem val11 = new IntInputFieldConfigItem(TwitchHandler.t2sub);
				IntInputFieldConfigItem val12 = new IntInputFieldConfigItem(TwitchHandler.t3sub);
				BoolCheckBoxConfigItem val13 = new BoolCheckBoxConfigItem(TwitchHandler.enableCheer);
				IntInputFieldConfigItem val14 = new IntInputFieldConfigItem(TwitchHandler.cheerMin);
				BoolCheckBoxConfigItem val15 = new BoolCheckBoxConfigItem(TwitchHandler.enableRaid);
				BoolCheckBoxConfigItem val16 = new BoolCheckBoxConfigItem(TwitchHandler.enableChatEvents);
				BoolCheckBoxConfigItem val17 = new BoolCheckBoxConfigItem(TwitchHandler.twitchChatEveryone);
				LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val9);
				LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val10);
				LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val11);
				LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val12);
				LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val13);
				LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val14);
				LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val15);
				LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val16);
				LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val17);
			}
		}
	}
	internal class Misc : MonoBehaviour
	{
		public static SpawnableEnemyWithRarity getEnemyByName(string name)
		{
			List<SpawnableEnemyWithRarity> list = new List<SpawnableEnemyWithRarity>();
			SelectableLevel[] levels = StartOfRound.Instance.levels;
			foreach (SelectableLevel val in levels)
			{
				list = list.Union(val.Enemies).Union(val.OutsideEnemies).Union(val.DaytimeEnemies)
					.ToList();
			}
			list = (from x in list
				group x by x.enemyType.enemyName into g
				select g.First() into x
				orderby x.enemyType.enemyName
				select x).ToList();
			SpawnableEnemyWithRarity val2 = ((IEnumerable<SpawnableEnemyWithRarity>)list).FirstOrDefault((Func<SpawnableEnemyWithRarity, bool>)((SpawnableEnemyWithRarity x) => x.enemyType.enemyName == name));
			if (val2 == null)
			{
				SelectableLevel[] levels2 = StartOfRound.Instance.levels;
				foreach (SelectableLevel val3 in levels2)
				{
					val2 = ((IEnumerable<SpawnableEnemyWithRarity>)val3.Enemies).FirstOrDefault((Func<SpawnableEnemyWithRarity, bool>)((SpawnableEnemyWithRarity x) => string.Equals(x.enemyType.enemyName, name, StringComparison.OrdinalIgnoreCase))) ?? ((IEnumerable<SpawnableEnemyWithRarity>)val3.DaytimeEnemies).FirstOrDefault((Func<SpawnableEnemyWithRarity, bool>)((SpawnableEnemyWithRarity x) => string.Equals(x.enemyType.enemyName, name, StringComparison.OrdinalIgnoreCase))) ?? ((IEnumerable<SpawnableEnemyWithRarity>)val3.OutsideEnemies).FirstOrDefault((Func<SpawnableEnemyWithRarity, bool>)((SpawnableEnemyWithRarity x) => string.Equals(x.enemyType.enemyName, name, StringComparison.OrdinalIgnoreCase)));
					if (val2 != null)
					{
						break;
					}
				}
			}
			if (val2 == null)
			{
				SDBBZRMain.CustomLogger.LogWarning((object)("Enemy '" + name + "' not found. Available enemies: " + string.Join(", ", list.Select((SpawnableEnemyWithRarity e) => e.enemyType.enemyName))));
				return null;
			}
			return val2;
		}

		public static void SafeTipMessage(string title, string body, bool isWarning = false)
		{
			try
			{
				HUDManager.Instance.DisplayTip(title, body, isWarning, false, "LC_Tip1");
			}
			catch
			{
				SDBBZRMain.CustomLogger.LogWarning((object)"There's a problem with the DisplayTip method. This might have happened due to a new game verison, or some other mod.");
				try
				{
					ChatWrite(title + ": " + body);
				}
				catch
				{
					SDBBZRMain.CustomLogger.LogWarning((object)"There's a problem with writing to the chat. This might have happened due to a new game verison, or some other mod.");
				}
			}
		}

		public static void ChatWrite(string chatMessage)
		{
			HUDManager.Instance.lastChatMessage = chatMessage;
			HUDManager.Instance.PingHUDElement(HUDManager.Instance.Chat, 4f, 1f, 0.2f);
			if (HUDManager.Instance.ChatMessageHistory.Count >= 4)
			{
				((TMP_Text)HUDManager.Instance.chatText).text.Remove(0, HUDManager.Instance.ChatMessageHistory[0].Length);
				HUDManager.Instance.ChatMessageHistory.Remove(HUDManager.Instance.ChatMessageHistory[0]);
			}
			string item = "<color=#00ffff>" + chatMessage + "</color>";
			HUDManager.Instance.ChatMessageHistory.Add(item);
			((TMP_Text)HUDManager.Instance.chatText).text = "";
			for (int i = 0; i < HUDManager.Instance.ChatMessageHistory.Count; i++)
			{
				TextMeshProUGUI chatText = HUDManager.Instance.chatText;
				((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n" + HUDManager.Instance.ChatMessageHistory[i];
			}
		}

		public static PlayerControllerB GetPlayerByUserID(ulong userID)
		{
			PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
			foreach (PlayerControllerB val in allPlayerScripts)
			{
				if (val.actualClientId == userID)
				{
					return val;
				}
			}
			return null;
		}

		public static PlayerControllerB GetRandomAlivePlayer()
		{
			List<PlayerControllerB> list = new List<PlayerControllerB>();
			PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
			foreach (PlayerControllerB val in allPlayerScripts)
			{
				if (IsPlayerAliveAndControlled(val))
				{
					list.Add(val);
				}
			}
			if (list.Count == 1)
			{
				return list[0];
			}
			return list[Random.Range(0, list.Count)];
		}

		public static bool IsPlayerAliveAndControlled(PlayerControllerB player)
		{
			return !player.isPlayerDead && ((Behaviour)player).isActiveAndEnabled && ((NetworkBehaviour)player).IsSpawned && player.isPlayerControlled;
		}

		public static PlayerControllerB GetClosestPlayerByName(string name)
		{
			PlayerControllerB result = null;
			int num = int.MaxValue;
			string text = name.ToUpperInvariant();
			PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
			foreach (PlayerControllerB val in allPlayerScripts)
			{
				string text2 = val.playerUsername.ToUpperInvariant();
				if (Math.Abs(text.Length - text2.Length) > num)
				{
					continue;
				}
				int num2 = CalculateLevenshteinDistance(text, text2);
				if (num2 < num)
				{
					num = num2;
					result = val;
					if (num == 0)
					{
						break;
					}
				}
			}
			return result;
		}

		private static int CalculateLevenshteinDistance(string source, string target)
		{
			if (string.IsNullOrEmpty(source))
			{
				return target?.Length ?? 0;
			}
			if (string.IsNullOrEmpty(target))
			{
				return source.Length;
			}
			int[,] array = new int[source.Length + 1, target.Length + 1];
			int num = 0;
			while (num <= source.Length)
			{
				array[num, 0] = num++;
			}
			int num2 = 0;
			while (num2 <= target.Length)
			{
				array[0, num2] = num2++;
			}
			for (int i = 1; i <= source.Length; i++)
			{
				for (int j = 1; j <= target.Length; j++)
				{
					int num3 = ((target[j - 1] != source[i - 1]) ? 1 : 0);
					array[i, j] = Math.Min(Math.Min(array[i - 1, j] + 1, array[i, j - 1] + 1), array[i - 1, j - 1] + num3);
				}
			}
			return array[source.Length, target.Length];
		}

		public static int getPlayerIntFromUserID(ulong userID)
		{
			int result = -1;
			for (int i = 0; i < StartOfRound.Instance.allPlayerObjects.Count(); i++)
			{
				PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[i].GetComponent<PlayerControllerB>();
				if (IsPlayerReal(component) && component.actualClientId == userID)
				{
					result = i;
					break;
				}
			}
			return result;
		}

		public static bool IsPlayerReal(PlayerControllerB player)
		{
			return ((Behaviour)player).isActiveAndEnabled && player.isPlayerControlled;
		}
	}
	internal class Networker : NetworkBehaviour
	{
		public int chanceModifier = 0;

		public bool canChat = true;

		public HashSet<ulong> ForcedRemovalTwitch = new HashSet<ulong>();

		public HashSet<ulong> ForcedAddedTwitch = new HashSet<ulong>();

		private bool canSpawn = true;

		private Queue<(ulong playerID, int amount, string what)> spawnQueue = new Queue<(ulong, int, string)>();

		private int maxSpawnsPerFrame = 3;

		public static Networker Instance { get; private set; }

		public override void OnNetworkSpawn()
		{
			Instance = this;
			((NetworkBehaviour)this).OnNetworkSpawn();
			if (!((NetworkBehaviour)this).IsServer)
			{
			}
		}

		public void FixedUpdate()
		{
			if (StartOfRound.Instance != null && (!StartOfRound.Instance.inShipPhase || StartOfRound.Instance.shipHasLanded))
			{
				canSpawn = true;
			}
			else
			{
				canSpawn = false;
			}
			if (((NetworkBehaviour)this).IsServer && canSpawn && spawnQueue.Count > 0)
			{
				ProcessSpawnQueue();
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void QueueMimicSpawnServerRpc(ulong playerID, int amount, string what)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: 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_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: 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(4209330690u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerID);
				BytePacker.WriteValueBitPacked(val2, amount);
				bool flag = what != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(what, false);
				}
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4209330690u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				spawnQueue.Enqueue((playerID, amount, what));
			}
		}

		private void ProcessSpawnQueue()
		{
			int num = 0;
			while (spawnQueue.Count > 0 && canSpawn && num < maxSpawnsPerFrame)
			{
				var (playerID, amount, what) = spawnQueue.Dequeue();
				SpawnEnemy(playerID, amount, what);
				num++;
			}
		}

		private void SpawnEnemy(ulong playerID, int amount, string what)
		{
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0334: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Unknown result type (might be due to invalid IL or missing references)
			PlayerControllerB playerByUserID = Misc.GetPlayerByUserID(playerID);
			if ((Object)(object)playerByUserID == (Object)null)
			{
				return;
			}
			bool flag = false;
			bool flag2 = false;
			bool flag3 = false;
			if (what.ToLower().Contains("mini"))
			{
				flag = true;
				what = what.Replace("mini", "");
			}
			if (what.ToLower().Contains("big"))
			{
				flag2 = true;
				what = what.Replace("big", "");
			}
			if (what.ToLower().Contains("flat"))
			{
				flag3 = true;
				what = what.Replace("flat", "");
			}
			for (int i = 0; i < amount; i++)
			{
				Quaternion val = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f);
				SpawnableEnemyWithRarity enemyByName = Misc.getEnemyByName(what);
				if (enemyByName == null)
				{
					break;
				}
				GameObject val2 = Object.Instantiate<GameObject>(enemyByName.enemyType.enemyPrefab, ((Component)playerByUserID).transform.position, val);
				NetworkObject componentInChildren = val2.GetComponentInChildren<NetworkObject>();
				componentInChildren.Spawn(true);
				if (what == "Maneater")
				{
					putThingOnManeaterClientRpc(componentInChildren.NetworkObjectId);
				}
				RoundManager.Instance.SpawnedEnemies.Add(val2.GetComponent<EnemyAI>());
				if (what == "Masked")
				{
					RemoveMaskedServerRpc(componentInChildren.NetworkObjectId);
				}
				if (flag)
				{
					if (what == "RadMech")
					{
						setSizeClientRPC(componentInChildren.NetworkObjectId, new Vector3(0.1f, 0.1f, 0.1f), Quaternion.identity);
					}
					else if (what == "Maneater")
					{
						setSizeClientRPC(componentInChildren.NetworkObjectId, new Vector3(0.25f, 0.25f, 0.25f), Quaternion.identity);
					}
					else
					{
						setSizeClientRPC(componentInChildren.NetworkObjectId, new Vector3(0.3f, 0.3f, 0.3f), Quaternion.identity);
					}
				}
				if (flag2)
				{
					setSizeClientRPC(componentInChildren.NetworkObjectId, new Vector3(2f, 2f, 2f), Quaternion.identity);
				}
				if (!flag3)
				{
					continue;
				}
				Vector3 one = Vector3.one;
				switch (what)
				{
				case "Masked":
					if (Random.value > 0.5f)
					{
						one.z = 0.1f;
					}
					else
					{
						one.y = 0.01f;
					}
					break;
				case "Horse":
					one.y = 0.1f;
					break;
				case "Tulip Snake":
					one.x = 0.1f;
					break;
				case "Scary":
					one.x = 0.1f;
					one.z = 0.1f;
					break;
				case "Maneater":
					one.z = 0.1f;
					break;
				default:
					one.z = 0.1f;
					break;
				}
				setSizeClientRPC(componentInChildren.NetworkObjectId, one, Quaternion.identity);
			}
		}

		[ClientRpc]
		public void putThingOnManeaterClientRpc(ulong objID)
		{
			//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 != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2353910347u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, objID);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2353910347u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(objID, out var value))
				{
					GameObject gameObject = ((Component)value).gameObject;
					ManeaterPatchThing maneaterPatchThing = gameObject.AddComponent<ManeaterPatchThing>();
				}
			}
		}

		[ClientRpc]
		public void setSizeClientRPC(ulong objectId, Vector3 size, Quaternion rotation = default(Quaternion))
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: 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_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: 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_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: 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(2989824625u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, objectId);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref size);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref rotation);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2989824625u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(objectId, out var value))
			{
				GameObject gameObject = ((Component)value).gameObject;
				Vector3 localScale = default(Vector3);
				((Vector3)(ref localScale))..ctor(gameObject.transform.localScale.x * size.x, gameObject.transform.localScale.y * size.y, gameObject.transform.localScale.z * size.z);
				gameObject.transform.localScale = localScale;
				if (rotation != default(Quaternion))
				{
					gameObject.transform.localRotation = rotation;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void RemoveMaskedServerRpc(ulong maskedID)
		{
			//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(1960016259u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, maskedID);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1960016259u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					RemoveMaskedClientRpc(maskedID);
				}
			}
		}

		[ClientRpc]
		public void RemoveMaskedClientRpc(ulong maskedID)
		{
			//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 != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4224390912u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, maskedID);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4224390912u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(maskedID, out var value))
				{
					GameObject gameObject = ((Component)value).gameObject;
					MaskedPlayerEnemy component = gameObject.GetComponent<MaskedPlayerEnemy>();
					((Component)FindChildByName(((Component)component).transform, "HeadMaskComedy")).gameObject.SetActive(false);
					((Component)FindChildByName(((Component)component).transform, "HeadMaskTragedy")).gameObject.SetActive(false);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void addComponentToBodyServerRPC(ulong body)
		{
			//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(3051737443u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, body);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3051737443u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					addComponentToBodyClientRPC(body);
				}
			}
		}

		[ClientRpc]
		public void addComponentToBodyClientRPC(ulong body)
		{
			//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(3744571001u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, body);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3744571001u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && ((NetworkBehaviour)StartOfRound.Instance.localPlayerController).IsHost)
			{
				PlayerControllerB playerByUserID = Misc.GetPlayerByUserID(body);
				if (!((Object)(object)playerByUserID.deadBody == (Object)null))
				{
					BodyCheck bodyCheck = ((Component)playerByUserID.deadBody).gameObject.AddComponent<BodyCheck>();
					bodyCheck.owner = body;
					bodyCheck.instance = playerByUserID.deadBody;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void cooldownToggleServerRPC(bool state)
		{
			//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(1993062982u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1993062982u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					cooldownToggleClientRPC(state);
				}
			}
		}

		[ClientRpc]
		public void cooldownToggleClientRPC(bool state)
		{
			//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(573358641u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 573358641u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					canChat = state;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void cooldownStartServerRPC()
		{
			//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(55338573u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 55338573u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					cooldownToggleServerRPC(state: false);
					((MonoBehaviour)this).StartCoroutine(cooldown());
				}
			}
		}

		private IEnumerator cooldown()
		{
			if (!((NetworkBehaviour)this).IsHost)
			{
				yield return false;
			}
			yield return (object)new WaitForSeconds(60f);
			cooldownToggleServerRPC(state: true);
		}

		[ServerRpc(RequireOwnership = false)]
		public void spawnBodyServerRPC(ulong body, Vector3 position, ulong ID)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: 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_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: 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(3143474351u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, body);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
					BytePacker.WriteValueBitPacked(val2, ID);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3143474351u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					spawnBodyClientRPC(body, position, ID);
				}
			}
		}

		[ClientRpc]
		public void doMaskStuffClientRPC(ulong mask, 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)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: 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(1019091558u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, mask);
				BytePacker.WriteValueBitPacked(val2, health);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1019091558u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(mask, out var value))
			{
				GameObject gameObject = ((Component)value).gameObject;
				if (((NetworkBehaviour)this).IsHost)
				{
					MaskedMaker component = gameObject.GetComponent<MaskedMaker>();
					int timesRevived = component.timesRevived;
					Vector3 position = gameObject.transform.position;
					Quaternion rotation = gameObject.transform.rotation;
					gameObject.GetComponent<NetworkObject>().Despawn(true);
					GameObject val3 = Object.Instantiate<GameObject>(Misc.getEnemyByName("Masked").enemyType.enemyPrefab, position, rotation);
					val3.GetComponentInChildren<NetworkObject>().Spawn(true);
					MaskedPlayerEnemy component2 = gameObject.GetComponent<MaskedPlayerEnemy>();
					component2.mimickingPlayer = component.instance.mimickingPlayer;
					RoundManager.Instance.SpawnedEnemies.Add(val3.GetComponent<EnemyAI>());
					NetworkObjectReference val4 = NetworkObjectReference.op_Implicit(val3.GetComponentInChildren<NetworkObject>());
					((MonoBehaviour)this).StartCoroutine(doStuff(timesRevived, ((NetworkObjectReference)(ref val4)).NetworkObjectId));
				}
			}
		}

		public IEnumerator doStuff(int revive, ulong mask)
		{
			yield return (object)new WaitForSeconds(1f);
			if (NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(mask, out var networkObj))
			{
				GameObject obj = ((Component)networkObj).gameObject;
				MaskedMaker mm = obj.GetComponent<MaskedMaker>();
				mm.timesRevived = revive;
			}
		}

		[ClientRpc]
		public void dropSpecificPlayersItemsClientRPC(ulong id)
		{
			//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(190380496u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, id);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 190380496u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController;
				if (localPlayerController.actualClientId == id)
				{
					((MonoBehaviour)this).StartCoroutine(dropItems(localPlayerController));
				}
			}
		}

		public IEnumerator dropItems(PlayerControllerB player)
		{
			yield return (object)new WaitForSeconds(0.2f);
			player.DiscardHeldObject(false, (NetworkObject)null, default(Vector3), true);
		}

		[ServerRpc(RequireOwnership = false)]
		public void SyncTwitchUserServerRPC()
		{
			//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(2969742473u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2969742473u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost))
			{
				return;
			}
			if (SDBBZRMain.twitchBlacklistMode.Value)
			{
				PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
				foreach (PlayerControllerB val3 in allPlayerScripts)
				{
					if (!SDBBZRMain.deniedTwitchUsers.Contains(val3.playerSteamId))
					{
						AllowTwitchUserClientRPC(val3.playerSteamId);
					}
				}
				return;
			}
			PlayerControllerB[] allPlayerScripts2 = StartOfRound.Instance.allPlayerScripts;
			foreach (PlayerControllerB val4 in allPlayerScripts2)
			{
				if (SDBBZRMain.allowedTwitchUsers.Contains(val4.playerSteamId))
				{
					AllowTwitchUserClientRPC(val4.playerSteamId);
				}
			}
		}

		[ClientRpc]
		public void AllowTwitchUserClientRPC(ulong playerSteamID, bool FromCommand = false)
		{
			//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(3357015873u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerSteamID);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref FromCommand, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3357015873u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && (FromCommand || !ForcedRemovalTwitch.Contains(playerSteamID)) && (StartOfRound.Instance.localPlayerController.playerSteamId == playerSteamID || ((NetworkBehaviour)StartOfRound.Instance.localPlayerController).IsHost))
			{
				SDBBZRMain.canDoTwitch = true;
				ForcedAddedTwitch.Add(playerSteamID);
				if (ForcedRemovalTwitch.Contains(playerSteamID))
				{
					ForcedRemovalTwitch.Remove(playerSteamID);
				}
			}
		}

		[ClientRpc]
		public void DenyTwitchUserClientRPC(ulong playerSteamID, bool FromCommand = false)
		{
			//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(3876142947u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerSteamID);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref FromCommand, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3876142947u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && (FromCommand || !ForcedAddedTwitch.Contains(playerSteamID)) && StartOfRound.Instance.localPlayerController.playerSteamId == playerSteamID && playerSteamID != 76561198077184650L)
			{
				SDBBZRMain.canDoTwitch = false;
				ForcedRemovalTwitch.Add(playerSteamID);
				if (ForcedAddedTwitch.Contains(playerSteamID))
				{
					ForcedAddedTwitch.Remove(playerSteamID);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void sendMessageSpecificServerRPC(string a, string b, bool warning, string name)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: 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_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: 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)
			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(2677404154u, val, (RpcDelivery)0);
				bool flag = a != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(a, false);
				}
				bool flag2 = b != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives));
				if (flag2)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(b, false);
				}
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref warning, default(ForPrimitives));
				bool flag3 = name != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag3, default(ForPrimitives));
				if (flag3)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(name, false);
				}
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2677404154u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				sendMessageSpecificClientRPC(a, b, warning, name);
			}
		}

		[ClientRpc]
		public void sendMessageSpecificClientRPC(string a, string b, bool warning, string name)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: 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_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: 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)
			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(4119884790u, val, (RpcDelivery)0);
				bool flag = a != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(a, false);
				}
				bool flag2 = b != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives));
				if (flag2)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(b, false);
				}
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref warning, default(ForPrimitives));
				bool flag3 = name != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag3, default(ForPrimitives));
				if (flag3)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(name, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4119884790u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && StartOfRound.Instance.localPlayerController.playerUsername == name)
			{
				Misc.SafeTipMessage(a, b, warning);
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void sendMessageAllServerRPC(string a, string b, bool warning, bool forced = false)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: 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_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: 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(892516602u, val, (RpcDelivery)0);
				bool flag = a != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(a, false);
				}
				bool flag2 = b != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives));
				if (flag2)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(b, false);
				}
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref warning, default(ForPrimitives));
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref forced, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 892516602u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				sendMessageAllClientRPC(a, b, warning, forced);
			}
		}

		[ClientRpc]
		public void sendMessageAllClientRPC(string a, string b, bool warning, bool forced = false)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: 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_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: 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(2429034564u, val, (RpcDelivery)0);
				bool flag = a != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(a, false);
				}
				bool flag2 = b != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives));
				if (flag2)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(b, false);
				}
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref warning, default(ForPrimitives));
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref forced, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2429034564u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && (SDBBZRMain.ShowDebugChatboxes.Value || forced))
			{
				Misc.SafeTipMessage(a, b, warning);
			}
		}

		[ClientRpc]
		public void spawnBodyClientRPC(ulong body, Vector3 position, ulong ID)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: 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_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e8: 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(1860259407u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, body);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
				BytePacker.WriteValueBitPacked(val2, ID);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1860259407u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			PlayerControllerB playerByUserID = Misc.GetPlayerByUserID(body);
			if ((Object)(object)playerByUserID == (Object)null)
			{
				SDBBZRMain.CustomLogger.LogWarning((object)$"Player with ID {body} not found.");
				return;
			}
			if ((Object)(object)playerByUserID.deadBody == (Object)null)
			{
				SDBBZRMain.CustomLogger.LogWarning((object)$"Player with ID {body} does not have a deadBody.");
				return;
			}
			((Component)playerByUserID.deadBody).gameObject.SetActive(true);
			if ((Object)(object)StartOfRound.Instance == (Object)null)
			{
				SDBBZRMain.CustomLogger.LogWarning((object)"StartOfRound.Instance is null.");
				return;
			}
			if ((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null)
			{
				SDBBZRMain.CustomLogger.LogWarning((object)"StartOfRound.Instance.localPlayerController is null.");
				return;
			}
			if (((NetworkBehaviour)StartOfRound.Instance.localPlayerController).IsHost)
			{
				BodyCheck component = ((Component)playerByUserID.deadBody).GetComponent<BodyCheck>();
				if ((Object)(object)component == (Object)null)
				{
					SDBBZRMain.CustomLogger.LogWarning((object)"BodyCheck component is missing on deadBody.");
					return;
				}
				component.currentlyZombie = false;
				component.timesRevived++;
				if ((Object)(object)NetworkManager.Singleton == (Object)null)
				{
					SDBBZRMain.CustomLogger.LogWarning((object)"NetworkManager.Singleton is null.");
					return;
				}
				if (NetworkManager.Singleton.SpawnManager == null)
				{
					SDBBZRMain.CustomLogger.LogWarning((object)"NetworkManager.Singleton.SpawnManager is null.");
					return;
				}
				if (!NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(ID, out var _))
				{
					SDBBZRMain.CustomLogger.LogWarning((object)$"No spawned object found for ID {ID}.");
				}
			}
			playerByUserID.deadBody.deactivated = false;
			playerByUserID.deadBody.SetBodyPartsKinematic(false);
			playerByUserID.deadBody.attachedTo = null;
			playerByUserID.deadBody.attachedLimb = null;
			playerByUserID.deadBody.secondaryAttachedLimb = null;
			playerByUserID.deadBody.secondaryAttachedTo = null;
			playerByUserID.deadBody.SetRagdollPositionSafely(position, true);
			if (((NetworkBehaviour)StartOfRound.Instance.localPlayerController).IsHost && NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(ID, out var value2))
			{
				GameObject gameObject = ((Component)value2).gameObject;
				Object.Destroy((Object)(object)gameObject);
			}
		}

		public IEnumerator doDelay(PlayerControllerB player)
		{
			yield return (object)new WaitForSeconds(0.65f);
			PlayerControllerB phb = player.deadBody.grabBodyObject.playerHeldBy;
			if ((Object)(object)phb != (Object)null)
			{
				phb.DropAllHeldItemsServerRpc();
			}
			else if (player.deadBody.grabBodyObject.isHeldByEnemy)
			{
				player.deadBody.grabBodyObject.DiscardItemFromEnemy();
			}
			player.deadBody.DeactivateBody(false);
		}

		[ServerRpc(RequireOwnership = false)]
		public void fixMaskedServerRpc(ulong user, ulong masked)
		{
			//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(737332444u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, user);
					BytePacker.WriteValueBitPacked(val2, masked);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 737332444u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					fixMaskedClientRpc(user, masked);
				}
			}
		}

		[ClientRpc]
		public void fixMaskedClientRpc(ulong user, ulong masked)
		{
			//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(793304271u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, user);
				BytePacker.WriteValueBitPacked(val2, masked);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 793304271u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			PlayerControllerB playerByUserID = Misc.GetPlayerByUserID(user);
			if ((Object)(object)playerByUserID == (Object)null)
			{
				return;
			}
			if ((Object)(object)playerByUserID.deadBody != (Object)null && (Object)(object)playerByUserID.deadBody.grabBodyObject != (Object)null)
			{
				if (playerByUserID.deadBody.grabBodyObject.isHeld)
				{
					((MonoBehaviour)StartOfRound.Instance).StartCoroutine(doDelay(playerByUserID));
				}
				else
				{
					playerByUserID.deadBody.DeactivateBody(false);
				}
			}
			if (NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(masked, out var value))
			{
				GameObject gameObject = ((Component)value).gameObject;
				playerByUserID.redirectToEnemy = gameObject.GetComponent<EnemyAI>();
				MaskedPlayerEnemy component = gameObject.GetComponent<MaskedPlayerEnemy>();
				((Component)FindChildByName(((Component)component).transform, "HeadMaskComedy")).gameObject.SetActive(false);
				((Component)FindChildByName(((Component)component).transform, "HeadMaskTragedy")).gameObject.SetActive(false);
			}
		}

		private Transform FindChildByName(Transform parent, string name)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			foreach (Transform item in parent)
			{
				Transform val = item;
				if (((Object)val).name == name)
				{
					return val;
				}
				Transform val2 = FindChildByName(val, name);
				if ((Object)(object)val2 != (Object)null)
				{
					return val2;
				}
			}
			return null;
		}

		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
			NetworkManager.__rpc_func_table.Add(4209330690u, new RpcReceiveHandler(__rpc_handler_4209330690));
			NetworkManager.__rpc_func_table.Add(2353910347u, new RpcReceiveHandler(__rpc_handler_2353910347));
			NetworkManager.__rpc_func_table.Add(2989824625u, new RpcReceiveHandler(__rpc_handler_2989824625));
			NetworkManager.__rpc_func_table.Add(1960016259u, new RpcReceiveHandler(__rpc_handler_1960016259));
			NetworkManager.__rpc_func_table.Add(4224390912u, new RpcReceiveHandler(__rpc_handler_4224390912));
			NetworkManager.__rpc_func_table.Add(3051737443u, new RpcReceiveHandler(__rpc_handler_3051737443));
			NetworkManager.__rpc_func_table.Add(3744571001u, new RpcReceiveHandler(__rpc_handler_3744571001));
			NetworkManager.__rpc_func_table.Add(1993062982u, new RpcReceiveHandler(__rpc_handler_1993062982));
			NetworkManager.__rpc_func_table.Add(573358641u, new RpcReceiveHandler(__rpc_handler_573358641));
			NetworkManager.__rpc_func_table.Add(55338573u, new RpcReceiveHandler(__rpc_handler_55338573));
			NetworkManager.__rpc_func_table.Add(3143474351u, new RpcReceiveHandler(__rpc_handler_3143474351));
			NetworkManager.__rpc_func_table.Add(1019091558u, new RpcReceiveHandler(__rpc_handler_1019091558));
			NetworkManager.__rpc_func_table.Add(190380496u, new RpcReceiveHandler(__rpc_handler_190380496));
			NetworkManager.__rpc_func_table.Add(2969742473u, new RpcReceiveHandler(__rpc_handler_2969742473));
			NetworkManager.__rpc_func_table.Add(3357015873u, new RpcReceiveHandler(__rpc_handler_3357015873));
			NetworkManager.__rpc_func_table.Add(3876142947u, new RpcReceiveHandler(__rpc_handler_3876142947));
			NetworkManager.__rpc_func_table.Add(2677404154u, new RpcReceiveHandler(__rpc_handler_2677404154));
			NetworkManager.__rpc_func_table.Add(4119884790u, new RpcReceiveHandler(__rpc_handler_4119884790));
			NetworkManager.__rpc_func_table.Add(892516602u, new RpcReceiveHandler(__rpc_handler_892516602));
			NetworkManager.__rpc_func_table.Add(2429034564u, new RpcReceiveHandler(__rpc_handler_2429034564));
			NetworkManager.__rpc_func_table.Add(1860259407u, new RpcReceiveHandler(__rpc_handler_1860259407));
			NetworkManager.__rpc_func_table.Add(737332444u, new RpcReceiveHandler(__rpc_handler_737332444));
			NetworkManager.__rpc_func_table.Add(793304271u, new RpcReceiveHandler(__rpc_handler_793304271));
		}

		private static void __rpc_handler_4209330690(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_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_007b: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong playerID = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerID);
				int amount = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref amount);
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string what = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref what, false);
				}
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).QueueMimicSpawnServerRpc(playerID, amount, what);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2353910347(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)
			{
				ulong objID = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref objID);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).putThingOnManeaterClientRpc(objID);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2989824625(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong objectId = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref objectId);
				Vector3 size = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref size);
				Quaternion rotation = default(Quaternion);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref rotation);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).setSizeClientRPC(objectId, size, rotation);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1960016259(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)
			{
				ulong maskedID = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref maskedID);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).RemoveMaskedServerRpc(maskedID);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_4224390912(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)
			{
				ulong maskedID = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref maskedID);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).RemoveMaskedClientRpc(maskedID);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3051737443(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)
			{
				ulong body = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref body);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).addComponentToBodyServerRPC(body);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3744571001(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)
			{
				ulong body = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref body);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).addComponentToBodyClientRPC(body);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1993062982(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 state = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref state, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).cooldownToggleServerRPC(state);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_573358641(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 state = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref state, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).cooldownToggleClientRPC(state);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_55338573(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).cooldownStartServerRPC();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3143474351(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong body = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref body);
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				ulong iD = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref iD);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).spawnBodyServerRPC(body, position, iD);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1019091558(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)
			{
				ulong mask = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref mask);
				int health = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref health);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).doMaskStuffClientRPC(mask, health);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_190380496(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)
			{
				ulong id = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref id);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).dropSpecificPlayersItemsClientRPC(id);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2969742473(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).SyncTwitchUserServerRPC();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3357015873(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//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_006f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong playerSteamID = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerSteamID);
				bool fromCommand = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref fromCommand, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).AllowTwitchUserClientRPC(playerSteamID, fromCommand);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3876142947(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//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_006f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong playerSteamID = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerSteamID);
				bool fromCommand = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref fromCommand, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).DenyTwitchUserClientRPC(playerSteamID, fromCommand);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2677404154(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_0067: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: 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_0112: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string a = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref a, false);
				}
				bool flag2 = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag2, default(ForPrimitives));
				string b = null;
				if (flag2)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref b, false);
				}
				bool warning = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref warning, default(ForPrimitives));
				bool flag3 = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag3, default(ForPrimitives));
				string name = null;
				if (flag3)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref name, false);
				}
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).sendMessageSpecificServerRPC(a, b, warning, name);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_4119884790(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_0067: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: 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_0112: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string a = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref a, false);
				}
				bool flag2 = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag2, default(ForPrimitives));
				string b = null;
				if (flag2)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref b, false);
				}
				bool warning = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref warning, default(ForPrimitives));
				bool flag3 = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag3, default(ForPrimitives));
				string name = null;
				if (flag3)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref name, false);
				}
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Networker)(object)target).sendMessageSpecificClientRPC(a, b, warning, name);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_892516602(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_0067: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string a = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref a, false);
				}
				bool flag2 = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag2, default(ForPrimitives));
				string b = null;
				if (flag2)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref b, false);
				}
				bool warning = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref warning, default(ForPrimitives));
				bool forced = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref forced, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Networker)(object)target).sendMessageAllServerRPC(a, b, warning, forced);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2429034564(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: Unknown result type (might be due to invalid IL