Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of MoreItems v9.0.1
plugins/MoreItems/MoreItems.dll
Decompiled 6 months 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.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using GameNetcodeStuff; using HarmonyLib; using LethalLib.Modules; using Microsoft.CodeAnalysis; using MoreItems.Behaviours; using MoreItems.NetcodePatcher; using Unity.Netcode; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("MoreItems")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+314a83616cd336df3dc42bf188e52dde24b93fdd")] [assembly: AssemblyProduct("MoreItems")] [assembly: AssemblyTitle("MoreItems")] [assembly: AssemblyVersion("1.0.0.0")] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace MoreItems { [BepInPlugin("LeoLR.MoreItems", "MoreItems", "9.0.1")] public class Plugin : BaseUnityPlugin { private const string guid = "LeoLR.MoreItems"; private const string name = "MoreItems"; private const string version = "9.0.1"; private Harmony harmony = new Harmony("LeoLR.MoreItems"); public static Plugin instance; public AssetBundle bundle; private void Awake() { 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); } } } instance = this; string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "moreitems"); bundle = AssetBundle.LoadFromFile(text); Item val = bundle.LoadAsset<Item>("Assets/Dynamite/DynamiteItem.asset"); ((GrabbableObject)val.spawnPrefab.AddComponent<DynamiteBehaviour>()).itemProperties = val; Utilities.FixMixerGroups(val.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab); TerminalNode val2 = ScriptableObject.CreateInstance<TerminalNode>(); val2.clearPreviousText = true; val2.displayText = "Explodes after a few seconds"; Items.RegisterShopItem(val, (TerminalNode)null, (TerminalNode)null, val2, 50); Item val3 = bundle.LoadAsset<Item>("Assets/Karma/KarmaItem.asset"); ((GrabbableObject)val3.spawnPrefab.AddComponent<KarmaBehaviour>()).itemProperties = val3; Utilities.FixMixerGroups(val3.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val3.spawnPrefab); TerminalNode val4 = ScriptableObject.CreateInstance<TerminalNode>(); val4.clearPreviousText = true; val4.displayText = "A massive railgun, requires battery to fire and has a charge time"; Items.RegisterShopItem(val3, (TerminalNode)null, (TerminalNode)null, val4, 550); Item val5 = bundle.LoadAsset<Item>("Assets/Sypo/SypoItem.asset"); ((GrabbableObject)val5.spawnPrefab.AddComponent<SypoBehaviour>()).itemProperties = val5; Utilities.FixMixerGroups(val5.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val5.spawnPrefab); Items.RegisterScrap(val5, 15, (LevelTypes)(-1)); Item val6 = bundle.LoadAsset<Item>("Assets/Minikit/MinikitItem.asset"); Utilities.FixMixerGroups(val6.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val6.spawnPrefab); Items.RegisterScrap(val6, 15, (LevelTypes)(-1)); Item val7 = bundle.LoadAsset<Item>("Assets/GravityCoil/GravityCoilItem.asset"); ((GrabbableObject)val7.spawnPrefab.AddComponent<GravityCoilBehaviour>()).itemProperties = val7; Utilities.FixMixerGroups(val7.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val7.spawnPrefab); Items.RegisterScrap(val7, 15, (LevelTypes)(-1)); Item val8 = bundle.LoadAsset<Item>("Assets/FramedPic/FramedPicItem.asset"); ((GrabbableObject)val8.spawnPrefab.AddComponent<FramedPicBehaviour>()).itemProperties = val8; Utilities.FixMixerGroups(val8.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val8.spawnPrefab); Items.RegisterScrap(val8, 15, (LevelTypes)(-1)); Item val9 = bundle.LoadAsset<Item>("Assets/Phone/PhoneItem.asset"); ((GrabbableObject)val9.spawnPrefab.AddComponent<PhoneBehaviour>()).itemProperties = val9; Utilities.FixMixerGroups(val9.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val9.spawnPrefab); Items.RegisterScrap(val9, 15, (LevelTypes)(-1)); Item val10 = bundle.LoadAsset<Item>("Assets/SlapHand/SlapHandItem.asset"); ((GrabbableObject)val10.spawnPrefab.AddComponent<SlapHandBehaviour>()).itemProperties = val10; Utilities.FixMixerGroups(val10.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val10.spawnPrefab); Items.RegisterScrap(val10, 15, (LevelTypes)(-1)); Item val11 = bundle.LoadAsset<Item>("Assets/Adrenaline/AdrenalineItem.asset"); ((GrabbableObject)val11.spawnPrefab.AddComponent<AdrenalineBehaviour>()).itemProperties = val11; Utilities.FixMixerGroups(val11.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val11.spawnPrefab); TerminalNode val12 = ScriptableObject.CreateInstance<TerminalNode>(); val12.clearPreviousText = true; val12.displayText = "Gives a temporary speed and stamina boost (stackable)"; Items.RegisterShopItem(val11, (TerminalNode)null, (TerminalNode)null, val12, 35); Item val13 = bundle.LoadAsset<Item>("Assets/BananaPeel/BananaItem.asset"); ((GrabbableObject)val13.spawnPrefab.AddComponent<BananaBehaviour>()).itemProperties = val13; Utilities.FixMixerGroups(val13.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val13.spawnPrefab); Items.RegisterScrap(val13, 15, (LevelTypes)(-1)); Item val14 = bundle.LoadAsset<Item>("Assets/Bottle/BottleItem.asset"); ((GrabbableObject)val14.spawnPrefab.AddComponent<BottleBehaviour>()).itemProperties = val14; Utilities.FixMixerGroups(val14.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val14.spawnPrefab); Items.RegisterScrap(val14, 20, (LevelTypes)(-1)); harmony.PatchAll(); } } internal class Utils { public static AudioSource getAudioSource(GameObject go, string rootNodeName, string gameObjectName) { return ((Component)go.transform.Find(rootNodeName).Find(gameObjectName)).gameObject.GetComponent<AudioSource>(); } public static ParticleSystem getParticleSystem(GameObject go, string rootNodeName, string gameObjectName) { return ((Component)go.transform.Find(rootNodeName).Find(gameObjectName)).gameObject.GetComponent<ParticleSystem>(); } public static Dictionary<string, ParticleSystem> getAllParticleSystems(GameObject go, string rootNodeName, string[] gameObjectsName) { Dictionary<string, ParticleSystem> dictionary = new Dictionary<string, ParticleSystem>(); foreach (string text in gameObjectsName) { dictionary.Add(text, getParticleSystem(go, rootNodeName, text)); } return dictionary; } public static Dictionary<string, AudioSource> getAllAudioSources(GameObject go, string rootNodeName, string[] gameObjectsName) { Dictionary<string, AudioSource> dictionary = new Dictionary<string, AudioSource>(); foreach (string text in gameObjectsName) { dictionary.Add(text, getAudioSource(go, rootNodeName, text)); } return dictionary; } public static void destroyObj(GameObject go, string obj) { try { Object.Destroy((Object)(object)((Component)go.transform.Find(obj)).gameObject); } catch { Debug.LogError((object)("Cannot destroy " + obj)); } } public static void Explode(GameObject go, float radius, float baseDamage, float distanceInfluencedDamage, bool increaseHeightForLinecast = false) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: 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_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0185: 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_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) int mask = LayerMask.GetMask(new string[2] { "Player", "Enemies" }); List<int> list = new List<int>(); Collider[] array = Physics.OverlapSphere(go.transform.position, radius, mask); Collider[] array2 = array; foreach (Collider val in array2) { PlayerControllerB component = ((Component)val).GetComponent<PlayerControllerB>(); GameObject playerColliderGameObject = ((Component)val).gameObject; Transform enemyColliderRoot = ((Component)val).transform.root; if ((Object)(object)component != (Object)null && !list.Exists((int i) => i == ((Object)playerColliderGameObject).GetInstanceID())) { list.Add(((Object)playerColliderGameObject).GetInstanceID()); if (!Physics.Linecast(((Component)component).transform.position + Vector3.up * 0.5f, go.transform.position + Vector3.up * (increaseHeightForLinecast ? 0.5f : 0f), StartOfRound.Instance.collidersAndRoomMaskAndDefault) && component.playerClientId == GameNetworkManager.Instance.localPlayerController.playerClientId) { float num = Vector3.Distance(((Component)component).transform.position + Vector3.up * 0.5f, go.transform.position); float num2 = distanceInfluencedDamage / num + baseDamage; component.DamagePlayer((int)num2, true, true, (CauseOfDeath)3, 0, false, default(Vector3)); } } EnemyAI component2 = ((Component)enemyColliderRoot).GetComponent<EnemyAI>(); if (!((Object)(object)component2 != (Object)null) || list.Exists((int i) => i == ((Object)((Component)enemyColliderRoot).gameObject).GetInstanceID())) { continue; } list.Add(((Object)((Component)enemyColliderRoot).gameObject).GetInstanceID()); if (!Physics.Linecast(((Component)component2).transform.position + Vector3.up * 0.5f, go.transform.position + Vector3.up * (increaseHeightForLinecast ? 0.5f : 0f), StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { if ((Object)(object)component2.creatureVoice != (Object)null && (Object)(object)component2.dieSFX != (Object)null) { component2.creatureVoice.PlayOneShot(component2.dieSFX); } component2.KillEnemy(true); } } list.Clear(); } public static bool frameCount(int interval) { return Time.frameCount % interval != 0; } public static bool isLocalPlayerHosting() { return ((NetworkBehaviour)GameNetworkManager.Instance.localPlayerController).IsHost || ((NetworkBehaviour)GameNetworkManager.Instance.localPlayerController).IsServer; } } } namespace MoreItems.Behaviours { internal class AdrenalineBehaviour : GrabbableObject { private float runSpeedMultiplier = 1.5f; private bool triggered = false; private float timer = 15f; private PlayerControllerB playerActiveOn = null; private string[] sources = new string[1] { "useSFX" }; private Dictionary<string, AudioSource> sourcesDict = new Dictionary<string, AudioSource>(); private void Awake() { base.grabbable = true; base.grabbableToEnemies = true; sourcesDict = Utils.getAllAudioSources(((Component)this).gameObject, "AdrSFX", sources); } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if ((Object)(object)base.playerHeldBy != (Object)null) { activateSyringeServerRpc(); } } private IEnumerator StartTimer() { yield return (object)new WaitForSeconds(timer); triggered = false; PlayerControllerB obj = playerActiveOn; obj.movementSpeed /= runSpeedMultiplier; yield return (object)new WaitForSeconds(0.5f); Object.Destroy((Object)(object)((Component)this).gameObject); } public override void Update() { ((GrabbableObject)this).Update(); if (triggered && (Object)(object)playerActiveOn != (Object)null) { playerActiveOn.sprintMeter = 1f; } } public override void OnDestroy() { ((NetworkBehaviour)this).OnDestroy(); if ((Object)(object)playerActiveOn != (Object)null) { playerActiveOn.movementSpeed = 4.6f; } } public override void OnNetworkDespawn() { ((NetworkBehaviour)this).OnNetworkDespawn(); if ((Object)(object)playerActiveOn != (Object)null) { playerActiveOn.movementSpeed = 4.6f; } } [ServerRpc(RequireOwnership = false)] private void activateSyringeServerRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2123057364u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2123057364u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; activateSyringeClientRpc(); } } } [ClientRpc] private void activateSyringeClientRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(404489912u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 404489912u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; sourcesDict["useSFX"].Play(); playerActiveOn = base.playerHeldBy; PlayerControllerB obj = playerActiveOn; obj.movementSpeed *= runSpeedMultiplier; playerActiveOn.health = 100; ((GrabbableObject)this).DestroyObjectInHand(playerActiveOn); base.grabbable = false; base.grabbableToEnemies = false; triggered = true; Utils.destroyObj(((Component)this).gameObject, "SyringeBody"); ((MonoBehaviour)this).StartCoroutine(StartTimer()); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2123057364u, new RpcReceiveHandler(__rpc_handler_2123057364), "activateSyringeServerRpc"); ((NetworkBehaviour)this).__registerRpc(404489912u, new RpcReceiveHandler(__rpc_handler_404489912), "activateSyringeClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_2123057364(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; ((AdrenalineBehaviour)(object)target).activateSyringeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_404489912(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; ((AdrenalineBehaviour)(object)target).activateSyringeClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "AdrenalineBehaviour"; } } internal class BananaBehaviour : GrabbableObject { private string[] sources = new string[1] { "slipSFX" }; private Dictionary<string, AudioSource> sourcesDict = new Dictionary<string, AudioSource>(); private List<PlayerControllerB> playerSlipping = new List<PlayerControllerB>(); private Vector2 forwardVector = new Vector2(0f, 1f); private List<EnemyAI> enemySlipping = new List<EnemyAI>(); private float slipTime = 3f; private void Awake() { base.grabbable = true; base.grabbableToEnemies = true; sourcesDict = Utils.getAllAudioSources(((Component)this).gameObject, "BananaSFX", sources); } public override void Update() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_00d8: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (Utils.frameCount(20) || Object.op_Implicit((Object)(object)base.playerHeldBy)) { return; } int mask = LayerMask.GetMask(new string[2] { "Player", "Enemies" }); Collider[] array = Physics.OverlapSphere(((Component)this).gameObject.transform.position + Vector3.up * 0.1f, 0.5f, mask); Collider[] array2 = array; foreach (Collider val in array2) { PlayerControllerB player = ((Component)val).GetComponent<PlayerControllerB>(); if ((Object)(object)player != (Object)null && !playerSlipping.Exists((PlayerControllerB i) => i.playerClientId == player.playerClientId) && player.moveInputVector != Vector2.zero) { playerSlipping.Add(player); ((MonoBehaviour)this).StartCoroutine(TriggerSlip(player)); } } } private IEnumerator TriggerSlip(PlayerControllerB player) { float timer = 0f; playSlipSoundServerRpc(); player.disableMoveInput = true; Vector3 camera = ((Component)player.gameplayCamera).transform.forward; Vector3 val = new Vector3(camera.x, 0f, camera.z); Vector3 forward = ((Vector3)(ref val)).normalized; Vector2 moveVector = player.moveInputVector; float angle = Vector3.Angle(Vector2.op_Implicit(forwardVector), Vector2.op_Implicit(moveVector)); if (moveVector.x < 0f || moveVector.y < 0f) { angle *= -1f; } Vector3 direction = Quaternion.Euler(0f, angle, 0f) * forward; float forceMult = player.movementSpeed * 2f; while (timer < slipTime) { player.externalForces = direction * forceMult; timer += Time.fixedDeltaTime; yield return (object)new WaitForEndOfFrame(); } playerSlipping.Remove(player); player.disableMoveInput = false; } [ServerRpc(RequireOwnership = false)] private void playSlipSoundServerRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3954791529u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3954791529u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; playSlipSoundClientRpc(); } } } [ClientRpc] private void playSlipSoundClientRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(948241539u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 948241539u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; sourcesDict["slipSFX"].Play(); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3954791529u, new RpcReceiveHandler(__rpc_handler_3954791529), "playSlipSoundServerRpc"); ((NetworkBehaviour)this).__registerRpc(948241539u, new RpcReceiveHandler(__rpc_handler_948241539), "playSlipSoundClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3954791529(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; ((BananaBehaviour)(object)target).playSlipSoundServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_948241539(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; ((BananaBehaviour)(object)target).playSlipSoundClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BananaBehaviour"; } } internal class BottleBehaviour : GrabbableObject { private string[] sources = new string[1] { "drinkSFX" }; private Dictionary<string, AudioSource> sourcesDict = new Dictionary<string, AudioSource>(); private Color[] effects = (Color[])(object)new Color[3] { new Color(0.85f, 0.1f, 0.6f, 0.85f), new Color(0.1f, 0.8f, 0.85f, 0.85f), new Color(0.85f, 0.1f, 0.1f, 0.85f) }; private bool empty = false; private int currentEffect = 0; private bool drinking = false; private bool destroyedOnClient = false; private float regularMovementSpeed = 4.6f; private float regularJumpForce = 13f; private Vector3 regularScale = Vector3.one; private void Awake() { base.grabbable = true; base.grabbableToEnemies = true; sourcesDict = Utils.getAllAudioSources(((Component)this).gameObject, "BottleSFX", sources); if (Utils.isLocalPlayerHosting()) { setColorServerRpc(); } } public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (Utils.isLocalPlayerHosting()) { setEmptyServerRpc(empty); setCurrentEffectServerRpc(currentEffect); } } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!empty && !drinking) { drinking = true; drinkServerRpc(); } } private void FixedUpdate() { if (!Utils.frameCount(20) && !destroyedOnClient && empty) { Utils.destroyObj(((Component)this).gameObject, "liquid"); destroyedOnClient = true; } } [ServerRpc(RequireOwnership = false)] private void setColorServerRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(47990644u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 47990644u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; setColorClientRpc(); } } } [ClientRpc] private void setColorClientRpc() { //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_00c1: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4289994406u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4289994406u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Material material = ((Renderer)((Component)((Component)this).gameObject.transform.Find("liquid")).gameObject.GetComponent<MeshRenderer>()).material; currentEffect = Random.Range(0, effects.Length); material.color = effects[currentEffect]; } } } [ServerRpc(RequireOwnership = false)] private void drinkServerRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3850970635u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3850970635u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; drinkClientRpc(); } } } [ClientRpc] private void drinkClientRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1269875293u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1269875293u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(Drink()); } } } [ServerRpc(RequireOwnership = false)] private void setEmptyServerRpc(bool value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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(592994066u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 592994066u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; setEmptyClientRpc(value); } } } [ClientRpc] private void setEmptyClientRpc(bool value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3751284597u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3751284597u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; empty = value; } } } [ServerRpc(RequireOwnership = false)] private void setCurrentEffectServerRpc(int value) { //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_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2721315061u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2721315061u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; setCurrentEffectClientRpc(value); } } } [ClientRpc] private void setCurrentEffectClientRpc(int value) { //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_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2811399482u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2811399482u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; currentEffect = value; } } } private IEnumerator Drink() { base.playerHeldBy.activatingItem = true; base.playerHeldBy.playerBodyAnimator.SetBool("useTZPItem", true); sourcesDict["drinkSFX"].Play(); ((MonoBehaviour)this).StartCoroutine(DrinkAnimation(new Vector3(0.1f, 0.15f, 0.25f), new Vector3(120f, 100f, -95f))); yield return (object)new WaitForSeconds(4f); applyEffect(); base.playerHeldBy.activatingItem = false; base.playerHeldBy.playerBodyAnimator.SetBool("useTZPItem", false); Utils.destroyObj(((Component)this).gameObject, "liquid"); destroyedOnClient = true; ((MonoBehaviour)this).StartCoroutine(DrinkAnimation(new Vector3(-0.15f, 0.08f, 0f), new Vector3(120f, 0f, -95f), 3f)); setEmptyServerRpc(value: true); drinking = false; } private void applyEffect() { switch (currentEffect) { case 0: base.playerHeldBy.drunkness = 1f; base.playerHeldBy.drunknessSpeed = 0.35f; break; case 1: ((MonoBehaviour)this).StartCoroutine(SetSmall(base.playerHeldBy)); break; case 2: ((MonoBehaviour)this).StartCoroutine(SetBig(base.playerHeldBy)); break; } } private IEnumerator SetSmall(PlayerControllerB player) { player.movementSpeed = 5.5f; player.jumpForce = 9f; ((MonoBehaviour)this).StartCoroutine(SetScale(player, new Vector3(0.2f, 0.2f, 0.2f))); yield return (object)new WaitForSeconds(60f); player.movementSpeed = regularMovementSpeed; player.jumpForce = regularJumpForce; ((MonoBehaviour)this).StartCoroutine(SetScale(player, regularScale)); } private IEnumerator SetBig(PlayerControllerB player) { player.movementSpeed = 3.5f; player.jumpForce = 12f; ((MonoBehaviour)this).StartCoroutine(SetScale(player, new Vector3(1.5f, 1.5f, 1.5f))); ((MonoBehaviour)this).StartCoroutine(RegenHealth(player)); yield return (object)new WaitForSeconds(50f); player.movementSpeed = regularMovementSpeed; player.jumpForce = regularJumpForce; ((MonoBehaviour)this).StartCoroutine(SetScale(player, regularScale)); } private IEnumerator RegenHealth(PlayerControllerB player) { for (int i = 0; i < 10; i++) { if (player.health < 100) { player.health += 5; } yield return (object)new WaitForSeconds(1f); } yield return (object)new WaitForEndOfFrame(); } private IEnumerator SetScale(PlayerControllerB player, Vector3 desiredScale) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) Vector3 currentScale = ((Component)player).transform.localScale; float increment = 0.004f; float waitTime = 0.02f; if (desiredScale.x < currentScale.x) { while (currentScale.x > desiredScale.x) { currentScale.x -= increment; currentScale.y -= increment; currentScale.z -= increment; ((Component)player).transform.localScale = currentScale; yield return (object)new WaitForSeconds(waitTime); } } else if (desiredScale.x > currentScale.x) { while (currentScale.x < desiredScale.x) { currentScale.x += increment; currentScale.y += increment; currentScale.z += increment; ((Component)player).transform.localScale = currentScale; yield return (object)new WaitForSeconds(waitTime); } } } private IEnumerator DrinkAnimation(Vector3 targetPos, Vector3 targetRot, float multiplier = 1f) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) while (base.itemProperties.positionOffset != targetPos || base.itemProperties.rotationOffset != targetRot) { base.itemProperties.positionOffset = Vector3.MoveTowards(base.itemProperties.positionOffset, targetPos, Time.deltaTime * multiplier); base.itemProperties.rotationOffset = Vector3.MoveTowards(base.itemProperties.rotationOffset, targetRot, Time.deltaTime * 1000f); yield return (object)new WaitForEndOfFrame(); } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(47990644u, new RpcReceiveHandler(__rpc_handler_47990644), "setColorServerRpc"); ((NetworkBehaviour)this).__registerRpc(4289994406u, new RpcReceiveHandler(__rpc_handler_4289994406), "setColorClientRpc"); ((NetworkBehaviour)this).__registerRpc(3850970635u, new RpcReceiveHandler(__rpc_handler_3850970635), "drinkServerRpc"); ((NetworkBehaviour)this).__registerRpc(1269875293u, new RpcReceiveHandler(__rpc_handler_1269875293), "drinkClientRpc"); ((NetworkBehaviour)this).__registerRpc(592994066u, new RpcReceiveHandler(__rpc_handler_592994066), "setEmptyServerRpc"); ((NetworkBehaviour)this).__registerRpc(3751284597u, new RpcReceiveHandler(__rpc_handler_3751284597), "setEmptyClientRpc"); ((NetworkBehaviour)this).__registerRpc(2721315061u, new RpcReceiveHandler(__rpc_handler_2721315061), "setCurrentEffectServerRpc"); ((NetworkBehaviour)this).__registerRpc(2811399482u, new RpcReceiveHandler(__rpc_handler_2811399482), "setCurrentEffectClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_47990644(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; ((BottleBehaviour)(object)target).setColorServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4289994406(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; ((BottleBehaviour)(object)target).setColorClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3850970635(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; ((BottleBehaviour)(object)target).drinkServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1269875293(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; ((BottleBehaviour)(object)target).drinkClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_592994066(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool emptyServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref emptyServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BottleBehaviour)(object)target).setEmptyServerRpc(emptyServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3751284597(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool emptyClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref emptyClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BottleBehaviour)(object)target).setEmptyClientRpc(emptyClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2721315061(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 currentEffectServerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref currentEffectServerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((BottleBehaviour)(object)target).setCurrentEffectServerRpc(currentEffectServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2811399482(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 currentEffectClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref currentEffectClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((BottleBehaviour)(object)target).setCurrentEffectClientRpc(currentEffectClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BottleBehaviour"; } } internal class DynamiteBehaviour : GrabbableObject { public Ray grenadeThrowRay; public RaycastHit grenadeHit; private float explodeTimer = 0f; private float timeToExplode = 5f; private int interval = 10; private AudioSource MeshBurnSFX; private AudioSource ExplosionSFX; private AudioSource EarRingSFX; private ParticleSystem MeshSmoke; private ParticleSystem LingeringFire; private ParticleSystem MainBlast; private ParticleSystem Smoke; private bool active = false; private void Awake() { base.grabbable = true; base.grabbableToEnemies = true; MeshBurnSFX = Utils.getAudioSource(((Component)this).gameObject, "DynamiteSFX", "MeshBurnSFX"); ExplosionSFX = Utils.getAudioSource(((Component)this).gameObject, "DynamiteSFX", "ExplosionSFX"); EarRingSFX = Utils.getAudioSource(((Component)this).gameObject, "DynamiteSFX", "EarRingSFX"); MeshSmoke = Utils.getParticleSystem(((Component)this).gameObject, "DynamiteParticles", "MeshSmoke"); LingeringFire = Utils.getParticleSystem(((Component)this).gameObject, "DynamiteParticles", "LingeringFire"); MainBlast = Utils.getParticleSystem(((Component)this).gameObject, "DynamiteParticles", "MainBlast"); Smoke = Utils.getParticleSystem(((Component)this).gameObject, "DynamiteParticles", "Smoke"); } [ServerRpc(RequireOwnership = false)] private void startDynamiteBurnServerRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(347468879u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 347468879u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; startDynamiteBurnClientRpc(); } } } [ClientRpc] private void startDynamiteBurnClientRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1004844402u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1004844402u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; MeshBurnSFX.Play(); WalkieTalkie.TransmitOneShotAudio(MeshBurnSFX, MeshBurnSFX.clip, 1f); MeshSmoke.Play(); Utils.destroyObj(((Component)this).gameObject, "Mesh"); } } } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!((Object)(object)base.playerHeldBy != (Object)null)) { return; } if (!active) { active = true; if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer) { startDynamiteBurnClientRpc(); } else { startDynamiteBurnServerRpc(); } } else { base.playerHeldBy.DiscardHeldObject(true, (NetworkObject)null, GetGrenadeThrowDestination(), true); } } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); editMeshAnimServerRpc(active: false); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); if (active) { editMeshAnimServerRpc(active: true); } } public override void Update() { ((GrabbableObject)this).Update(); if (Utils.frameCount(interval) || !active) { return; } if (explodeTimer > timeToExplode) { active = false; if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer) { ExplodeDynamiteClientRpc(); } else { ExplodeDynamiteServerRpc(); } } explodeTimer += Time.deltaTime * (float)interval; } [ServerRpc(RequireOwnership = false)] public void ExplodeDynamiteServerRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4084733013u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4084733013u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ExplodeDynamiteClientRpc(); } } } [ClientRpc] public void ExplodeDynamiteClientRpc() { //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_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3225364544u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3225364544u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.grabbable = false; base.grabbableToEnemies = false; MeshBurnSFX.Stop(); MeshSmoke.Stop(); ExplosionSFX.Play(); WalkieTalkie.TransmitOneShotAudio(ExplosionSFX, ExplosionSFX.clip, 1f); MainBlast.Play(); LingeringFire.Play(); Smoke.Play(); explodeTimer = 0f; Utils.Explode(((Component)this).gameObject, 8f, 50f, 300f, (Object)(object)base.playerHeldBy == (Object)null); if ((Object)(object)base.playerHeldBy != (Object)null) { ((GrabbableObject)this).DestroyObjectInHand(base.playerHeldBy); } Utils.destroyObj(((Component)this).gameObject, "Base"); Object.Destroy((Object)(object)((Component)this).gameObject, ExplosionSFX.clip.length); } } [ServerRpc(RequireOwnership = false)] private void editMeshAnimServerRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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(2021433102u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2021433102u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; editMeshAnimClientRpc(active); } } } [ClientRpc] private void editMeshAnimClientRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3393819655u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3393819655u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (active) { MeshSmoke.Play(); } else { MeshSmoke.Stop(); } } } public Vector3 GetGrenadeThrowDestination() { //IL_0011: 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) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) Debug.DrawRay(((Component)base.playerHeldBy.gameplayCamera).transform.position, ((Component)base.playerHeldBy.gameplayCamera).transform.forward, Color.yellow, 15f); grenadeThrowRay = new Ray(((Component)base.playerHeldBy.gameplayCamera).transform.position, ((Component)base.playerHeldBy.gameplayCamera).transform.forward); Vector3 val = ((!Physics.Raycast(grenadeThrowRay, ref grenadeHit, 12f, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) ? ((Ray)(ref grenadeThrowRay)).GetPoint(10f) : ((Ray)(ref grenadeThrowRay)).GetPoint(((RaycastHit)(ref grenadeHit)).distance - 0.05f)); Debug.DrawRay(val, Vector3.down, Color.blue, 15f); grenadeThrowRay = new Ray(val, Vector3.down); return (!Physics.Raycast(grenadeThrowRay, ref grenadeHit, 30f, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) ? ((Ray)(ref grenadeThrowRay)).GetPoint(30f) : (((RaycastHit)(ref grenadeHit)).point + Vector3.up * 0.05f); } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(347468879u, new RpcReceiveHandler(__rpc_handler_347468879), "startDynamiteBurnServerRpc"); ((NetworkBehaviour)this).__registerRpc(1004844402u, new RpcReceiveHandler(__rpc_handler_1004844402), "startDynamiteBurnClientRpc"); ((NetworkBehaviour)this).__registerRpc(4084733013u, new RpcReceiveHandler(__rpc_handler_4084733013), "ExplodeDynamiteServerRpc"); ((NetworkBehaviour)this).__registerRpc(3225364544u, new RpcReceiveHandler(__rpc_handler_3225364544), "ExplodeDynamiteClientRpc"); ((NetworkBehaviour)this).__registerRpc(2021433102u, new RpcReceiveHandler(__rpc_handler_2021433102), "editMeshAnimServerRpc"); ((NetworkBehaviour)this).__registerRpc(3393819655u, new RpcReceiveHandler(__rpc_handler_3393819655), "editMeshAnimClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_347468879(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; ((DynamiteBehaviour)(object)target).startDynamiteBurnServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1004844402(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; ((DynamiteBehaviour)(object)target).startDynamiteBurnClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4084733013(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; ((DynamiteBehaviour)(object)target).ExplodeDynamiteServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3225364544(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; ((DynamiteBehaviour)(object)target).ExplodeDynamiteClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2021433102(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DynamiteBehaviour)(object)target).editMeshAnimServerRpc(flag); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3393819655(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DynamiteBehaviour)(object)target).editMeshAnimClientRpc(flag); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DynamiteBehaviour"; } } internal class FramedPicBehaviour : GrabbableObject { private string[] possiblePhotos = new string[6] { "Pigeon", "Toto", "Prospector", "Boowomp", "Gambling", "ManMug" }; private int index = -1; private MeshRenderer picture; private Transform listOfPossiblePhotos; private bool imgSet = false; private void Awake() { base.grabbable = true; base.grabbableToEnemies = true; picture = ((Component)((Component)this).transform.Find("Photo")).GetComponent<MeshRenderer>(); listOfPossiblePhotos = ((Component)this).transform.Find("PossiblePhotoMaterials"); } public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (Utils.isLocalPlayerHosting()) { SetIndexServerRpc(index); } } public void FixedUpdate() { if (Utils.frameCount(100)) { return; } if (index == -1 && Utils.isLocalPlayerHosting()) { SetIndexServerRpc(Random.Range(0, possiblePhotos.Length - 1)); } else if (!imgSet) { try { ((Renderer)picture).material = ((Renderer)((Component)listOfPossiblePhotos.Find(possiblePhotos[index])).GetComponent<MeshRenderer>()).material; imgSet = true; } catch { Debug.LogError((object)"Cannot set picture material"); } } } [ServerRpc(RequireOwnership = true)] private void SetIndexServerRpc(int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_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(3213284832u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3213284832u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetIndexClientRpc(value); } } [ClientRpc] private void SetIndexClientRpc(int value) { //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_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1961538220u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1961538220u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; index = value; } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3213284832u, new RpcReceiveHandler(__rpc_handler_3213284832), "SetIndexServerRpc"); ((NetworkBehaviour)this).__registerRpc(1961538220u, new RpcReceiveHandler(__rpc_handler_1961538220), "SetIndexClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3213284832(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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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 { int indexServerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref indexServerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((FramedPicBehaviour)(object)target).SetIndexServerRpc(indexServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1961538220(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 indexClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref indexClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((FramedPicBehaviour)(object)target).SetIndexClientRpc(indexClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FramedPicBehaviour"; } } internal class GravityCoilBehaviour : GrabbableObject { private string[] sources = new string[1] { "jumpSFX" }; private Dictionary<string, AudioSource> sourcesDict = new Dictionary<string, AudioSource>(); private float baseJumpForce = 13f; private float multiplier = 2f; private bool shouldPlayJumpSFX = false; private PlayerControllerB boostedPlayer = null; private bool active = false; private void Awake() { base.grabbable = true; base.grabbableToEnemies = true; sourcesDict = Utils.getAllAudioSources(((Component)this).gameObject, "CoilSFX", sources); } public override void Update() { ((GrabbableObject)this).Update(); if (!active || (Object)(object)base.playerHeldBy == (Object)null || !base.wasOwnerLastFrame || Utils.frameCount(10) || !base.playerHeldBy.thisController.isGrounded || base.playerHeldBy.inSpecialInteractAnimation || Object.op_Implicit((Object)(object)base.playerHeldBy.inAnimationWithEnemy) || base.playerHeldBy.isClimbingLadder || base.playerHeldBy.isPlayerDead || base.playerHeldBy.inTerminalMenu || base.playerHeldBy.isTypingChat || base.playerHeldBy.isCrouching) { return; } if (base.playerHeldBy.playerActions.FindAction("Jump", false).IsPressed()) { if (shouldPlayJumpSFX) { shouldPlayJumpSFX = false; PlayJumpSFXServerRpc(); } } else { shouldPlayJumpSFX = true; } } public override void OnHitGround() { ((GrabbableObject)this).OnHitGround(); defaultJump(); } public override void GrabItem() { ((GrabbableObject)this).GrabItem(); boostedPlayer = base.playerHeldBy; } public override void GrabItemFromEnemy(EnemyAI enemy) { ((GrabbableObject)this).GrabItemFromEnemy(enemy); boostedPlayer = base.playerHeldBy; } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); boostedPlayer.jumpForce = baseJumpForce; active = false; } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); boostedPlayer = base.playerHeldBy; boostedPlayer.jumpForce = baseJumpForce * multiplier; active = true; } public override void OnPlaceObject() { ((GrabbableObject)this).OnPlaceObject(); defaultJump(); } public override void DestroyObjectInHand(PlayerControllerB playerHolding) { ((GrabbableObject)this).DestroyObjectInHand(playerHolding); defaultJump(ref playerHolding); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); defaultJump(); } public override void OnDestroy() { ((NetworkBehaviour)this).OnDestroy(); defaultJump(); } public override void OnNetworkDespawn() { ((NetworkBehaviour)this).OnNetworkDespawn(); defaultJump(); } private void defaultJump() { if (!((Object)(object)boostedPlayer == (Object)null)) { boostedPlayer.jumpForce = baseJumpForce; boostedPlayer = null; } } private void defaultJump(ref PlayerControllerB player) { if (!((Object)(object)player == (Object)null)) { player.jumpForce = baseJumpForce; } } [ServerRpc(RequireOwnership = false)] private void PlayJumpSFXServerRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2135253370u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2135253370u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayJumpSFXClientRpc(); } } } [ClientRpc] private void PlayJumpSFXClientRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3013580887u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3013580887u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; sourcesDict["jumpSFX"].Play(); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2135253370u, new RpcReceiveHandler(__rpc_handler_2135253370), "PlayJumpSFXServerRpc"); ((NetworkBehaviour)this).__registerRpc(3013580887u, new RpcReceiveHandler(__rpc_handler_3013580887), "PlayJumpSFXClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_2135253370(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; ((GravityCoilBehaviour)(object)target).PlayJumpSFXServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3013580887(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; ((GravityCoilBehaviour)(object)target).PlayJumpSFXClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "GravityCoilBehaviour"; } } internal class KarmaBehaviour : GrabbableObject { private bool coolingDown = false; private bool broken = false; private float cooldown = 5f; private float timeSinceShot = 0f; private float maxChargeBeforeShooting = 2f; private float maxChargeBeforeExplode = 2.9f; private float chargeTime = 0f; private float energyLostPerShot = 0.5f; private int interval = 10; private bool charging = false; private bool activated = false; private bool shoot = false; private bool startedRegen = false; private string[] sources = new string[8] { "ChargeSFX", "ShootSFX", "TrailSFX", "WarningSFX", "ExplosionSFX", "CooldownSFX", "CoolupSFX", "OnCdShotSFX" }; private Dictionary<string, AudioSource> sourcesDict = new Dictionary<string, AudioSource>(); private string[] ps = new string[4] { "MuzzleFlash", "Trail", "LingeringFire", "MainBlast" }; private Dictionary<string, ParticleSystem> psDict = new Dictionary<string, ParticleSystem>(); private Color readyColor = Color32.op_Implicit(new Color32((byte)20, (byte)20, (byte)20, byte.MaxValue)); private Color shootColor = Color32.op_Implicit(new Color32((byte)20, (byte)200, (byte)20, byte.MaxValue)); private Color dangerColor = Color32.op_Implicit(new Color32((byte)200, (byte)20, (byte)20, byte.MaxValue)); private Color unreadyColor = Color32.op_Implicit(new Color32((byte)250, (byte)100, (byte)0, byte.MaxValue)); private GameObject laserLight; private GameObject ScopeChargeTimer; private void Awake() { base.grabbable = true; base.grabbableToEnemies = true; sourcesDict = Utils.getAllAudioSources(((Component)this).gameObject, "KarmaSFX", sources); psDict = Utils.getAllParticleSystems(((Component)this).gameObject, "KarmaParticles", ps); ScopeChargeTimer = ((Component)((Component)this).gameObject.transform.Find("ScopeChargeTimer")).gameObject; laserLight = ((Component)((Component)this).gameObject.transform.Find("laserLight")).gameObject; base.insertedBattery.charge = 1f; } public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (Utils.isLocalPlayerHosting()) { setCoolingDownServerRpc(coolingDown); setBrokenServerRpc(broken); } if (!startedRegen) { startedRegen = true; ((MonoBehaviour)this).StartCoroutine(RegenBattery()); } } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); activated = false; StopChargingServerRpc(hasShot: false); ((Behaviour)laserLight.GetComponent<Light>()).enabled = false; } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); ((Behaviour)laserLight.GetComponent<Light>()).enabled = true; } public override void OnHitGround() { ((GrabbableObject)this).OnHitGround(); StopChargingServerRpc(hasShot: false); activated = false; if (!coolingDown && base.insertedBattery.charge >= energyLostPerShot && !broken && Utils.isLocalPlayerHosting() && Random.Range(1, 20) == 1) { ShootServerRpc(); } } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!((Object)(object)base.playerHeldBy != (Object)null) || base.isPocketed || !base.wasOwnerLastFrame || broken) { return; } if (buttonDown) { if (!coolingDown && base.insertedBattery.charge > energyLostPerShot) { activated = true; } else { sourcesDict["OnCdShotSFX"].Play(); } } else { activated = false; } } public override void ChargeBatteries() { ((GrabbableObject)this).ChargeBatteries(); RepairServerRpc(); } public override void Update() { ((GrabbableObject)this).Update(); if (broken) { return; } if (coolingDown) { if (!Utils.frameCount(interval)) { timeSinceShot += Time.deltaTime * (float)interval; if (timeSinceShot > cooldown) { ResetCooldownServerRpc(); } } } else { if (!base.wasOwnerLastFrame || Utils.frameCount(interval)) { return; } if (activated) { StartChargingServerRpc(); if (chargeTime > maxChargeBeforeExplode) { ExplodeServerRpc(); } chargeTime += Time.deltaTime * (float)interval; } else if (chargeTime >= maxChargeBeforeShooting && chargeTime <= maxChargeBeforeExplode) { StopChargingServerRpc(hasShot: true); if (!shoot) { shoot = true; ShootServerRpc(); } } else { StopChargingServerRpc(hasShot: false); } } } private IEnumerator RegenBattery() { while (true) { if (base.insertedBattery.charge < 1f) { Battery insertedBattery = base.insertedBattery; insertedBattery.charge += 0.01f; } yield return (object)new WaitForSeconds(1f); } } [ServerRpc(RequireOwnership = false)] private void ShootServerRpc() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1729751282u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1729751282u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ShootClientRpc(); } } } [ClientRpc] private void ShootClientRpc() { //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 missi