Decompiled source of LCPlanAssassin v2.3.2
plugins/LCPlanAssassin/LCPlanAssassin.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using JetBrains.Annotations; using LCPlanAssassin.AssetLoader; using LCPlanAssassin.Items; using LCPlanAssassin.NetcodePatcher; using LCPlanAssassin.Patchers; using LCPlanAssassin.TarotCard; using LCPlanAssassin.UI; using LCPlanAssassin.Utils; using LCTarrotCard; using LCTarrotCard.Cards; using LCTarrotCard.Ressource; using LCTarrotCard.Util; using ModMain; using ModMain.TarotCard; using Unity.Netcode; using UnityEngine; using UnityEngine.Video; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("LCPlanAssassin")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LCPlanAssassin")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("b3079720-2fee-4d62-88bc-c5cdf3ec47a6")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } namespace ModMain { [BepInPlugin("LCPlanAssassin", "Plan d'assassin", "2.3.2")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class ModBase : BaseUnityPlugin { public static ModBase Instance; public ManualLogSource logger; internal Harmony harmony; internal static bool hasError; public static KeyboardShortcut testKey; private void Awake() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if ((Object)(object)Instance == (Object)null) { Instance = this; harmony = new Harmony("LCPlanAssassin"); logger = Logger.CreateLogSource("LCPlanAssassin"); RPC_Init(); Assets.LoadBundles(); if (!hasError) { bool flag = false; harmony.PatchAll(); logger.LogInfo((object)"LCPlanAssassin correctly loaded"); bool flag2 = false; } } } private static void RPC_Init() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } } [HarmonyPatch(typeof(TVScript))] internal class PatchTV { private static bool _hasPatched; [HarmonyPatch("Update")] [HarmonyPrefix] public static void PatchUpdate(TVScript __instance) { if (!_hasPatched) { _hasPatched = true; AudioClip[] array = (AudioClip[])(object)new AudioClip[__instance.tvAudioClips.Length + 1]; VideoClip[] array2 = (VideoClip[])(object)new VideoClip[__instance.tvClips.Length + 1]; for (int i = 0; i < __instance.tvAudioClips.Length; i++) { array[i] = __instance.tvAudioClips[i]; } for (int j = 0; j < __instance.tvClips.Length; j++) { array2[j] = __instance.tvClips[j]; } array[^1] = Assets.TintinAudio; array2[^1] = Assets.TintinClip; __instance.tvAudioClips = array; __instance.tvClips = array2; } } } [HarmonyPatch(typeof(PlayerControllerB))] internal class Test { [HarmonyPatch("Update")] [HarmonyPostfix] private static void TestPatch(PlayerControllerB __instance) { //IL_0031: 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_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_00a3: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) if ((!((KeyboardShortcut)(ref ModBase.testKey)).IsDown() || !((NetworkBehaviour)__instance).IsOwner) && false) { GameObject val = Object.Instantiate<GameObject>(Assets.MowerItem.spawnPrefab, ((Component)__instance).transform.position, ((Component)__instance).transform.rotation); GrabbableObject component = val.GetComponent<GrabbableObject>(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.scrapValue = 1; NetworkObject component2 = val.GetComponent<NetworkObject>(); component2.Spawn(false); component.FallToGround(true); GameObject val2 = Object.Instantiate<GameObject>(Assets.TarotItem.spawnPrefab, ((Component)__instance).transform.position, ((Component)__instance).transform.rotation); GrabbableObject component3 = val2.GetComponent<GrabbableObject>(); ((Component)component3).transform.rotation = Quaternion.Euler(component3.itemProperties.restingRotation); component3.fallTime = 0f; component3.scrapValue = 1; NetworkObject component4 = val2.GetComponent<NetworkObject>(); component4.Spawn(false); component3.FallToGround(true); InstantiateAndReturnGrabbableObject(Assets.RouterItem.spawnPrefab, ((Component)__instance).transform.position); } } private static GrabbableObject InstantiateAndReturnGrabbableObject(GameObject prefab, Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(prefab, position, Quaternion.identity); GrabbableObject component = val.GetComponent<GrabbableObject>(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.scrapValue = 1; NetworkObject component2 = val.GetComponent<NetworkObject>(); component2.Spawn(false); return component; } } public static class ModConstants { public const string MOD_GUID = "LCPlanAssassin"; public const string MOD_NAME = "Plan d'assassin"; public const string MOD_VERSION = "2.3.2"; public const bool TEST_MODE = false; } } namespace ModMain.TarotCard { public class JsuisouCard : Card { public JsuisouCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.JsuiouMat; } public override Material GetCardBurn() { return Materials.BurnRed; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if (playerWhoDrew.isPlayerDead || !playerWhoDrew.isPlayerControlled) { return ""; } Networker.Instance.TeleportPlayerServerRpc((int)playerWhoDrew.playerClientId, GetFarthestNodeFromLocation(((Component)playerWhoDrew).transform.position, playerWhoDrew.isInsideFactory).transform.position, playerWhoDrew.isInsideFactory, false); base.cardAudio.PlayOneShot(Assets.JeSuisOuClip); return "Ah j'suis où ?"; } public override string GetCardName() { return "Je suis où"; } public static GameObject GetFarthestNodeFromLocation(Vector3 location, bool inside) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (StartOfRound.Instance.currentLevel.levelID == 3) { return ((Component)StartOfRound.Instance.playerSpawnPositions[0]).gameObject; } GameObject[] array = GameObject.FindGameObjectsWithTag(inside ? "AINode" : "OutsideAINode"); GameObject result = null; float num = 0f; GameObject[] array2 = array; foreach (GameObject val in array2) { float num2 = Vector3.Distance(location, val.transform.position); if (num2 > num) { num = num2; result = val; } } return result; } } public class TheMoolCard : Card { public TheMoolCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.TheMoolMat; } public override Material GetCardBurn() { return Materials.BurnAqua; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) Networker.Instance.SpawnOysterServerRpc(((Component)playerWhoDrew).transform.position); return "J'ai eu : The Mool"; } public override string GetCardName() { return "The Mool"; } public override IEnumerator CardPullingCoroutine() { base.cardAudio.PlayOneShot(Assets.PullCardClips[Random.Range(0, Assets.PullCardClips.Count)]); yield return (object)new WaitForSeconds(1.5f); base.cardAudio.Stop(); yield return (object)new WaitForSeconds(0.7f); base.cardAudio.PlayOneShot(Assets.TheMoolClip); Renderer cardRenderer = base.cardPrefab.GetComponent<Renderer>(); Material initMat0 = cardRenderer.materials[0]; Material initMat1 = cardRenderer.materials[1]; Material initMat2 = cardRenderer.materials[2]; float delta = 0f; while (delta < 0.3f) { cardRenderer.materials[0].Lerp(initMat0, ((Card)this).GetCardBurn(), delta / 0.3f); cardRenderer.materials[1].Lerp(initMat1, ((Card)this).GetCardBurn(), delta / 0.3f); cardRenderer.materials[2].Lerp(initMat2, ((Card)this).GetCardBurn(), delta / 0.3f); delta += Time.deltaTime; yield return null; } yield return (object)new WaitForSeconds(0.2f); Vector3 initScale = base.cardPrefab.transform.localScale; float delta2 = 0f; while (delta2 < 0.3f) { base.cardPrefab.transform.localScale = initScale * (1f - Card.ControlCurve.Evaluate(delta2 / 0.3f)); delta2 += Time.deltaTime; yield return null; } base.cardPrefab.transform.localScale = Vector3.zero; } } } namespace LCPlanAssassin.Utils { [HarmonyPatch] public class Networker : NetworkBehaviour { private static GameObject _networkPrefab; public static Networker Instance { get; private set; } public override void OnNetworkSpawn() { if ((Object)(object)NetworkManager.Singleton != (Object)null && (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer)) { Networker instance = Instance; if (instance != null) { ((Component)instance).gameObject.GetComponent<NetworkObject>().Despawn(true); } } Instance = this; ((NetworkBehaviour)this).OnNetworkSpawn(); } [ServerRpc(RequireOwnership = false)] public void NScareServerRpc(int playerToScare) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1378493341u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerToScare); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1378493341u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { NScareClientRpc(playerToScare); } } } [ClientRpc] public void NScareClientRpc(int playerToScare) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2896976942u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerToScare); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2896976942u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerToScare]; if (((NetworkBehaviour)val3).IsOwner && val3.isPlayerControlled && !val3.isPlayerDead) { ((MonoBehaviour)this).StartCoroutine(WaitAndScare()); } } } [ServerRpc(RequireOwnership = false)] public void SpawnOysterServerRpc(Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1766371394u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1766371394u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SpawnOysterClientRpc(pos); } } } [ClientRpc] public void SpawnOysterClientRpc(Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1040459882u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1040459882u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { GameObject val3 = Object.Instantiate<GameObject>(Assets.OysterItem.spawnPrefab, pos, Quaternion.identity); GrabbableObject component = val3.GetComponent<GrabbableObject>(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.scrapValue = 1; NetworkObject component2 = val3.GetComponent<NetworkObject>(); component2.Spawn(false); component.FallToGround(true); } } } private static IEnumerator WaitAndScare() { yield return (object)new WaitForSeconds(Random.Range(1f, 20f)); Assets.JumpscareObj.GetComponent<Jumpscare>()?.PlayOnScreen(); } [HarmonyPatch(typeof(StartOfRound), "Awake")] [HarmonyPostfix] private static void SpawnNetHandler() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) { GameObject val = Object.Instantiate<GameObject>(_networkPrefab, Vector3.zero, Quaternion.identity); val.GetComponent<NetworkObject>().Spawn(false); } } [HarmonyPatch(typeof(GameNetworkManager), "Start")] [HarmonyPostfix] private static void Init() { if (!((Object)(object)_networkPrefab != (Object)null)) { _networkPrefab = Assets.planBundle.LoadAsset<GameObject>("Assets/PlanNetwork.prefab"); _networkPrefab.AddComponent<Networker>(); NetworkManager.Singleton.AddNetworkPrefab(_networkPrefab); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_Networker() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(1378493341u, new RpcReceiveHandler(__rpc_handler_1378493341)); NetworkManager.__rpc_func_table.Add(2896976942u, new RpcReceiveHandler(__rpc_handler_2896976942)); NetworkManager.__rpc_func_table.Add(1766371394u, new RpcReceiveHandler(__rpc_handler_1766371394)); NetworkManager.__rpc_func_table.Add(1040459882u, new RpcReceiveHandler(__rpc_handler_1040459882)); } private static void __rpc_handler_1378493341(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 playerToScare = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerToScare); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).NScareServerRpc(playerToScare); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2896976942(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 playerToScare = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerToScare); target.__rpc_exec_stage = (__RpcExecStage)2; ((Networker)(object)target).NScareClientRpc(playerToScare); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1766371394(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SpawnOysterServerRpc(pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1040459882(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)2; ((Networker)(object)target).SpawnOysterClientRpc(pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Networker"; } } public enum Planet { EXPERIMENTATION, ASSURANCE, VOW, GORDION, MARCH, ADAMANCE, REND, DINE, OFFENSE, TITAN, ARTIFICE, LIQUIDATION, EMBRION } public class SpawnRarity { private readonly Dictionary<Planet, int> rarities = new Dictionary<Planet, int>(); private readonly Item item; private int defaultValue; public SpawnRarity(int baseValue, Item itemIn) { item = itemIn; defaultValue = baseValue; foreach (Planet value in Enum.GetValues(typeof(Planet))) { rarities.Add(value, baseValue); } } public int GetRarityFor(Planet planet) { return rarities[planet]; } public int GetRarityFor(int planet) { return rarities.Values.ToList()[planet]; } public void SetValues(int experimentation = -1, int assurance = -1, int vow = -1, int march = -1, int offense = -1, int adamance = -1, int rend = -1, int dine = -1, int titan = -1, int artifice = -1, int embrion = -1) { rarities[Planet.EXPERIMENTATION] = experimentation; rarities[Planet.ASSURANCE] = assurance; rarities[Planet.VOW] = vow; rarities[Planet.MARCH] = march; rarities[Planet.OFFENSE] = offense; rarities[Planet.ADAMANCE] = adamance; rarities[Planet.REND] = rend; rarities[Planet.DINE] = dine; rarities[Planet.TITAN] = titan; rarities[Planet.ARTIFICE] = artifice; rarities[Planet.EMBRION] = embrion; } public void CopyRaritiesFrom(SpawnRarity other) { rarities[Planet.EXPERIMENTATION] = other.rarities[Planet.EXPERIMENTATION]; rarities[Planet.ASSURANCE] = other.rarities[Planet.ASSURANCE]; rarities[Planet.VOW] = other.rarities[Planet.VOW]; rarities[Planet.MARCH] = other.rarities[Planet.MARCH]; rarities[Planet.OFFENSE] = other.rarities[Planet.OFFENSE]; rarities[Planet.ADAMANCE] = other.rarities[Planet.ADAMANCE]; rarities[Planet.REND] = other.rarities[Planet.REND]; rarities[Planet.DINE] = other.rarities[Planet.DINE]; rarities[Planet.TITAN] = other.rarities[Planet.TITAN]; rarities[Planet.ARTIFICE] = other.rarities[Planet.ARTIFICE]; rarities[Planet.EMBRION] = other.rarities[Planet.EMBRION]; } public SpawnableItemWithRarity GetSpawnableItemForPlanet(Planet planet) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown return new SpawnableItemWithRarity { spawnableItem = item, rarity = AccessRaritySafe((int)planet) }; } public SpawnableItemWithRarity GetSpawnableItemForPlanet(int planet) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown return new SpawnableItemWithRarity { spawnableItem = item, rarity = AccessRaritySafe(planet) }; } private int AccessRaritySafe(int planet) { try { return rarities.Values.ToList()[planet]; } catch (Exception) { } return defaultValue; } public void ApplySpawnRarity(SelectableLevel level) { level.spawnableScrap.Add(GetSpawnableItemForPlanet(level.levelID)); } } public static class PlayerDistortionManager { [CanBeNull] public static AudioDistortionFilter GetFilterForPlayer(PlayerControllerB player) { if (!Object.op_Implicit((Object)(object)player.currentVoiceChatAudioSource) && !RefreshDistortionFilter(player)) { return null; } if ((Object)(object)player.currentVoiceChatAudioSource == (Object)null) { return null; } AudioDistortionFilter component = ((Component)player.currentVoiceChatAudioSource).GetComponent<AudioDistortionFilter>(); if (Object.op_Implicit((Object)(object)component)) { return component; } if (!RefreshDistortionFilter(player)) { return null; } return ((Component)player.currentVoiceChatAudioSource).GetComponent<AudioDistortionFilter>(); } private static bool RefreshDistortionFilter(PlayerControllerB player) { if (!Object.op_Implicit((Object)(object)player.currentVoiceChatAudioSource)) { StartOfRound.Instance.RefreshPlayerVoicePlaybackObjects(); } if (!Object.op_Implicit((Object)(object)player.currentVoiceChatAudioSource)) { return false; } AudioDistortionFilter val = ((Component)player.currentVoiceChatAudioSource).GetComponent<AudioDistortionFilter>(); if (!Object.op_Implicit((Object)(object)val)) { val = ((Component)player.currentVoiceChatAudioSource).gameObject.AddComponent<AudioDistortionFilter>(); if (Object.op_Implicit((Object)(object)val)) { val.distortionLevel = 0f; } } return Object.op_Implicit((Object)(object)val); } } } namespace LCPlanAssassin.UI { public class Jumpscare : MonoBehaviour { private bool isCurrentlyActive; private GameObject videoElement; private VideoPlayer player; private void Start() { videoElement = ((Component)((Component)this).transform.GetChild(0)).gameObject; Debug.Log((object)"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); Debug.Log((object)("Active now ? " + ((Component)this).gameObject.activeSelf)); videoElement.SetActive(false); Debug.Log((object)("Active after ? " + ((Component)this).gameObject.activeSelf)); player = ((Component)this).gameObject.GetComponent<VideoPlayer>(); player.SetTargetAudioSource((ushort)0, ((Component)this).gameObject.GetComponent<AudioSource>()); } public void PlayOnScreen() { if (!isCurrentlyActive) { ((MonoBehaviour)this).StartCoroutine(Scare()); } } private IEnumerator Scare() { isCurrentlyActive = true; VideoClip clip = Assets.NClips[Random.Range(0, Assets.NClips.Count)]; float clipTime = (float)clip.length; player.clip = clip; player.Play(); videoElement.SetActive(true); yield return (object)new WaitForSeconds(clipTime); videoElement.SetActive(false); player.Stop(); isCurrentlyActive = false; } } } namespace LCPlanAssassin.TarotCard { public class NWordCard : Card { public NWordCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.NWordMat; } public override Material GetCardBurn() { return Assets.OrangeBurn; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { List<int> list = new List<int>(); for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { list.Add(i); } Helper.Shuffle<int>((IList<int>)list); int num = 0; PlayerControllerB val; do { val = StartOfRound.Instance.allPlayerScripts[list[num]]; num++; } while (val.isPlayerDead || (!val.isPlayerControlled && num < list.Count)); if (val.isPlayerDead || !val.isPlayerControlled) { return ""; } ModBase.Instance.logger.LogDebug((object)("Chose player : " + val.playerUsername)); Networker.Instance.NScareServerRpc((int)val.playerClientId); return "What can I say except..."; } public override string GetCardName() { return "The N Word"; } } } namespace LCPlanAssassin.Patchers { [HarmonyPatch(typeof(ItemDropship))] public class ItemDropshipPatch { private static readonly List<Item> itemToDeliver = new List<Item>(); private static readonly List<Item> itemInDelivery = new List<Item>(); [HarmonyPatch("OpenShipDoorsOnServer")] [HarmonyPrefix] private static void OpenDoorPatch(ItemDropship __instance) { //IL_0020: 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) for (int i = 0; i < itemInDelivery.Count; i++) { GameObject val = Object.Instantiate<GameObject>(itemInDelivery[i].spawnPrefab, __instance.itemSpawnPositions[i % 4].position, Quaternion.identity); val.GetComponent<GrabbableObject>().fallTime = 0f; val.GetComponent<NetworkObject>().Spawn(true); } itemToDeliver.Clear(); } [HarmonyPatch("Update")] [HarmonyPrefix] private static void UpdatePatch(ItemDropship __instance, ref Terminal ___terminalScript, ref StartOfRound ___playersManager) { if (((NetworkBehaviour)__instance).IsServer && !__instance.deliveringOrder && ___terminalScript.orderedItemsFromTerminal.Count <= 0 && ___playersManager.shipHasLanded && itemToDeliver.Count > 0) { if (__instance.shipTimer > 40f) { prv_LandShipOnServer(__instance); } __instance.shipTimer += Time.deltaTime; } } private static void prv_LandShipOnServer(ItemDropship drop) { drop.shipTimer = 0f; itemInDelivery.Clear(); itemInDelivery.AddRange(itemToDeliver); itemToDeliver.Clear(); drop.playersFirstOrder = false; drop.deliveringOrder = true; drop.LandShipClientRpc(); } public static void DeliverItemServer(Item item) { ModBase.Instance.logger.LogDebug((object)("Delivering " + item.itemName)); itemToDeliver.Add(item); } } [HarmonyPatch(typeof(PlayerControllerB))] public class PlayerControllerBPatch { public static readonly Dictionary<ulong, float> SausageDict = new Dictionary<ulong, float>(); [HarmonyPatch("Update")] [HarmonyPrefix] internal static void ModifySpeed(PlayerControllerB __instance) { if (SausageDict.TryGetValue(__instance.playerClientId, out var value)) { float num = Time.time - value; if (num >= 40f) { Debug.Log((object)"Speed effect end"); SausageDict.Remove(__instance.playerClientId); __instance.movementSpeed = 4.6f; } else { __instance.movementSpeed = 6.3f; } } } } } namespace LCPlanAssassin.Items { public class CasqueBehaviour : NoisemakerProp { private AudioSource itemAudio; private float lastTimeUsed; private AudioDistortionFilter distortionFilter; public override void Start() { ((NoisemakerProp)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent<AudioSource>(); distortionFilter = ((Component)this).gameObject.AddComponent<AudioDistortionFilter>(); distortionFilter.distortionLevel = 0.8f; } public override void ItemActivate(bool used, bool buttonDown = true) { if (buttonDown && ((NetworkBehaviour)this).IsOwner && Time.time - lastTimeUsed >= 3f && !((GrabbableObject)this).deactivated) { lastTimeUsed = Time.time; PlayRandomSoundServerRpc(); } } public override void Update() { ((GrabbableObject)this).Update(); ((GrabbableObject)this).useCooldown = ((!(Time.time - lastTimeUsed >= 3f)) ? 10 : 0); } public override void GrabItem() { if (!((GrabbableObject)this).deactivated && ((NetworkBehaviour)this).IsOwner && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy)) { ItemGrabServerRpc(((GrabbableObject)this).playerHeldBy.playerClientId); } ((GrabbableObject)this).GrabItem(); } public override void DiscardItem() { if (!((GrabbableObject)this).deactivated && ((NetworkBehaviour)this).IsOwner && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy)) { ItemDropServerRpc(((GrabbableObject)this).playerHeldBy.playerClientId); } ((GrabbableObject)this).DiscardItem(); } public void PlaySoundLocal(int soundId) { itemAudio.PlayOneShot(Assets.KaquiteClips[soundId]); } private bool IsAnyCasqueInInventory(PlayerControllerB player, bool grab) { return player.ItemSlots.Any((GrabbableObject item) => item is CasqueBehaviour && ((Object)(object)item != (Object)(object)this || grab)); } public void ItemGrabLocal(ulong playerWhoGrabbed) { if (GameNetworkManager.Instance.localPlayerController.playerClientId == playerWhoGrabbed) { return; } PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (val.playerClientId == playerWhoGrabbed) { if (IsAnyCasqueInInventory(val, grab: true)) { SetPlayerDistortion(val, 0.96f); } else { SetPlayerDistortion(val, 0f); } } } } public void ItemDropLocal(ulong playerWhoDropped) { if (GameNetworkManager.Instance.localPlayerController.playerClientId == playerWhoDropped) { return; } PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (val.playerClientId == playerWhoDropped) { if (IsAnyCasqueInInventory(val, grab: false)) { SetPlayerDistortion(val, 0.96f); } else { SetPlayerDistortion(val, 0f); } } } } private void SetPlayerDistortion(PlayerControllerB player, float distortionLevel) { AudioDistortionFilter filterForPlayer = PlayerDistortionManager.GetFilterForPlayer(player); if (Object.op_Implicit((Object)(object)filterForPlayer)) { filterForPlayer.distortionLevel = distortionLevel; } } [ServerRpc(RequireOwnership = false)] public void PlayRandomSoundServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3032412797u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3032412797u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 25f, 0.9f, 0, false, 0); int soundId = Random.Range(0, Assets.KaquiteClips.Count); if (!((NetworkBehaviour)this).IsHost) { PlaySoundLocal(soundId); } PlaySoundClientRpc(soundId); } } [ClientRpc] public void PlaySoundClientRpc(int soundId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1612812337u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, soundId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1612812337u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { PlaySoundLocal(soundId); } } } [ServerRpc(RequireOwnership = false)] public void ItemGrabServerRpc(ulong playerWhoGrabbed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3726082168u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoGrabbed); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3726082168u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { if (!((NetworkBehaviour)this).IsHost) { ItemGrabLocal(playerWhoGrabbed); } ItemGrabClientRpc(playerWhoGrabbed); } } [ClientRpc] public void ItemGrabClientRpc(ulong playerWhoGrabbed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1583903099u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoGrabbed); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1583903099u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ItemGrabLocal(playerWhoGrabbed); } } } [ServerRpc(RequireOwnership = false)] public void ItemDropServerRpc(ulong playerWhoDropped) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1507338783u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoDropped); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1507338783u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { if (!((NetworkBehaviour)this).IsHost) { ItemDropLocal(playerWhoDropped); } ItemDropClientRpc(playerWhoDropped); } } [ClientRpc] public void ItemDropClientRpc(ulong playerWhoDropped) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3140763079u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoDropped); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3140763079u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ItemDropLocal(playerWhoDropped); } } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_CasqueBehaviour() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(3032412797u, new RpcReceiveHandler(__rpc_handler_3032412797)); NetworkManager.__rpc_func_table.Add(1612812337u, new RpcReceiveHandler(__rpc_handler_1612812337)); NetworkManager.__rpc_func_table.Add(3726082168u, new RpcReceiveHandler(__rpc_handler_3726082168)); NetworkManager.__rpc_func_table.Add(1583903099u, new RpcReceiveHandler(__rpc_handler_1583903099)); NetworkManager.__rpc_func_table.Add(1507338783u, new RpcReceiveHandler(__rpc_handler_1507338783)); NetworkManager.__rpc_func_table.Add(3140763079u, new RpcReceiveHandler(__rpc_handler_3140763079)); } private static void __rpc_handler_3032412797(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; ((CasqueBehaviour)(object)target).PlayRandomSoundServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1612812337(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 soundId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref soundId); target.__rpc_exec_stage = (__RpcExecStage)2; ((CasqueBehaviour)(object)target).PlaySoundClientRpc(soundId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3726082168(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 playerWhoGrabbed = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)1; ((CasqueBehaviour)(object)target).ItemGrabServerRpc(playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1583903099(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 playerWhoGrabbed = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)2; ((CasqueBehaviour)(object)target).ItemGrabClientRpc(playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1507338783(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 playerWhoDropped = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)1; ((CasqueBehaviour)(object)target).ItemDropServerRpc(playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3140763079(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 playerWhoDropped = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)2; ((CasqueBehaviour)(object)target).ItemDropClientRpc(playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CasqueBehaviour"; } } public class HandBehaviour : NoisemakerProp { public static AudioClip RiseSfx; public static AudioClip FunnySfx; public static AudioClip DownSfx; private AudioSource itemAudio; private Animator animator; private bool raised; private bool doFunny; private float activationTime; private static readonly int IsGoingUp = Animator.StringToHash("isGoingUp"); private static readonly int DoFunny = Animator.StringToHash("doFunny"); public override void Start() { ((NoisemakerProp)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent<AudioSource>(); animator = ((Component)this).gameObject.GetComponentInChildren<Animator>(); activationTime = Time.time; } public override void ItemActivate(bool used, bool buttonDown = true) { if (!((NetworkBehaviour)this).IsOwner || !buttonDown || !(Time.time - activationTime >= 3f)) { return; } activationTime = Time.time; if (!raised) { raised = true; RaiseServerRpc(); } else if (Random.Range(0, 2) == 0) { if (!doFunny) { doFunny = true; FunnyServerRpc(); } } else { raised = false; DownServerRpc(); } } public override void Update() { ((GrabbableObject)this).Update(); ((GrabbableObject)this).useCooldown = ((!(Time.time - activationTime >= 3f)) ? 10 : 0); } public void RaiseLocal() { raised = true; itemAudio.PlayOneShot(RiseSfx, 0.5f); animator.SetBool(IsGoingUp, true); } public void DoFunnyLocal() { doFunny = true; itemAudio.PlayOneShot(FunnySfx, 0.5f); animator.SetBool(DoFunny, true); ((MonoBehaviour)this).StartCoroutine(FunnyCoroutine()); } private IEnumerator FunnyCoroutine() { yield return null; yield return (object)new WaitForSeconds(1f); doFunny = false; animator.SetBool(DoFunny, false); } public void DownLocal() { if (doFunny) { doFunny = false; animator.SetBool(DoFunny, false); } raised = false; itemAudio.PlayOneShot(DownSfx, 0.5f); animator.SetBool(IsGoingUp, false); } [ServerRpc(RequireOwnership = false)] public void RaiseServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3596734070u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3596734070u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { RaiseClientRpc(); } } } [ClientRpc] public void RaiseClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3694110718u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3694110718u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { RaiseLocal(); } } } [ServerRpc(RequireOwnership = false)] public void FunnyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2903330174u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2903330174u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { FunnyClientRpc(); } } } [ClientRpc] public void FunnyClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1174699336u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1174699336u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { DoFunnyLocal(); } } } [ServerRpc(RequireOwnership = false)] public void DownServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(472768968u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 472768968u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { DownClientRpc(); } } } [ClientRpc] public void DownClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2512040063u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2512040063u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { DownLocal(); } } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_HandBehaviour() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(3596734070u, new RpcReceiveHandler(__rpc_handler_3596734070)); NetworkManager.__rpc_func_table.Add(3694110718u, new RpcReceiveHandler(__rpc_handler_3694110718)); NetworkManager.__rpc_func_table.Add(2903330174u, new RpcReceiveHandler(__rpc_handler_2903330174)); NetworkManager.__rpc_func_table.Add(1174699336u, new RpcReceiveHandler(__rpc_handler_1174699336)); NetworkManager.__rpc_func_table.Add(472768968u, new RpcReceiveHandler(__rpc_handler_472768968)); NetworkManager.__rpc_func_table.Add(2512040063u, new RpcReceiveHandler(__rpc_handler_2512040063)); } private static void __rpc_handler_3596734070(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; ((HandBehaviour)(object)target).RaiseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3694110718(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((HandBehaviour)(object)target).RaiseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2903330174(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; ((HandBehaviour)(object)target).FunnyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1174699336(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((HandBehaviour)(object)target).FunnyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_472768968(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; ((HandBehaviour)(object)target).DownServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2512040063(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((HandBehaviour)(object)target).DownClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "HandBehaviour"; } } public class KakahuetBehaviour : PhysicsProp { private AnimationCurve fallCurve; private AnimationCurve verticalFallCurveNoBounce; private AnimationCurve verticalFallCurve; public void Awake() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_008d: 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_00b7: 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) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown fallCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.5f), new Keyframe(1f, 1f, 0f, 0f, 0.5f, 0f) }); verticalFallCurveNoBounce = new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.3f), new Keyframe(0.5f, 1f, 2f, 0f, 0.2f, 1f), new Keyframe(1f, 1f) }); verticalFallCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[4] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.3f), new Keyframe(0.5f, 1f, 2f, -2f, 0.3f, 0.3f), new Keyframe(0.75f, 1f, 2f, -2f, 0.1f, 0.1f), new Keyframe(1f, 1f, 2f, 0f, 0.05f, 0f) }); } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (((NetworkBehaviour)this).IsOwner) { ((GrabbableObject)this).playerHeldBy.DiscardHeldObject(true, (NetworkObject)null, GetThrowDestination(), true); } } public override void FallWithCurve() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_005c: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: 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_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_00f3: 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) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((GrabbableObject)this).startFallingPosition - ((GrabbableObject)this).targetFloorPosition; float magnitude = ((Vector3)(ref val)).magnitude; ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(((GrabbableObject)this).itemProperties.restingRotation.x, ((Component)this).transform.eulerAngles.y, ((GrabbableObject)this).itemProperties.restingRotation.z), 14f * Time.deltaTime / magnitude); ((Component)this).transform.localPosition = Vector3.Lerp(((GrabbableObject)this).startFallingPosition, ((GrabbableObject)this).targetFloorPosition, fallCurve.Evaluate(((GrabbableObject)this).fallTime)); if (magnitude > 5f) { ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).targetFloorPosition.y, ((Component)this).transform.localPosition.z), verticalFallCurveNoBounce.Evaluate(((GrabbableObject)this).fallTime)); } else { ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).targetFloorPosition.y, ((Component)this).transform.localPosition.z), verticalFallCurve.Evaluate(((GrabbableObject)this).fallTime)); } ((GrabbableObject)this).fallTime = ((GrabbableObject)this).fallTime + Mathf.Abs(Time.deltaTime * 12f / magnitude); } private Vector3 GetThrowDestination() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_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) //IL_00b2: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.position, ((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.forward); RaycastHit val2 = default(RaycastHit); Vector3 val3 = ((!Physics.Raycast(val, ref val2, 12f, 268437761, (QueryTriggerInteraction)1)) ? ((Ray)(ref val)).GetPoint(10f) : ((Ray)(ref val)).GetPoint(((RaycastHit)(ref val2)).distance - 0.05f)); Debug.DrawRay(val3, Vector3.down, Color.blue, 15f); ((Ray)(ref val))..ctor(val3, Vector3.down); if (Physics.Raycast(val, ref val2, 30f, 268437761, (QueryTriggerInteraction)1)) { return ((RaycastHit)(ref val2)).point + Vector3.up * 0.05f; } return ((Ray)(ref val)).GetPoint(30f); } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected internal override string __getTypeName() { return "KakahuetBehaviour"; } } public class KeyboardBehaviour : NoisemakerProp { private AudioSource itemAudio; private float lastUse; private float lastEmit; public override void Start() { ((NoisemakerProp)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent<AudioSource>(); lastUse = Time.time; lastEmit = Time.time; } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner && buttonDown && Time.time - lastUse > 5f) { lastUse = Time.time; UseServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void UseServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1881184228u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1881184228u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 40f, 0.85f, 0, false, 0); int indexClip = Random.Range(0, Assets.KeyboardClips.Count); UseClientRpc(indexClip); } } } [ClientRpc] public void UseClientRpc(int indexClip) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1482408506u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, indexClip); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1482408506u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { itemAudio.PlayOneShot(Assets.KeyboardClips[indexClip]); } } } [ServerRpc] public void EmitNoiseServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00c2: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1927208663u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1927208663u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 40f, 0.85f, 0, false, 0); } } public override void Update() { ((GrabbableObject)this).Update(); ((GrabbableObject)this).useCooldown = ((!(Time.time - lastUse > 5f)) ? 10 : 0); if (((NetworkBehaviour)this).IsOwner && itemAudio.isPlaying && Time.time - lastEmit > 1f && Time.time - lastUse > 1f && !(Time.time - lastUse > 5f)) { lastEmit = Time.time; EmitNoiseServerRpc(); } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_KeyboardBehaviour() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(1881184228u, new RpcReceiveHandler(__rpc_handler_1881184228)); NetworkManager.__rpc_func_table.Add(1482408506u, new RpcReceiveHandler(__rpc_handler_1482408506)); NetworkManager.__rpc_func_table.Add(1927208663u, new RpcReceiveHandler(__rpc_handler_1927208663)); } private static void __rpc_handler_1881184228(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; ((KeyboardBehaviour)(object)target).UseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1482408506(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 indexClip = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref indexClip); target.__rpc_exec_stage = (__RpcExecStage)2; ((KeyboardBehaviour)(object)target).UseClientRpc(indexClip); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1927208663(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0029: 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_008c: 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_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((KeyboardBehaviour)(object)target).EmitNoiseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "KeyboardBehaviour"; } } public class MowerBehaviour : PhysicsProp { private AudioSource itemAudio; private AudioSource stopAudio; private BoxCollider bladeCollider; private float mowerCooldown; private float lastSound; private bool state; private float previousYAngle; private bool wasHeld; private float lastHitCheck; private Coroutine soundCoroutine; private List<ulong> damagedPlayers = new List<ulong>(); public override void Start() { ((GrabbableObject)this).Start(); ((GrabbableObject)this).floorYRot = -1; itemAudio = ((Component)this).gameObject.GetComponent<AudioSource>(); stopAudio = ((Component)this).gameObject.AddComponent<AudioSource>(); stopAudio.spatialBlend = 1f; stopAudio.dopplerLevel = 0.3f; stopAudio.spread = 45f; stopAudio.rolloffMode = (AudioRolloffMode)1; stopAudio.minDistance = 4f; stopAudio.maxDistance = 20f; mowerCooldown = Time.time; lastSound = Time.time; lastHitCheck = Time.time; bladeCollider = ((Component)((Component)this).gameObject.transform.GetChild(2)).gameObject.GetComponent<BoxCollider>(); } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner && Time.time - mowerCooldown > 3f) { mowerCooldown = Time.time; UseItemServerRpc(); } } public override void Update() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (!((NetworkBehaviour)this).IsOwner || !state) { return; } if (((GrabbableObject)this).isHeld && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy) && ((NetworkBehaviour)((GrabbableObject)this).playerHeldBy).IsOwner) { if (wasHeld) { float num = Mathf.Abs(((Component)((GrabbableObject)this).playerHeldBy).transform.eulerAngles.y - previousYAngle); ((GrabbableObject)this).playerHeldBy.fallValue = Mathf.Clamp(((GrabbableObject)this).playerHeldBy.fallValueUncapped + Mathf.Clamp(num * 5f, 0f, 10f), -150f, 150f); if (((GrabbableObject)this).playerHeldBy.fallValue > 0f) { ((GrabbableObject)this).playerHeldBy.fallValueUncapped = 0f; } } else { wasHeld = true; } previousYAngle = ((Component)((GrabbableObject)this).playerHeldBy).transform.eulerAngles.y; } else { wasHeld = false; } if (Time.time - lastSound > 1.5f) { lastSound = Time.time; MakeSoundServerRpc(); } if (!(Time.time - lastHitCheck < 0.5f)) { lastHitCheck = Time.time; CheckCollisionServerRpc(); } } private void StartMower() { if (soundCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(soundCoroutine); } soundCoroutine = ((MonoBehaviour)this).StartCoroutine(MowerSoundCoroutine()); } private void StopMower() { if (soundCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(soundCoroutine); } soundCoroutine = ((MonoBehaviour)this).StartCoroutine(StopMowerCoroutine()); } private IEnumerator MowerSoundCoroutine() { yield return null; itemAudio.volume = 1f; stopAudio.volume = 0f; itemAudio.Stop(); stopAudio.Stop(); itemAudio.PlayOneShot(Assets.MowStartClip); while (state) { if (!itemAudio.isPlaying) { itemAudio.PlayOneShot(Assets.MowLoopClip); } yield return (object)new WaitUntil((Func<bool>)(() => !itemAudio.isPlaying)); } } private IEnumerator StopMowerCoroutine() { float startTime = Time.time; stopAudio.volume = 0.5f; stopAudio.PlayOneShot(Assets.MowEndClip); while (Time.time - startTime < 0.25f) { float delta = (Time.time - startTime) / 0.25f; itemAudio.volume = Mathf.Lerp(1f, 0f, delta); stopAudio.volume = Mathf.Lerp(0.5f, 1f, delta); yield return null; } itemAudio.Stop(); itemAudio.volume = 1f; stopAudio.volume = 1f; } [ServerRpc(RequireOwnership = false)] public void UseItemServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(789978299u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 789978299u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { UseItemClientRpc(); } } } [ClientRpc] public void UseItemClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(399636301u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 399636301u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { if (!state) { StartMower(); state = true; } else { StopMower(); state = false; } } } [ServerRpc] public void MakeSoundServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00c2: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2214026521u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2214026521u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 20f, 0.7f, 0, false, 0); } } [ServerRpc] public void CheckCollisionServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00b3: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025d: 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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(799441402u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 799441402u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } RaycastHit[] array = Physics.SphereCastAll(((Component)bladeCollider).transform.position + bladeCollider.center, 0.6f, ((Component)bladeCollider).transform.up, 1.5f, 1084754248); damagedPlayers.Clear(); RaycastHit[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit val3 = array2[i]; if (Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).transform)) { PlayerControllerB component = ((Component)((RaycastHit)(ref val3)).transform).GetComponent<PlayerControllerB>(); if (Object.op_Implicit((Object)(object)component) && component.isPlayerControlled && !component.isPlayerDead && !damagedPlayers.Contains(component.playerClientId)) { damagedPlayers.Add(component.playerClientId); DamagePlayerClientRpc((int)component.playerClientId); continue; } } if (Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).collider)) { EnemyAICollisionDetect component2 = ((Component)((RaycastHit)(ref val3)).collider).GetComponent<EnemyAICollisionDetect>(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.mainScript)) { EnemyAI mainScript = component2.mainScript; PlayerControllerB val4 = ((!Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy) && !((GrabbableObject)this).isHeld) ? null : ((GrabbableObject)this).playerHeldBy); mainScript.HitEnemyOnLocalClient(1, default(Vector3), val4, true, -1); } } } } [ClientRpc] public void DamagePlayerClientRpc(int playerToDamage) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) {