Decompiled source of LethalCommService v1.0.1

BepInEx/plugins/LethalChatSpawner.dll

Decompiled a day ago
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LethalChatSpawner.NetcodePatcher;
using LethalChatSpawner.Properties;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.AI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LethalChatSpawner")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyCopyright("zhiyan114 © All Rights Reserved")]
[assembly: AssemblyDescription("Twitch Chat Entity Spawner")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+fe789b1309d56fe6b7d40ea073e51dd65d0eb0dd")]
[assembly: AssemblyProduct("LethalChatSpawner")]
[assembly: AssemblyTitle("LethalChatSpawner")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: NetcodePatchedAssembly]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace LethalChatSpawner
{
	[BepInPlugin("FurryNet.lethalCommService", "lethalCommService", "1.0.1")]
	public class LCSMain : BaseUnityPlugin
	{
		public const string modGUID = "FurryNet.lethalCommService";

		public const string modName = "lethalCommService";

		public const string modVersion = "1.0.1";

		public static readonly LoggerWarpper logger = new LoggerWarpper("FurryNet.lethalCommService");

		private static readonly Harmony harmony = new Harmony("FurryNet.lethalCommService");

		public static GameObject netPrefab;

		private void Awake()
		{
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			for (int i = 0; i < types.Length; i++)
			{
				MethodInfo[] methods = types[i].GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				foreach (MethodInfo methodInfo in methods)
				{
					if (methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false).Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
			((ManualLogSource)logger).LogMessage((object)"RPCHandle Object Created!");
			netPrefab = AssetBundle.LoadFromMemory(Resources.netcodemod).LoadAsset<GameObject>("Assets/InternalAssets/NetPrefab.prefab");
			netPrefab.AddComponent<RPCHandle>();
			netPrefab.AddComponent<PingUtil>();
			netPrefab.AddComponent<PlayerManager>();
			((ManualLogSource)logger).LogMessage((object)"lethalCommService Loaded...");
			harmony.PatchAll();
		}

		private void InitNetworkBehaviour(Type type)
		{
			MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
			foreach (MethodInfo methodInfo in methods)
			{
				if (methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false).Length != 0)
				{
					methodInfo.Invoke(null, null);
				}
			}
		}
	}
	[HarmonyPatch(typeof(StartOfRound))]
	public class ShipLandState
	{
		private static bool _onMoon;

		private static bool _loaded;

		public static bool onMoon => _onMoon;

		public static bool loaded => _loaded;

		[HarmonyPatch("OnShipLandedMiscEvents")]
		[HarmonyPrefix]
		public static void shipLanded()
		{
			_onMoon = true;
			((ManualLogSource)LCSMain.logger).LogInfo((object)"Player Land On Moon");
		}

		[HarmonyPatch("ShipHasLeft")]
		[HarmonyPrefix]
		public static void shipLeft()
		{
			_onMoon = false;
			RPCHandle.Instance?.cleanFakeObjects();
			((ManualLogSource)LCSMain.logger).LogInfo((object)"Player Left Moon");
		}

		[HarmonyPatch("Start")]
		[HarmonyPrefix]
		public static void saveLoaded()
		{
			LCSLogic.syncInternalSet();
			if (NetworkManager.Singleton.IsServer)
			{
				Object.Instantiate<GameObject>(LCSMain.netPrefab).GetComponent<NetworkObject>().Spawn(false);
			}
			((ManualLogSource)LCSMain.logger).LogInfo((object)"Mod Initialized...");
			_loaded = true;
		}
	}
	[HarmonyPatch(typeof(GameNetworkManager))]
	public class NetworkHook
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		public static void NetStart(GameNetworkManager __instance)
		{
			((ManualLogSource)LCSMain.logger).LogInfo((object)"Loading netPrefab into NetworkManager");
			((Component)__instance).GetComponent<NetworkManager>().AddNetworkPrefab(LCSMain.netPrefab);
		}
	}
	[HarmonyPatch(typeof(Terminal))]
	public class TerminalHook
	{
		public static Terminal instance;

		[HarmonyPatch("Awake")]
		[HarmonyPostfix]
		public static void getTerminal(Terminal __instance)
		{
			instance = __instance;
		}

		[HarmonyPatch("ParsePlayerSentence")]
		[HarmonyPrefix]
		public static bool TerminalHandle(Terminal __instance)
		{
			char[] whitelistPunc = new char[2] { '_', ',' };
			string[] array = new string((from k in __instance.screenText.text.Substring(__instance.screenText.text.Length - __instance.textAdded)
				where !char.IsPunctuation(k) || whitelistPunc.Contains(k)
				select k).ToArray()).ToLower().Split(" ", StringSplitOptions.RemoveEmptyEntries);
			if (array.Length < 1)
			{
				return true;
			}
			if (array[0] != "lcs")
			{
				return true;
			}
			if (array.Length < 2)
			{
				string text = GeneralExtensions.Join<TerminalCmd>((IEnumerable<TerminalCmd>)TerminalCmd.lists.Values, (Func<TerminalCmd, string>)delegate(TerminalCmd c)
				{
					Dictionary<string, string>? argDesc = c.argDesc;
					return (argDesc != null && argDesc.Count > 0) ? (c.name + " " + GeneralExtensions.Join<KeyValuePair<string, string>>((IEnumerable<KeyValuePair<string, string>>)c.argDesc, (Func<KeyValuePair<string, string>, string>)((KeyValuePair<string, string> p) => p.Key), " ")) : c.name;
				}, "\n");
				TerminalCmd.Print(__instance, "All Available Commands:\n" + text);
				return false;
			}
			if (!TerminalCmd.lists.TryGetValue(array[1], out TerminalCmd value))
			{
				TerminalCmd.Print(__instance, "lcs: Bad command :(");
				((ManualLogSource)LCSMain.logger).LogWarning((object)(array[1] + " is not a valid command"));
				return false;
			}
			string[] array2 = array.Skip(2).ToArray();
			value.callfunc(__instance, array2);
			LCSMain.logger.LogInfo("Successfully execute command: " + array[1], new Dictionary<string, object> { ["args"] = GeneralExtensions.Join<string>((IEnumerable<string>)array2, (Func<string, string>)((string k) => k), ",") });
			return false;
		}

		[HarmonyPatch("TextChanged")]
		[HarmonyPrefix]
		public static bool BypassLimit(Terminal __instance)
		{
			if ((Object)(object)__instance.currentNode != (Object)null)
			{
				__instance.currentNode.maxCharactersToType = 100;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB))]
	public class PlayerControllerHook
	{
		[HarmonyPatch("DamagePlayer")]
		[HarmonyTranspiler]
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Expected O, but got Unknown
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: 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
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			MethodInfo method = typeof(Mathf).GetMethod("Clamp", new Type[3]
			{
				typeof(int),
				typeof(int),
				typeof(int)
			});
			for (int i = 0; i < list.Count; i++)
			{
				if (CodeInstructionExtensions.Calls(list[i], method))
				{
					list[i] = new CodeInstruction(OpCodes.Nop, (object)null);
					if (i - 1 >= 0)
					{
						list[i - 1] = new CodeInstruction(OpCodes.Nop, (object)null);
					}
					if (i - 2 >= 0)
					{
						list[i - 2] = new CodeInstruction(OpCodes.Nop, (object)null);
					}
					break;
				}
			}
			return list;
		}
	}
	public class LCSLogic
	{
		public static HashSet<EnemyType> globalEnemies = new HashSet<EnemyType>();

		public static HashSet<IndoorMapHazardType> globalTraps = new HashSet<IndoorMapHazardType>();

		private static List<GameObject> fakeItems = new List<GameObject>();

		public static int FakeItemsCount => fakeItems.Count;

		public static void syncInternalSet()
		{
			EnemyType[] array = Resources.FindObjectsOfTypeAll<EnemyType>();
			foreach (EnemyType item in array)
			{
				globalEnemies.Add(item);
			}
			IndoorMapHazardType[] array2 = Resources.FindObjectsOfTypeAll<IndoorMapHazardType>();
			foreach (IndoorMapHazardType val in array2)
			{
				val.prefabToSpawn.AddComponent<FakeObject>();
				globalTraps.Add(val);
			}
			((ManualLogSource)LCSMain.logger).LogInfo((object)"All traps prefab patched with FakeObject class!");
			((ManualLogSource)LCSMain.logger).LogInfo((object)"Enemy/Trap set has been successfully synced with the global state!");
		}

		public static void cleanFakeObjects()
		{
			if (!NetworkManager.Singleton.IsServer || fakeItems.Count == 0)
			{
				return;
			}
			foreach (GameObject fakeItem in fakeItems)
			{
				fakeItem.GetComponent<NetworkObject>().Despawn(true);
			}
			((ManualLogSource)LCSMain.logger).LogInfo((object)$"Cleaned up {fakeItems.Count} managed objects!");
			fakeItems.Clear();
		}

		public static void spawnItem(PlayerControllerB player, Item item, bool isFake = false, int price = 0)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkManager.Singleton.IsServer)
			{
				return;
			}
			GameObject val = Object.Instantiate<GameObject>(item.spawnPrefab, Utils.SearchBestPosition(player, item.spawnPrefab, 1f), Quaternion.identity);
			if (isFake)
			{
				GrabbableObject[] componentsInChildren = val.GetComponentsInChildren<GrabbableObject>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					Object.Destroy((Object)(object)componentsInChildren[i]);
				}
				InteractTrigger[] componentsInChildren2 = val.GetComponentsInChildren<InteractTrigger>();
				for (int i = 0; i < componentsInChildren2.Length; i++)
				{
					Object.Destroy((Object)(object)componentsInChildren2[i]);
				}
				fakeItems.Add(val);
			}
			NetworkObject component = val.GetComponent<NetworkObject>();
			if ((Object)(object)component == (Object)null)
			{
				((ManualLogSource)LCSMain.logger).LogWarning((object)"Object has not network property?");
				return;
			}
			component.Spawn(false);
			GrabbableObject componentInChildren = val.GetComponentInChildren<GrabbableObject>();
			if (!isFake && price > 0 && (Object)(object)componentInChildren != (Object)null)
			{
				componentInChildren.SetScrapValue(price);
				RoundManager.Instance.SyncScrapValuesClientRpc((NetworkObjectReference[])(object)new NetworkObjectReference[1]
				{
					new NetworkObjectReference(component)
				}, new int[1] { price });
			}
			LCSMain.logger.LogInfo("Item Spawned!", new Dictionary<string, object>
			{
				["target"] = player.playerUsername,
				["item"] = item.itemName,
				["isFake"] = isFake,
				["price"] = price
			});
		}

		public static void spawnEntity(PlayerControllerB player, EnemyType enemy, bool isFake = false)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkManager.Singleton.IsServer)
			{
				GameObject val = Object.Instantiate<GameObject>(enemy.enemyPrefab, Utils.SearchBestPosition(player, enemy.enemyPrefab), Quaternion.identity);
				EnemyAI component = val.GetComponent<EnemyAI>();
				if (isFake)
				{
					Object.Destroy((Object)(object)component);
					fakeItems.Add(val);
				}
				val.GetComponentInChildren<NetworkObject>().Spawn(true);
				if (!isFake)
				{
					RoundManager.Instance.SpawnedEnemies.Add(component);
					EnemyType enemyType = component.enemyType;
					enemyType.numberSpawned++;
					component.enemyType.hasSpawnedAtLeastOne = true;
				}
				else
				{
					RPCHandle.Instance.syncFakeEntityClientRpc(val.GetComponent<NetworkObject>().NetworkObjectId);
				}
				LCSMain.logger.LogInfo("Entity Spawned!", new Dictionary<string, object>
				{
					["target"] = player.playerUsername,
					["item"] = enemy.enemyName,
					["isFake"] = isFake
				});
			}
		}

		public static void spawnTrap(PlayerControllerB player, IndoorMapHazardType trap, bool isFake = false)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: 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_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkManager.Singleton.IsServer)
			{
				Vector3 val = Utils.SearchBestPosition(player, trap.prefabToSpawn);
				Vector3 val2 = ((Component)player).transform.position - val;
				val2.y = 0f;
				GameObject val3 = Object.Instantiate<GameObject>(trap.prefabToSpawn, val, Quaternion.LookRotation(((Vector3)(ref val2)).normalized), RoundManager.Instance.mapPropsContainer.transform);
				if (isFake)
				{
					val3.GetComponent<FakeObject>().isFake.Value = isFake;
					fakeItems.Add(val3);
				}
				val3.GetComponent<NetworkObject>().Spawn(true);
				LCSMain.logger.LogInfo("Trap Spawned!", new Dictionary<string, object>
				{
					["target"] = player.playerUsername,
					["trap"] = ((Object)trap.prefabToSpawn).name,
					["isFake"] = isFake
				});
			}
		}

		public static void changeQuota(string type, int val = 0)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				TimeOfDay instance = TimeOfDay.Instance;
				switch (type)
				{
				case "time":
					instance.quotaVariables.deadlineDaysAmount = ((val > 0) ? val : 100);
					instance.timeUntilDeadline = (float)((val > 0) ? val : 100) * instance.totalTime;
					break;
				case "cur":
					instance.quotaFulfilled = ((val > 0) ? val : 9999);
					break;
				case "due":
					instance.profitQuota = ((val > 0) ? val : 9999);
					break;
				}
				RPCHandle.Instance.syncQuotaClientRpc(instance.quotaFulfilled, instance.profitQuota, instance.timeUntilDeadline);
				((ManualLogSource)LCSMain.logger).LogInfo((object)$"Changed quota for {type} to {val}");
			}
		}

		public static void SetBalance(int val)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				Terminal val2 = Object.FindObjectOfType<Terminal>();
				if ((Object)(object)val2 == (Object)null)
				{
					((ManualLogSource)LCSMain.logger).LogError((object)"Terminal not found!");
					return;
				}
				val2.groupCredits = val;
				TerminalHook.instance.SyncGroupCreditsClientRpc(val, TerminalHook.instance.numberOfItemsInDropship);
				((ManualLogSource)LCSMain.logger).LogInfo((object)"Terminal Balance successfully updated!");
			}
		}
	}
	public class FakeObject : NetworkBehaviour
	{
		public NetworkVariable<bool> isFake = new NetworkVariable<bool>(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

		public bool isReal()
		{
			return !isFake.Value;
		}

		protected override void __initializeVariables()
		{
			if (isFake == null)
			{
				throw new Exception("FakeObject.isFake cannot be null. All NetworkVariableBase instances must be initialized.");
			}
			((NetworkVariableBase)isFake).Initialize((NetworkBehaviour)(object)this);
			((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)isFake, "isFake");
			base.NetworkVariableFields.Add((NetworkVariableBase)(object)isFake);
			((NetworkBehaviour)this).__initializeVariables();
		}

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

		protected internal override string __getTypeName()
		{
			return "FakeObject";
		}
	}
	[HarmonyPatch(typeof(Landmine))]
	public class LandMineHook
	{
		[HarmonyPatch("Detonate")]
		[HarmonyPrefix]
		public static bool FakeStatePatch(Landmine __instance)
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: 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)
			FakeObject componentInParent = ((Component)__instance).GetComponentInParent<FakeObject>();
			if ((Object)(object)componentInParent == (Object)null || !componentInParent.isFake.Value)
			{
				return true;
			}
			__instance.mineAudio.pitch = Random.Range(0.93f, 1.07f);
			__instance.mineAudio.PlayOneShot(__instance.mineDetonate, 1f);
			Landmine.SpawnExplosion(((Component)__instance).transform.position + Vector3.up, true, 0f, 0f, 50, 0f, (GameObject)null, false);
			LCSMain.logger.LogDebug("Landmine Fake State: true (triggered)");
			return false;
		}
	}
	[HarmonyPatch(typeof(SpikeRoofTrap))]
	internal class SpikeTrapHook
	{
		[HarmonyPatch("OnTriggerStay")]
		[HarmonyPrefix]
		public static bool FakeStatePatch(SpikeRoofTrap __instance)
		{
			FakeObject componentInParent = ((Component)__instance).GetComponentInParent<FakeObject>();
			if (!((Object)(object)componentInParent == (Object)null))
			{
				return !componentInParent.isFake.Value;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(Turret))]
	internal class TurretTrapHook
	{
		[HarmonyPatch("CheckForPlayersInLineOfSight")]
		[HarmonyPostfix]
		private static void FakeStatePatch(Turret __instance, float radius, ref PlayerControllerB? __result)
		{
			if (radius == 3f && !((Object)(object)__result == (Object)null) && ((Component)__instance).GetComponentInParent<FakeObject>().isFake.Value)
			{
				__result = null;
			}
		}
	}
	public class PlayerManager : NetworkBehaviour
	{
		public static PlayerManager? Instance { get; private set; }

		private void Awake()
		{
			Instance = this;
		}

		private void _updatePlayerStat(PlayerControllerB target, string type, int val)
		{
			switch (type)
			{
			case "health":
				target.health = val;
				break;
			case "speed":
				target.movementSpeed = val;
				break;
			case "jmpheight":
				target.jumpForce = val;
				break;
			case "reset":
				target.health = 100;
				target.movementSpeed = 5f;
				target.jumpForce = 13f;
				break;
			}
		}

		private void _setPlayerStat(PlayerControllerB target, string type, int val)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				_updatePlayerStat(target, type, val);
				syncStatClientRpc(target.playerClientId, type, val);
				LCSMain.logger.LogInfo("Changed Player Stat Successfully!", new Dictionary<string, object>
				{
					["target"] = target.playerUsername,
					["type"] = type,
					["value"] = val
				});
			}
		}

		public void setPlayerStat(PlayerControllerB target, string type, int val)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				_setPlayerStat(target, type, val);
			}
			else
			{
				setPlayerStatServerRpc(target.playerClientId, type, val);
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		private void setPlayerStatServerRpc(ulong playerid, string type, int val)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: 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)
			{
				RpcAttributeParams val2 = new RpcAttributeParams
				{
					RequireOwnership = false
				};
				RpcParams val4 = default(RpcParams);
				FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1226022596u, val4, val2, (SendTo)2, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val3, playerid);
				bool flag = type != null;
				((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val3)).WriteValueSafe(type, false);
				}
				BytePacker.WriteValueBitPacked(val3, val);
				((NetworkBehaviour)this).__endSendRpc(ref val3, 1226022596u, val4, val2, (SendTo)2, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1)
			{
				base.__rpc_exec_stage = (__RpcExecStage)0;
				ulong playerid2 = playerid;
				PlayerControllerB val5 = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => k.playerClientId == playerid2));
				if ((Object)(object)val5 == (Object)null)
				{
					((ManualLogSource)LCSMain.logger).LogWarning((object)"setPlayerStatServerRpc: Attempt to match playerid, but player not found!");
				}
				else
				{
					_setPlayerStat(val5, type, val);
				}
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		private void syncStatClientRpc(ulong playerid, string type, int val)
		{
			//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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_0064: 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_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: 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_00cf: 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)
			{
				RpcAttributeParams val2 = default(RpcAttributeParams);
				RpcParams val4 = default(RpcParams);
				FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(124201922u, val4, val2, (SendTo)7, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val3, playerid);
				bool flag = type != null;
				((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val3)).WriteValueSafe(type, false);
				}
				BytePacker.WriteValueBitPacked(val3, val);
				((NetworkBehaviour)this).__endSendRpc(ref val3, 124201922u, val4, val2, (SendTo)7, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1)
			{
				base.__rpc_exec_stage = (__RpcExecStage)0;
				ulong playerid2 = playerid;
				PlayerControllerB val5 = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => k.playerClientId == playerid2));
				if ((Object)(object)val5 == (Object)null)
				{
					((ManualLogSource)LCSMain.logger).LogWarning((object)"syncStatClientRpc: Attempt to match playerid, but player not found!");
				}
				else
				{
					_updatePlayerStat(val5, type, val);
				}
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		public void requestPlrMessageServerRpc(ulong[] playerid, string header, string message, RpcParams param = default(RpcParams))
		{
			//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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: 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)
			{
				RpcAttributeParams val = new RpcAttributeParams
				{
					RequireOwnership = false
				};
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2903883302u, param, val, (SendTo)2, (RpcDelivery)0);
				bool flag = playerid != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe<ulong>(playerid, default(ForPrimitives));
				}
				bool flag2 = header != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives));
				if (flag2)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(header, false);
				}
				bool flag3 = message != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag3, default(ForPrimitives));
				if (flag3)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(message, false);
				}
				((NetworkBehaviour)this).__endSendRpc(ref val2, 2903883302u, param, val, (SendTo)2, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1)
			{
				return;
			}
			base.__rpc_exec_stage = (__RpcExecStage)0;
			ulong[] playerid2 = playerid;
			RpcParams param2 = param;
			if (playerid2.Length == 0)
			{
				((ManualLogSource)LCSMain.logger).LogWarning((object)"requestPlrMessageServerRpc: No playerid are supplied!");
				return;
			}
			PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
			PlayerControllerB[] array = allPlayerScripts.Where((PlayerControllerB k) => playerid2.Contains(k.playerClientId)).ToArray();
			if (array.Count() == 0)
			{
				((ManualLogSource)LCSMain.logger).LogWarning((object)"requestPlrMessageServerRpc: No Player are found!");
				return;
			}
			receivePlrMessageClientRpc(header, message, RpcParams.op_Implicit(((NetworkBehaviour)this).RpcTarget.Group(array.Select((PlayerControllerB k) => ((NetworkBehaviour)k).NetworkObject.OwnerClientId).ToArray(), (RpcTargetUse)0)));
			string playerUsername = ((IEnumerable<PlayerControllerB>)allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => ((NetworkBehaviour)k).NetworkObject.OwnerClientId == param2.Receive.SenderClientId)).playerUsername;
			string text = GeneralExtensions.Join<PlayerControllerB>((IEnumerable<PlayerControllerB>)array, (Func<PlayerControllerB, string>)((PlayerControllerB k) => k.playerUsername), ", ");
			LCSMain.logger.LogInfo(playerUsername + " sent " + text + " messages", new Dictionary<string, object>
			{
				["header"] = header,
				["message"] = message
			});
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		public void receivePlrMessageClientRpc(string header, string message, RpcParams param = default(RpcParams))
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: 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_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1)
			{
				RpcAttributeParams val = default(RpcAttributeParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2058208831u, param, val, (SendTo)8, (RpcDelivery)0);
				bool flag = header != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(header, false);
				}
				bool flag2 = message != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives));
				if (flag2)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(message, false);
				}
				((NetworkBehaviour)this).__endSendRpc(ref val2, 2058208831u, param, val, (SendTo)8, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1)
			{
				base.__rpc_exec_stage = (__RpcExecStage)0;
				HUDManager.Instance.DisplayTip(header, message, false, false, "LC_Tip1");
			}
		}

		private void _teleportPlayer(PlayerControllerB playerA, PlayerControllerB playerB)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkManager.Singleton.IsServer)
			{
				playerA.TeleportPlayer(((Component)playerB).transform.position, false, 0f, false, true);
				syncTpPlayerClientRpc(playerA.playerClientId, playerB.playerClientId);
				((ManualLogSource)LCSMain.logger).LogInfo((object)("Server teleported " + playerA.playerUsername + " to " + playerB.playerUsername + "!"));
			}
		}

		public void teleportPlayer(PlayerControllerB playerA, PlayerControllerB playerB)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				_teleportPlayer(playerA, playerB);
			}
			else
			{
				teleportPlayerServerRpc(playerA.playerClientId, playerB.playerClientId);
			}
		}

		public string? tpPlayerValidation(PlayerControllerB playerA, PlayerControllerB playerB)
		{
			if (playerA.playerClientId == playerB.playerClientId)
			{
				return "You cannot teleport a player to themselves";
			}
			if (playerA.isInsideFactory != playerB.isInsideFactory)
			{
				return playerA.playerUsername + " and " + playerA.playerUsername + " are not in the same area (in-door plr can only tp to in-door plr and vice versa)";
			}
			if (!Utils.isPlayerConnected(playerA) || !Utils.isPlayerConnected(playerB))
			{
				return playerA.playerUsername + " or " + playerB.playerUsername + " may be disconnected from the game during tp process";
			}
			if (playerA.isPlayerDead || playerB.isPlayerDead)
			{
				return $"You cannot teleport (to) dead players {playerA.playerUsername}:{playerA.isPlayerDead} or {playerB.playerUsername}:{playerB.isPlayerDead}";
			}
			return null;
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		private void teleportPlayerServerRpc(ulong playeridA, ulong playeridB)
		{
			//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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: 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_009b: 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_00cd: 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)
			{
				RpcAttributeParams val = new RpcAttributeParams
				{
					RequireOwnership = false
				};
				RpcParams val3 = default(RpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3895270059u, val3, val, (SendTo)2, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playeridA);
				BytePacker.WriteValueBitPacked(val2, playeridB);
				((NetworkBehaviour)this).__endSendRpc(ref val2, 3895270059u, val3, val, (SendTo)2, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1)
			{
				return;
			}
			base.__rpc_exec_stage = (__RpcExecStage)0;
			ulong playeridA2 = playeridA;
			ulong playeridB2 = playeridB;
			PlayerControllerB val4 = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => k.playerClientId == playeridA2));
			PlayerControllerB val5 = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => k.playerClientId == playeridB2));
			if ((Object)(object)val4 == (Object)null || (Object)(object)val5 == (Object)null)
			{
				((ManualLogSource)LCSMain.logger).LogWarning((object)$"Either targets are not found -> A: {val4} | B: {val5}");
				return;
			}
			string text = tpPlayerValidation(val4, val5);
			if (text != null)
			{
				((ManualLogSource)LCSMain.logger).LogWarning((object)("Player Teleportation Failed -> " + text));
			}
			else
			{
				_teleportPlayer(val4, val5);
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		private void syncTpPlayerClientRpc(ulong playeridA, ulong playeridB)
		{
			//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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_0064: 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_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: 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)
			{
				RpcAttributeParams val = default(RpcAttributeParams);
				RpcParams val3 = default(RpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(488402402u, val3, val, (SendTo)7, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playeridA);
				BytePacker.WriteValueBitPacked(val2, playeridB);
				((NetworkBehaviour)this).__endSendRpc(ref val2, 488402402u, val3, val, (SendTo)7, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1)
			{
				base.__rpc_exec_stage = (__RpcExecStage)0;
				ulong playeridA2 = playeridA;
				ulong playeridB2 = playeridB;
				PlayerControllerB? obj = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => k.playerClientId == playeridA2));
				PlayerControllerB val4 = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => k.playerClientId == playeridB2));
				obj.TeleportPlayer(((Component)val4).transform.position, false, 0f, false, true);
			}
		}

		private void _killPlayer(PlayerControllerB player)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkManager.Singleton.IsServer)
			{
				player.KillPlayer(Vector3.zero, true, (CauseOfDeath)0, 0, default(Vector3), false);
				syncKillPlayerClientRpc(player.playerClientId);
				((ManualLogSource)LCSMain.logger).LogInfo((object)("Killed player " + player.playerUsername + "!"));
			}
		}

		public void killPlayer(PlayerControllerB player)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				_killPlayer(player);
			}
			else
			{
				killPlayerServerRPC(player.playerClientId);
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		private void killPlayerServerRPC(ulong playeridA)
		{
			//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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: 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_0092: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1)
			{
				RpcAttributeParams val = new RpcAttributeParams
				{
					RequireOwnership = false
				};
				RpcParams val3 = default(RpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1488204687u, val3, val, (SendTo)2, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playeridA);
				((NetworkBehaviour)this).__endSendRpc(ref val2, 1488204687u, val3, val, (SendTo)2, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1)
			{
				base.__rpc_exec_stage = (__RpcExecStage)0;
				ulong playeridA2 = playeridA;
				PlayerControllerB val4 = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => k.playerClientId == playeridA2));
				if ((Object)(object)val4 == (Object)null)
				{
					((ManualLogSource)LCSMain.logger).LogWarning((object)"Player not found!");
				}
				else if (val4.isPlayerDead)
				{
					((ManualLogSource)LCSMain.logger).LogWarning((object)"Cannot kill dead player!");
				}
				else
				{
					_killPlayer(val4);
				}
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		private void syncKillPlayerClientRpc(ulong playerid)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_0064: 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_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: 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)
			{
				RpcAttributeParams val = default(RpcAttributeParams);
				RpcParams val3 = default(RpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(36225306u, val3, val, (SendTo)7, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerid);
				((NetworkBehaviour)this).__endSendRpc(ref val2, 36225306u, val3, val, (SendTo)7, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1)
			{
				base.__rpc_exec_stage = (__RpcExecStage)0;
				ulong playerid2 = playerid;
				((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => k.playerClientId == playerid2)).KillPlayer(Vector3.zero, true, (CauseOfDeath)0, 0, default(Vector3), false);
			}
		}

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

		protected override void __initializeRpcs()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Expected O, but got Unknown
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Expected O, but got Unknown
			((NetworkBehaviour)this).__registerRpc(1226022596u, new RpcReceiveHandler(__rpc_handler_1226022596), "setPlayerStatServerRpc");
			((NetworkBehaviour)this).__registerRpc(124201922u, new RpcReceiveHandler(__rpc_handler_124201922), "syncStatClientRpc");
			((NetworkBehaviour)this).__registerRpc(2903883302u, new RpcReceiveHandler(__rpc_handler_2903883302), "requestPlrMessageServerRpc");
			((NetworkBehaviour)this).__registerRpc(2058208831u, new RpcReceiveHandler(__rpc_handler_2058208831), "receivePlrMessageClientRpc");
			((NetworkBehaviour)this).__registerRpc(3895270059u, new RpcReceiveHandler(__rpc_handler_3895270059), "teleportPlayerServerRpc");
			((NetworkBehaviour)this).__registerRpc(488402402u, new RpcReceiveHandler(__rpc_handler_488402402), "syncTpPlayerClientRpc");
			((NetworkBehaviour)this).__registerRpc(1488204687u, new RpcReceiveHandler(__rpc_handler_1488204687), "killPlayerServerRPC");
			((NetworkBehaviour)this).__registerRpc(36225306u, new RpcReceiveHandler(__rpc_handler_36225306), "syncKillPlayerClientRpc");
			((NetworkBehaviour)this).__initializeRpcs();
		}

		private static void __rpc_handler_1226022596(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_0068: 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);
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string type = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref type, false);
				}
				int val = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref val);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((PlayerManager)(object)target).setPlayerStatServerRpc(playerid, type, val);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_124201922(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_0068: 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);
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string type = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref type, false);
				}
				int val = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref val);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((PlayerManager)(object)target).syncStatClientRpc(playerid, type, val);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2903883302(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_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: 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_010e: 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));
				ulong[] playerid = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe<ulong>(ref playerid, default(ForPrimitives));
				}
				bool flag2 = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag2, default(ForPrimitives));
				string header = null;
				if (flag2)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref header, false);
				}
				bool flag3 = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag3, default(ForPrimitives));
				string message = null;
				if (flag3)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref message, false);
				}
				RpcParams ext = rpcParams.Ext;
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((PlayerManager)(object)target).requestPlrMessageServerRpc(playerid, header, message, ext);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2058208831(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_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: 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_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: 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 header = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref header, false);
				}
				bool flag2 = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag2, default(ForPrimitives));
				string message = null;
				if (flag2)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref message, false);
				}
				RpcParams ext = rpcParams.Ext;
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((PlayerManager)(object)target).receivePlrMessageClientRpc(header, message, ext);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3895270059(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 playeridA = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playeridA);
				ulong playeridB = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playeridB);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((PlayerManager)(object)target).teleportPlayerServerRpc(playeridA, playeridB);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_488402402(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 playeridA = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playeridA);
				ulong playeridB = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playeridB);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((PlayerManager)(object)target).syncTpPlayerClientRpc(playeridA, playeridB);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1488204687(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 playeridA = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playeridA);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((PlayerManager)(object)target).killPlayerServerRPC(playeridA);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_36225306(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 playerid = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerid);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((PlayerManager)(object)target).syncKillPlayerClientRpc(playerid);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "PlayerManager";
		}
	}
	public class RPCHandle : NetworkBehaviour
	{
		public static RPCHandle? Instance { get; private set; }

		private void Awake()
		{
			Instance = this;
		}

		public void cleanFakeObjects()
		{
			if (NetworkManager.Singleton.IsServer)
			{
				LCSLogic.cleanFakeObjects();
			}
			else
			{
				cleanFakeObjectsServerRpc();
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		public void cleanFakeObjectsServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: 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)
				{
					RpcAttributeParams val = new RpcAttributeParams
					{
						RequireOwnership = false,
						Delivery = (RpcDelivery)0
					};
					RpcParams val3 = default(RpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2809671309u, val3, val, (SendTo)2, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendRpc(ref val2, 2809671309u, val3, val, (SendTo)2, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1)
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					LCSLogic.cleanFakeObjects();
				}
			}
		}

		public void spawnItem(PlayerControllerB player, Item item, bool isFake = false, int price = 0)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				LCSLogic.spawnItem(player, item, isFake, price);
			}
			else
			{
				spawnItemServerRpc(player.playerClientId, item.itemName, isFake, price);
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		private void spawnItemServerRpc(ulong playerID, string itemName, bool isFake, int price)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: 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)
			{
				RpcAttributeParams val = new RpcAttributeParams
				{
					RequireOwnership = false,
					Delivery = (RpcDelivery)0
				};
				RpcParams val3 = default(RpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3809075062u, val3, val, (SendTo)2, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerID);
				bool flag = itemName != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(itemName, false);
				}
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref isFake, default(ForPrimitives));
				BytePacker.WriteValueBitPacked(val2, price);
				((NetworkBehaviour)this).__endSendRpc(ref val2, 3809075062u, val3, val, (SendTo)2, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1)
			{
				return;
			}
			base.__rpc_exec_stage = (__RpcExecStage)0;
			ulong playerID2 = playerID;
			string itemName2 = itemName;
			PlayerControllerB val4 = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => k.playerClientId == playerID2));
			if (!Object.op_Implicit((Object)(object)val4))
			{
				((ManualLogSource)LCSMain.logger).LogWarning((object)("Player " + val4.playerUsername + " left before spawnItemRPC processes them!"));
				return;
			}
			Item item = StartOfRound.Instance.allItemsList.itemsList.Find((Item k) => k.itemName == itemName2);
			LCSLogic.spawnItem(val4, item, isFake, price);
		}

		public void spawnEntity(PlayerControllerB player, EnemyType enemy, bool isFake = false)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				LCSLogic.spawnEntity(player, enemy, isFake);
			}
			else
			{
				spawnEntityServerRpc(player.playerClientId, enemy.enemyName, isFake);
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		private void spawnEntityServerRpc(ulong playerID, string entityName, bool isFake)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1)
			{
				RpcAttributeParams val = new RpcAttributeParams
				{
					RequireOwnership = false,
					Delivery = (RpcDelivery)0
				};
				RpcParams val3 = default(RpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1364047745u, val3, val, (SendTo)2, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerID);
				bool flag = entityName != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(entityName, false);
				}
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref isFake, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendRpc(ref val2, 1364047745u, val3, val, (SendTo)2, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1)
			{
				return;
			}
			base.__rpc_exec_stage = (__RpcExecStage)0;
			ulong playerID2 = playerID;
			string entityName2 = entityName;
			PlayerControllerB val4 = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => k.playerClientId == playerID2));
			if (!Object.op_Implicit((Object)(object)val4))
			{
				((ManualLogSource)LCSMain.logger).LogWarning((object)("Player " + val4.playerUsername + " left before spawnEntityRPC processes them!"));
				return;
			}
			EnemyType enemy = ((IEnumerable<EnemyType>)LCSLogic.globalEnemies).FirstOrDefault((Func<EnemyType, bool>)((EnemyType k) => k.enemyName == entityName2));
			LCSLogic.spawnEntity(val4, enemy, isFake);
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		public void syncFakeEntityClientRpc(ulong netObjId)
		{
			//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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: 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_0092: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1)
				{
					RpcAttributeParams val = new RpcAttributeParams
					{
						DeferLocal = true
					};
					RpcParams val3 = default(RpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1575146857u, val3, val, (SendTo)7, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, netObjId);
					((NetworkBehaviour)this).__endSendRpc(ref val2, 1575146857u, val3, val, (SendTo)7, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1)
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					Object.Destroy((Object)(object)((Component)NetworkManager.Singleton.SpawnManager.SpawnedObjects.GetValueOrDefault(netObjId)).GetComponentInParent<EnemyAI>());
				}
			}
		}

		public void spawnTrap(PlayerControllerB player, IndoorMapHazardType trap, bool isFake = false)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				LCSLogic.spawnTrap(player, trap, isFake);
			}
			else
			{
				spawnTrapServerRpc(player.playerClientId, ((Object)trap.prefabToSpawn).name, isFake);
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		private void spawnTrapServerRpc(ulong playerID, string trapName, bool isFake)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1)
			{
				RpcAttributeParams val = new RpcAttributeParams
				{
					RequireOwnership = false,
					Delivery = (RpcDelivery)0
				};
				RpcParams val3 = default(RpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(112801681u, val3, val, (SendTo)2, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerID);
				bool flag = trapName != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(trapName, false);
				}
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref isFake, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendRpc(ref val2, 112801681u, val3, val, (SendTo)2, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1)
			{
				return;
			}
			base.__rpc_exec_stage = (__RpcExecStage)0;
			ulong playerID2 = playerID;
			string trapName2 = trapName;
			PlayerControllerB val4 = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB k) => k.playerClientId == playerID2));
			if (!Object.op_Implicit((Object)(object)val4))
			{
				((ManualLogSource)LCSMain.logger).LogWarning((object)("Player " + val4.playerUsername + " left before spawnTrapServerRpc processes them!"));
				return;
			}
			IndoorMapHazardType trap = ((IEnumerable<IndoorMapHazardType>)LCSLogic.globalTraps).FirstOrDefault((Func<IndoorMapHazardType, bool>)((IndoorMapHazardType k) => ((Object)k.prefabToSpawn).name == trapName2));
			LCSLogic.spawnTrap(val4, trap, isFake);
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		public void SetBalanceServerRpc(int val)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: 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_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1)
				{
					RpcAttributeParams val2 = new RpcAttributeParams
					{
						RequireOwnership = false,
						Delivery = (RpcDelivery)0
					};
					RpcParams val4 = default(RpcParams);
					FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1919069433u, val4, val2, (SendTo)2, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val3, val);
					((NetworkBehaviour)this).__endSendRpc(ref val3, 1919069433u, val4, val2, (SendTo)2, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1)
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					LCSLogic.SetBalance(val);
				}
			}
		}

		public void changeQuota(string type, int val = 0)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				LCSLogic.changeQuota(type, val);
			}
			else
			{
				changeQuotaServerRpc(type, val);
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		private void changeQuotaServerRpc(string type, int val)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: 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_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: 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)
			{
				RpcAttributeParams val2 = new RpcAttributeParams
				{
					RequireOwnership = false,
					Delivery = (RpcDelivery)0
				};
				RpcParams val4 = default(RpcParams);
				FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3440560243u, val4, val2, (SendTo)2, (RpcDelivery)0);
				bool flag = type != null;
				((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val3)).WriteValueSafe(type, false);
				}
				BytePacker.WriteValueBitPacked(val3, val);
				((NetworkBehaviour)this).__endSendRpc(ref val3, 3440560243u, val4, val2, (SendTo)2, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1)
			{
				base.__rpc_exec_stage = (__RpcExecStage)0;
				LCSLogic.changeQuota(type, val);
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		public void syncQuotaClientRpc(int Fulfilled, int reqQuota, float time)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_0064: 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_0075: 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_0094: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: 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)
				{
					RpcAttributeParams val = default(RpcAttributeParams);
					RpcParams val3 = default(RpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2531536283u, val3, val, (SendTo)7, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, Fulfilled);
					BytePacker.WriteValueBitPacked(val2, reqQuota);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref time, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendRpc(ref val2, 2531536283u, val3, val, (SendTo)7, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1)
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					TimeOfDay instance = TimeOfDay.Instance;
					instance.quotaVariables.deadlineDaysAmount = (int)time;
					instance.timeUntilDeadline = time;
					instance.quotaFulfilled = Fulfilled;
					instance.profitQuota = reqQuota;
					instance.UpdateProfitQuotaCurrentTime();
				}
			}
		}

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

		protected override void __initializeRpcs()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Expected O, but got Unknown
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Expected O, but got Unknown
			((NetworkBehaviour)this).__registerRpc(2809671309u, new RpcReceiveHandler(__rpc_handler_2809671309), "cleanFakeObjectsServerRpc");
			((NetworkBehaviour)this).__registerRpc(3809075062u, new RpcReceiveHandler(__rpc_handler_3809075062), "spawnItemServerRpc");
			((NetworkBehaviour)this).__registerRpc(1364047745u, new RpcReceiveHandler(__rpc_handler_1364047745), "spawnEntityServerRpc");
			((NetworkBehaviour)this).__registerRpc(1575146857u, new RpcReceiveHandler(__rpc_handler_1575146857), "syncFakeEntityClientRpc");
			((NetworkBehaviour)this).__registerRpc(112801681u, new RpcReceiveHandler(__rpc_handler_112801681), "spawnTrapServerRpc");
			((NetworkBehaviour)this).__registerRpc(1919069433u, new RpcReceiveHandler(__rpc_handler_1919069433), "SetBalanceServerRpc");
			((NetworkBehaviour)this).__registerRpc(3440560243u, new RpcReceiveHandler(__rpc_handler_3440560243), "changeQuotaServerRpc");
			((NetworkBehaviour)this).__registerRpc(2531536283u, new RpcReceiveHandler(__rpc_handler_2531536283), "syncQuotaClientRpc");
			((NetworkBehaviour)this).__initializeRpcs();
		}

		private static void __rpc_handler_2809671309(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;
				((RPCHandle)(object)target).cleanFakeObjectsServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3809075062(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_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: 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_00bc: 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);
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string itemName = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref itemName, false);
				}
				bool isFake = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref isFake, default(ForPrimitives));
				int price = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref price);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RPCHandle)(object)target).spawnItemServerRpc(playerID, itemName, isFake, price);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1364047745(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_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: 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);
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string entityName = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref entityName, false);
				}
				bool isFake = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref isFake, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RPCHandle)(object)target).spawnEntityServerRpc(playerID, entityName, isFake);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1575146857(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 netObjId = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref netObjId);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RPCHandle)(object)target).syncFakeEntityClientRpc(netObjId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_112801681(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_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: 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);
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string trapName = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref trapName, false);
				}
				bool isFake = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref isFake, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RPCHandle)(object)target).spawnTrapServerRpc(playerID, trapName, isFake);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1919069433(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int balanceServerRpc = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref balanceServerRpc);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RPCHandle)(object)target).SetBalanceServerRpc(balanceServerRpc);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3440560243(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_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string type = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref type, false);
				}
				int val = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref val);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RPCHandle)(object)target).changeQuotaServerRpc(type, val);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2531536283(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_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int fulfilled = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref fulfilled);
				int reqQuota = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref reqQuota);
				float time = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref time, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RPCHandle)(object)target).syncQuotaClientRpc(fulfilled, reqQuota, time);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "RPCHandle";
		}
	}
	public class PingUtil : NetworkBehaviour
	{
		public static PingUtil? Instance { get; private set; }

		private void Awake()
		{
			Instance = this;
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		public void pingServerRpc(long timestamp, RpcParams rpcParams = default(RpcParams))
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: 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_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1)
				{
					RpcAttributeParams val = new RpcAttributeParams
					{
						RequireOwnership = false,
						Delivery = (RpcDelivery)0
					};
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2794012454u, rpcParams, val, (SendTo)2, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, timestamp);
					((NetworkBehaviour)this).__endSendRpc(ref val2, 2794012454u, rpcParams, val, (SendTo)2, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1)
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					pongClientRpc(timestamp, RpcParams.op_Implicit(((NetworkBehaviour)this).RpcTarget.Single(rpcParams.Receive.SenderClientId, (RpcTargetUse)0)));
				}
			}
		}

		[Rpc(/*Could not decode attribute arguments.*/)]
		public void pongClientRpc(long timestamp, RpcParams rpcParams = default(RpcParams))
		{
			//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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: 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_006d: 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)
			//IL_0076: 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_0092: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1)
				{
					RpcAttributeParams val = new RpcAttributeParams
					{
						Delivery = (RpcDelivery)0
					};
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3356602659u, rpcParams, val, (SendTo)8, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, timestamp);
					((NetworkBehaviour)this).__endSendRpc(ref val2, 3356602659u, rpcParams, val, (SendTo)8, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1)
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					TerminalCmd.Print(Object.FindObjectOfType<Terminal>(), $"Done, took: {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - timestamp}ms!", cleartext: false);
				}
			}
		}

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

		protected override void __initializeRpcs()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			((NetworkBehaviour)this).__registerRpc(2794012454u, new RpcReceiveHandler(__rpc_handler_2794012454), "pingServerRpc");
			((NetworkBehaviour)this).__registerRpc(3356602659u, new RpcReceiveHandler(__rpc_handler_3356602659), "pongClientRpc");
			((NetworkBehaviour)this).__initializeRpcs();
		}

		private static void __rpc_handler_2794012454(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_0031: 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_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				long timestamp = default(long);
				ByteUnpacker.ReadValueBitPacked(reader, ref timestamp);
				RpcParams ext = rpcParams.Ext;
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((PingUtil)(object)target).pingServerRpc(timestamp, ext);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3356602659(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_0031: 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_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				long timestamp = default(long);
				ByteUnpacker.ReadValueBitPacked(reader, ref timestamp);
				RpcParams ext = rpcParams.Ext;
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((PingUtil)(object)target).pongClientRpc(timestamp, ext);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string? __getTypeName()
		{
			return "PingUtil";
		}
	}
	public class TerminalCmd
	{
		public static Dictionary<string, TerminalCmd> lists = new Dictionary<string, TerminalCmd>
		{
			["help"] = new TerminalCmd
			{
				name = "help",
				description = "Show command description and arg usages",
				argDesc = new Dictionary<stri