using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using DayNightCycles; using EasterIsland; using EasterIsland.NetcodePatcher; using EasterIsland.src; using EasterIsland.src.EasterIslandScripts; using EasterIsland.src.EasterIslandScripts.Cave_Easter_Egg; using EasterIsland.src.EasterIslandScripts.Cave_Easter_Egg.NetObj_Spawners; using EasterIsland.src.EasterIslandScripts.Company_Easter_Egg; using EasterIsland.src.EasterIslandScripts.Company_Easter_Egg.CompanyFight; using EasterIsland.src.EasterIslandScripts.Heaven.BodyMods; using EasterIsland.src.EasterIslandScripts.Heaven.Items; using EasterIsland.src.EasterIslandScripts.Heaven.Surgery; using EasterIsland.src.EasterIslandScripts.Library_Easter_egg; using EasterIsland.src.EasterIslandScripts.Technical; using EasterIsland.src.EasterIslandScripts.Technical.Dynamic_Loading; using GameNetcodeStuff; using HarmonyLib; using LethalCompanyInputUtils.Api; using LethalConfig; using LethalConfig.ConfigItems; using LethalConfig.ConfigItems.Options; using LethalLib.Modules; using Microsoft.CodeAnalysis; using MoaiEnemy.src.MoaiNormal; using On; using TMPro; using Unity.AI.Navigation; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.InputSystem; using UnityEngine.Rendering; using UnityEngine.Rendering.HighDefinition; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.Video; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("bcs4313")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Adds a new moon, items, and enemies.")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.4+cdee8bce64d2c34e8aecf5f3cdf3f4834f93b96a")] [assembly: AssemblyProduct("LegendOfTheMoai")] [assembly: AssemblyTitle("EasterIsland")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class BookPageScript : NetworkBehaviour { public Animator livro; public GrabbableObject bookRef; private void Start() { livro = ((Component)this).GetComponent(); } private void Update() { InputMap controls = Plugin.controls; bookRef.itemProperties.toolTips[0] = "Flip Forward Page: " + InputActionRebindingExtensions.GetBindingDisplayString(controls.BookForward, (DisplayStringOptions)0, (string)null); bookRef.itemProperties.toolTips[1] = "Flip Backward Page: " + InputActionRebindingExtensions.GetBindingDisplayString(controls.BookBackward, (DisplayStringOptions)0, (string)null); if ((Object)(object)bookRef.playerHeldBy == (Object)null || ((NetworkBehaviour)bookRef.playerHeldBy).NetworkObject.NetworkObjectId != ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { return; } if (controls.BookForward.triggered) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { setLivroClientRpc("go_ahead", val: true); } else { setLivroServerRpc("go_ahead", val: true); } } else if (((NetworkBehaviour)RoundManager.Instance).IsHost) { setLivroClientRpc("go_ahead", val: false); } else { setLivroServerRpc("go_ahead", val: false); } if (controls.BookBackward.triggered) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { setLivroClientRpc("go_back", val: true); } else { setLivroServerRpc("go_back", val: true); } } else if (((NetworkBehaviour)RoundManager.Instance).IsHost) { setLivroClientRpc("go_back", val: false); } else { setLivroServerRpc("go_back", val: false); } if (bookRef.itemProperties.toolTips.Length < 2) { bookRef.itemProperties.toolTips = new string[2] { "", "" }; } } [ClientRpc] public void setLivroClientRpc(string id, bool val) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendClientRpc(160744242u, val2, (RpcDelivery)0); bool flag = id != null; ((FastBufferWriter)(ref val3)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val3)).WriteValueSafe(id, false); } ((FastBufferWriter)(ref val3)).WriteValueSafe(ref val, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val3, 160744242u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; livro.SetBool(id, val); } } [ServerRpc(RequireOwnership = false)] public void setLivroServerRpc(string id, bool val) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendServerRpc(1366493061u, val2, (RpcDelivery)0); bool flag = id != null; ((FastBufferWriter)(ref val3)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val3)).WriteValueSafe(id, false); } ((FastBufferWriter)(ref val3)).WriteValueSafe(ref val, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val3, 1366493061u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; setLivroClientRpc(id, val); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(160744242u, new RpcReceiveHandler(__rpc_handler_160744242), "setLivroClientRpc"); ((NetworkBehaviour)this).__registerRpc(1366493061u, new RpcReceiveHandler(__rpc_handler_1366493061), "setLivroServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_160744242(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string id = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref id, false); } bool val = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BookPageScript)(object)target).setLivroClientRpc(id, val); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1366493061(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string id = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref id, false); } bool val = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BookPageScript)(object)target).setLivroServerRpc(id, val); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BookPageScript"; } } public class BombTurret : NetworkBehaviour { public GameObject root; public GameObject rotator; private float rotationSpeed = 5f; public bool hostile = false; private bool hasDoneWarning = false; public AudioSource warningAudioSource; public AudioSource fireAudioSource; private float fireInterval = 0.25f; private float burstInterval = 15f; private int burstAmount = 16; private float burstTimer = 0f; private float fireTimer = 0f; private float missileWarble = 0.1f; private float missileSpeed = 0.3f; private float targetChangeInterval = 15f; private float targetTimer = 0f; private PlayerControllerB targetPlayer; public GameObject missilePrefab; public Transform firePoint1; public Transform firePoint2; private bool useP1 = false; public void Start() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { burstInterval = 7f; selectTarget(); } } private void Update() { if (!hostile && warningAudioSource.isPlaying) { warningAudioSource.Stop(); } if (!((NetworkBehaviour)RoundManager.Instance).IsHost || !hostile || !((Object)(object)targetPlayer != (Object)null)) { return; } RotateTowardTarget(); burstTimer += Time.deltaTime; if (burstTimer >= burstInterval - 4.3f && !hasDoneWarning) { warnPlayerClientRpc(); hasDoneWarning = true; } if (burstTimer >= burstInterval) { if (burstAmount > 0) { fireTimer += Time.deltaTime; if (fireTimer >= fireInterval) { fireTimer = 0f; FireBomb(); } } else { burstInterval = Random.Range(40, 60); burstTimer = 0f; burstAmount = 20; hasDoneWarning = false; } } targetTimer += Time.deltaTime; if (targetTimer >= targetChangeInterval) { selectTarget(); targetChangeInterval = Random.Range(3, 30); } } [ClientRpc] public void warnPlayerClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(755375665u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 755375665u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; warningAudioSource.Play(); } } } private void selectTarget() { PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; List list = new List(); if (allPlayerScripts.Length == 0) { return; } PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (val.isPlayerControlled) { list.Add(val); } } targetPlayer = list[Random.Range(0, list.Count)]; } private void RotateTowardTarget() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)targetPlayer).transform.position - rotator.transform.position; if (((Vector3)(ref val)).sqrMagnitude > 0.001f) { Quaternion val2 = Quaternion.LookRotation(val, Vector3.up); rotator.transform.rotation = Quaternion.Slerp(rotator.transform.rotation, val2, rotationSpeed * Time.deltaTime); } } private void FireBomb() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost && hostile) { burstAmount--; Debug.Log((object)"BombTurret: FireBomb"); Transform val = null; val = ((!useP1) ? firePoint2 : firePoint1); useP1 = !useP1; makeMissileClientRpc(((Component)val).transform.position); } } [ClientRpc] public void makeMissileClientRpc(Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3314552551u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3314552551u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; GameObject val3 = Object.Instantiate(missilePrefab, pos, rotator.transform.rotation); CompanyMissile component = val3.GetComponent(); component.setMissileSpeed(missileSpeed); component.setMissileWarble(missileWarble); fireAudioSource.Play(); HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(755375665u, new RpcReceiveHandler(__rpc_handler_755375665), "warnPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3314552551u, new RpcReceiveHandler(__rpc_handler_3314552551), "makeMissileClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_755375665(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; ((BombTurret)(object)target).warnPlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3314552551(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((BombTurret)(object)target).makeMissileClientRpc(pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BombTurret"; } } public class LogScript : NetworkBehaviour { public GrabbableObject logRef; public string[] messageTitles; public string[] messageDescs; private int currentLog = 0; private void Update() { InputMap controls = Plugin.controls; logRef.itemProperties.toolTips[0] = "Read Log Message: " + InputActionRebindingExtensions.GetBindingDisplayString(controls.InspectLog, (DisplayStringOptions)0, (string)null); if (controls.InspectLog.triggered && !((Object)(object)logRef.playerHeldBy == (Object)null) && ((NetworkBehaviour)logRef.playerHeldBy).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId && !logRef.isPocketed) { HUDManager.Instance.DisplayTip(messageTitles[currentLog], messageDescs[currentLog], true, false, "LC_Tip1"); currentLog++; if (currentLog >= messageDescs.Length) { currentLog = 0; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "LogScript"; } } [RequireComponent(typeof(InteractTrigger))] public class EasterDoorLock : NetworkBehaviour { private InteractTrigger doorTrigger; public float maxTimeLeft = 60f; public float lockPickTimeLeft = 60f; public bool isLocked; public bool isPickingLock; public bool demandMet = false; [Space(5f)] public EasterDoorLock twinDoor; public Transform lockPickerPosition; public Transform lockPickerPosition2; public string requestedObjectID = "????"; private float enemyDoorMeter; public GameObject paintingAnchorNode; private bool isDoorOpened; private NavMeshObstacle navMeshObstacle; public AudioClip pickingLockSFX; public AudioClip unlockSFX; public AudioSource doorLockSFX; private bool displayedLockTip; private bool localPlayerPickingLock; private int playersPickingDoor; private float playerPickingLockProgress; private float validationPeriod = 5f; private string storedItemName; private Vector3 storedRotOffset = Vector3.zero; private bool presentItem = false; public void Awake() { doorTrigger = ((Component)this).gameObject.GetComponent(); lockPickTimeLeft = maxTimeLeft; navMeshObstacle = ((Component)this).GetComponent(); LockDoor(); spawnObj(); } public async void spawnObj() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { while ((Object)(object)RoundManager.Instance.dungeonGenerator == (Object)null) { Debug.Log((object)"Easter Door Lock: Awaiting for level to start... 1"); await Task.Delay(1000); } while (RoundManager.Instance.dungeonGenerator.Generator == null) { Debug.Log((object)"Easter Door Lock: Awaiting for level to start... 2"); await Task.Delay(1000); } while (RoundManager.Instance.dungeonGenerator.Generator.IsGenerating) { Debug.Log((object)"Easter Door Lock: Awaiting for level to start... 3"); await Task.Delay(1000); } while (!StartOfRound.Instance.shipHasLanded) { Debug.Log((object)"Easter Door Lock: Awaiting for ship to land... 4"); await Task.Delay(1000); } } await Task.Delay(1000); while ((Object)(object)GameObject.Find("X8957") != (Object)null) { await Task.Delay(1000); Object.Destroy((Object)(object)GameObject.Find("X8957")); } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { loadTriggerItem(); } else { clientRequestLoop(); } } [ServerRpc(RequireOwnership = false)] public void requestItemServerRpc(ulong requestorID) { //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) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(741360236u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, requestorID); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 741360236u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (storedItemName != "") { sendItemNameClientRpc(requestorID, storedItemName, storedRotOffset); } } } [ClientRpc] public void sendItemNameClientRpc(ulong requestorID, string itemName, Vector3 rotOffset) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_0192: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(654332794u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, requestorID); bool flag = itemName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(itemName, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rotOffset); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 654332794u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ManualLogSource logger = Plugin.Logger; string[] obj = new string[6] { "Easter Island Door Lock: Setting Item : ", itemName, " with offset ", null, null, null }; Vector3 val3 = rotOffset; obj[3] = ((object)(Vector3)(ref val3)).ToString(); obj[4] = " for local player: "; obj[5] = requestorID.ToString(); logger.LogInfo((object)string.Concat(obj)); ulong networkObjectId = ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId; if (networkObjectId == requestorID) { setItem(itemName, rotOffset); } } } public async void clientRequestLoop() { while (storedItemName == "" || storedItemName == null) { Plugin.Logger.LogInfo((object)"Easter Island Door Lock: Awaiting for host item to be available..."); ulong localId = ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId; requestItemServerRpc(localId); await Task.Delay(1000); } } public async void loadTriggerItem() { if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } demandMet = false; Random rnd = new Random(); GrabbableObject obj = null; while ((Object)(object)obj == (Object)null) { string name = ""; int highestValue = -1; int retryLimit = 4; while ((name.Equals("") || name.Contains("goldenhead") || name.ToLower().Contains("techradaritem")) && retryLimit > 0) { retryLimit--; GrabbableObject[] objs = Object.FindObjectsOfType(); GrabbableObject objTemp = objs[rnd.Next(0, objs.Length)]; name = ((Object)((Component)objTemp).gameObject).name; if (objTemp.scrapValue >= highestValue && objTemp.isInFactory) { highestValue = objTemp.scrapValue; obj = objTemp; name = ((Object)((Component)objTemp).gameObject).name; } } if ((Object)(object)obj != (Object)null) { setItem(obj.itemProperties.itemName, obj.itemProperties.rotationOffset); } if ((Object)(object)obj == (Object)null) { Plugin.Logger.LogInfo((object)"Easter Island Door Lock: Awaiting for trigger item object to be available..."); } await Task.Delay(1500); } } public GameObject attachItemToPainting(GameObject GO) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) GrabbableObject component = GO.GetComponent(); requestedObjectID = component.itemProperties.itemName; GameObject gameObject = ((Component)component).gameObject; ((NetworkBehaviour)component).NetworkObject.DestroyWithScene = true; ((Behaviour)gameObject.GetComponent()).enabled = false; ((Collider)gameObject.GetComponent()).enabled = false; Vector3 position = default(Vector3); ((Vector3)(ref position))..ctor(paintingAnchorNode.transform.position.x + 0.25f, paintingAnchorNode.transform.position.y, paintingAnchorNode.transform.position.z); gameObject.transform.position = position; gameObject.transform.rotation = Quaternion.Euler(0f, 180f, 0f); if (Object.op_Implicit((Object)(object)gameObject.GetComponent())) { Object.Destroy((Object)(object)gameObject.GetComponent()); } ((Object)gameObject).name = "X8957"; ((Object)GO).name = "X8957"; return GO; } public async void setItem(string itemName, Vector3 rotOffset) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Plugin.Logger.LogInfo((object)("Easter Island Door Lock: Setting Item " + itemName)); GameObject GO = null; try { GrabbableObject[] array = Object.FindObjectsOfType(); foreach (GrabbableObject obj in array) { if (obj.itemProperties.itemName.Equals(itemName) && ((Vector3)(ref obj.itemProperties.rotationOffset)).Equals(rotOffset)) { GO = Object.Instantiate(((Component)obj).gameObject); attachItemToPainting(GO); storedItemName = obj.itemProperties.itemName; storedRotOffset = obj.itemProperties.rotationOffset; } } } catch (Exception e) { Plugin.Logger.LogError((object)e); await Task.Delay(1000); if ((Object)(object)GO != (Object)null) { Object.Destroy((Object)(object)GO); } storedItemName = ""; storedRotOffset = Vector3.zero; loadTriggerItem(); } } public void OnHoldInteract() { if (isLocked && !displayedLockTip && HUDManager.Instance.holdFillAmount / doorTrigger.timeToHold > 0.3f) { displayedLockTip = true; HUDManager.Instance.DisplayTip("TIP:", "To get through locked doors efficiently, order a lock-picker from the ship terminal.", false, true, "LCTip_Autopicker"); } } public void attemptUnlockDoor(PlayerControllerB player) { GrabbableObject val = ((!Object.op_Implicit((Object)(object)player.currentlyHeldObject)) ? player.currentlyHeldObjectServer : player.currentlyHeldObject); if ((Object)(object)val == (Object)null) { Debug.Log((object)"Easter Island: No item found to unlock door with. Doing nothing..."); } else if (((NetworkBehaviour)RoundManager.Instance).IsHost) { attemptUnlockDoorAction(player, val.itemProperties.itemName); } else { attemptUnlockDoorServerRpc(((NetworkBehaviour)player).NetworkObject.NetworkObjectId, val.itemProperties.itemName); } } public void attemptUnlockDoorAction(PlayerControllerB player, string objId) { if (!isLocked) { return; } if (objId == requestedObjectID) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { UnlockDoorClientRpc(((NetworkBehaviour)player).NetworkObject.NetworkObjectId); demandMet = true; } else { demandMet = true; UnlockDoorServerRpc(((NetworkBehaviour)player).NetworkObject.NetworkObjectId); } } else if (((NetworkBehaviour)RoundManager.Instance).IsHost) { playDoorLockSFXClientRpc(); } else { playDoorLockSFXServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void attemptUnlockDoorServerRpc(ulong playerId, string objId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3258746969u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); bool flag = objId != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(objId, false); } ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3258746969u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB player = getPlayer(playerId); attemptUnlockDoorAction(player, objId); } } [ClientRpc] public void playDoorLockSFXClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2378759453u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2378759453u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; doorLockSFX.Play(); } } } [ServerRpc] public void playDoorLockSFXServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__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(41280586u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 41280586u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; playDoorLockSFXClientRpc(); } } public PlayerControllerB getPlayer(ulong netid) { PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (((NetworkBehaviour)val).NetworkObject.NetworkObjectId == netid) { return val; } } return null; } public void LockDoor(float timeToLockPick = 30f) { doorTrigger.timeToHold = timeToLockPick; doorTrigger.hoverTip = "Me no normal door. Give me what me want."; doorTrigger.holdTip = "Dum Dum, Gimme Somthin"; isLocked = true; navMeshObstacle.carving = true; navMeshObstacle.carveOnlyStationary = true; if ((Object)(object)twinDoor != (Object)null) { twinDoor.doorTrigger.interactable = false; twinDoor.doorTrigger.timeToHold = 35f; twinDoor.doorTrigger.hoverTip = "Locked (pickable)"; twinDoor.doorTrigger.holdTip = "Picking lock"; twinDoor.isLocked = true; } } public void UnlockDoor(ulong netid) { doorLockSFX.Stop(); doorLockSFX.PlayOneShot(unlockSFX); navMeshObstacle.carving = false; if (isLocked && demandMet) { doorTrigger.hoverTip = "Use door : [LMB]"; doorTrigger.holdTip = ""; isPickingLock = false; isLocked = false; doorTrigger.timeToHoldSpeedMultiplier = 1f; navMeshObstacle.carving = false; Debug.Log((object)"Unlocking door"); doorTrigger.timeToHold = 0.3f; PlayerControllerB player = getPlayer(netid); if (!Object.op_Implicit((Object)(object)player)) { Debug.LogError((object)("Easter Island Door Error: failure to retrieve player id " + netid + " ::")); } else { ((Component)this).GetComponent().TriggerAnimation(player); } } } [ServerRpc(RequireOwnership = false)] public void UnlockDoorServerRpc(ulong netid) { //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) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1591033154u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1591033154u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB player = getPlayer(netid); if (!Object.op_Implicit((Object)(object)player)) { Debug.LogError((object)("Easter Island Door Error: failure to retrieve player id " + netid + " ::")); } else { UnlockDoorClientRpc(((NetworkBehaviour)player).NetworkObject.NetworkObjectId); } } } [ClientRpc] public void UnlockDoorClientRpc(ulong netid) { //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) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1752022397u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1752022397u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; demandMet = true; PlayerControllerB player = getPlayer(netid); if (!Object.op_Implicit((Object)(object)player)) { Debug.LogError((object)("Easter Island Door Error: failure to retrieve player id " + netid + " ::")); } else { UnlockDoor(((NetworkBehaviour)player).NetworkObject.NetworkObjectId); } } } private void Update() { if (isLocked) { if ((Object)(object)GameNetworkManager.Instance == (Object)null || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null) { return; } if ((Object)(object)GameNetworkManager.Instance.localPlayerController.currentlyHeldObjectServer != (Object)null && GameNetworkManager.Instance.localPlayerController.currentlyHeldObjectServer.itemProperties.itemId == 14) { if (StartOfRound.Instance.localPlayerUsingController) { doorTrigger.disabledHoverTip = "Me no want key -_- give me somethin else"; } else { doorTrigger.disabledHoverTip = "Me no want key -_- give me somethin else"; } } else { doorTrigger.disabledHoverTip = "Me no normal door. Give me what me want."; } } else { navMeshObstacle.carving = false; } if (isLocked && isPickingLock) { doorTrigger.disabledHoverTip = "It seems stuck..."; } } private void OnTriggerStay(Collider other) { if ((Object)(object)NetworkManager.Singleton == (Object)null || !((NetworkBehaviour)this).IsServer || isLocked || isDoorOpened || !((Component)other).CompareTag("Enemy")) { return; } EnemyAICollisionDetect component = ((Component)other).GetComponent(); if (!((Object)(object)component == (Object)null)) { enemyDoorMeter += Time.deltaTime * component.mainScript.openDoorSpeedMultiplier; if (enemyDoorMeter > 1f) { enemyDoorMeter = 0f; ((Component)this).gameObject.GetComponent().TriggerAnimationNonPlayer(component.mainScript.useSecondaryAudiosOnAnimatedObjects, true, false); OpenDoorAsEnemyServerRpc(); } } } public void OpenOrCloseDoor(PlayerControllerB playerWhoTriggered) { AnimatedObjectTrigger component = ((Component)this).gameObject.GetComponent(); component.TriggerAnimation(playerWhoTriggered); isDoorOpened = component.boolValue; ((Behaviour)navMeshObstacle).enabled = !component.boolValue; } public void SetDoorAsOpen(bool isOpen) { isDoorOpened = isOpen; ((Behaviour)navMeshObstacle).enabled = !isOpen; } public void OpenDoorAsEnemy() { isDoorOpened = true; ((Behaviour)navMeshObstacle).enabled = false; } [ServerRpc(RequireOwnership = false)] public void OpenDoorAsEnemyServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3792172792u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3792172792u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; OpenDoorAsEnemyClientRpc(); } } } [ClientRpc] public void OpenDoorAsEnemyClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1001849341u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1001849341u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; OpenDoorAsEnemy(); } } } public void TryPickingLock() { if (isLocked) { HUDManager.Instance.holdFillAmount = playerPickingLockProgress; if (!localPlayerPickingLock) { localPlayerPickingLock = true; PlayerPickLockServerRpc(); } } } public void StopPickingLock() { if (localPlayerPickingLock) { localPlayerPickingLock = false; if (playersPickingDoor == 1) { playerPickingLockProgress = Mathf.Clamp(playerPickingLockProgress - 1f, 0f, 45f); } PlayerStopPickingLockServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void PlayerStopPickingLockServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(830918519u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 830918519u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerStopPickingLockClientRpc(); } } } [ClientRpc] public void PlayerStopPickingLockClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4154123680u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4154123680u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; doorLockSFX.Stop(); playersPickingDoor = Mathf.Clamp(playersPickingDoor - 1, 0, 4); } } } [ServerRpc(RequireOwnership = false)] public void PlayerPickLockServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1038649219u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1038649219u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerPickLockClientRpc(); } } } [ClientRpc] public void PlayerPickLockClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2226397805u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2226397805u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; doorLockSFX.clip = pickingLockSFX; doorLockSFX.Play(); playersPickingDoor = Mathf.Clamp(playersPickingDoor + 1, 0, 4); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(741360236u, new RpcReceiveHandler(__rpc_handler_741360236), "requestItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(654332794u, new RpcReceiveHandler(__rpc_handler_654332794), "sendItemNameClientRpc"); ((NetworkBehaviour)this).__registerRpc(3258746969u, new RpcReceiveHandler(__rpc_handler_3258746969), "attemptUnlockDoorServerRpc"); ((NetworkBehaviour)this).__registerRpc(2378759453u, new RpcReceiveHandler(__rpc_handler_2378759453), "playDoorLockSFXClientRpc"); ((NetworkBehaviour)this).__registerRpc(41280586u, new RpcReceiveHandler(__rpc_handler_41280586), "playDoorLockSFXServerRpc"); ((NetworkBehaviour)this).__registerRpc(1591033154u, new RpcReceiveHandler(__rpc_handler_1591033154), "UnlockDoorServerRpc"); ((NetworkBehaviour)this).__registerRpc(1752022397u, new RpcReceiveHandler(__rpc_handler_1752022397), "UnlockDoorClientRpc"); ((NetworkBehaviour)this).__registerRpc(3792172792u, new RpcReceiveHandler(__rpc_handler_3792172792), "OpenDoorAsEnemyServerRpc"); ((NetworkBehaviour)this).__registerRpc(1001849341u, new RpcReceiveHandler(__rpc_handler_1001849341), "OpenDoorAsEnemyClientRpc"); ((NetworkBehaviour)this).__registerRpc(830918519u, new RpcReceiveHandler(__rpc_handler_830918519), "PlayerStopPickingLockServerRpc"); ((NetworkBehaviour)this).__registerRpc(4154123680u, new RpcReceiveHandler(__rpc_handler_4154123680), "PlayerStopPickingLockClientRpc"); ((NetworkBehaviour)this).__registerRpc(1038649219u, new RpcReceiveHandler(__rpc_handler_1038649219), "PlayerPickLockServerRpc"); ((NetworkBehaviour)this).__registerRpc(2226397805u, new RpcReceiveHandler(__rpc_handler_2226397805), "PlayerPickLockClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_741360236(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong requestorID = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref requestorID); target.__rpc_exec_stage = (__RpcExecStage)1; ((EasterDoorLock)(object)target).requestItemServerRpc(requestorID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_654332794(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong requestorID = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref requestorID); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string itemName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref itemName, false); } Vector3 rotOffset = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rotOffset); target.__rpc_exec_stage = (__RpcExecStage)1; ((EasterDoorLock)(object)target).sendItemNameClientRpc(requestorID, itemName, rotOffset); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3258746969(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string objId = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref objId, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((EasterDoorLock)(object)target).attemptUnlockDoorServerRpc(playerId, objId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2378759453(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; ((EasterDoorLock)(object)target).playDoorLockSFXClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_41280586(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((EasterDoorLock)(object)target).playDoorLockSFXServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1591033154(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong netid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref netid); target.__rpc_exec_stage = (__RpcExecStage)1; ((EasterDoorLock)(object)target).UnlockDoorServerRpc(netid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1752022397(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong netid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref netid); target.__rpc_exec_stage = (__RpcExecStage)1; ((EasterDoorLock)(object)target).UnlockDoorClientRpc(netid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3792172792(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; ((EasterDoorLock)(object)target).OpenDoorAsEnemyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1001849341(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; ((EasterDoorLock)(object)target).OpenDoorAsEnemyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_830918519(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; ((EasterDoorLock)(object)target).PlayerStopPickingLockServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4154123680(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; ((EasterDoorLock)(object)target).PlayerStopPickingLockClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1038649219(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; ((EasterDoorLock)(object)target).PlayerPickLockServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2226397805(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; ((EasterDoorLock)(object)target).PlayerPickLockClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "EasterDoorLock"; } } public class GoldMoaiSpawn : MonoBehaviour { private bool awaitSpawn = true; [Space(5f)] public GameObject hivePrefab; public NoisemakerProp hive; public void OnEnable() { Debug.Log((object)"Gold Moai: OnEnable Call"); if (((NetworkBehaviour)RoundManager.Instance).IsServer) { SpawnHiveNearEnemy(); } } private float RandomNumberInRadius(float radius, Random randomSeed) { return ((float)randomSeed.NextDouble() - 0.5f) * radius; } public Vector3 GetRandomNavMeshPositionInBoxPredictable(Vector3 pos, float radius = 10f, NavMeshHit navHit = default(NavMeshHit), Random randomSeed = null, int layerMask = -1) { //IL_0001: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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) //IL_0048: 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_006e: 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_0072: Unknown result type (might be due to invalid IL or missing references) float y = pos.y; float num = RandomNumberInRadius(radius, randomSeed); float num2 = RandomNumberInRadius(radius, randomSeed); float num3 = RandomNumberInRadius(radius, randomSeed); Vector3 val = new Vector3(num, num2, num3) + pos; val.y = y; float num4 = Vector3.Distance(pos, val); if (NavMesh.SamplePosition(val, ref navHit, num4 + 2f, layerMask)) { return ((NavMeshHit)(ref navHit)).position; } return pos; } private async void SpawnHiveNearEnemy() { if (!((NetworkBehaviour)RoundManager.Instance).IsServer) { return; } while ((Object)(object)RoundManager.Instance.dungeonGenerator == (Object)null) { Debug.Log((object)"Moai Enemy: Awaiting to spawn gold moai - -3..."); await Task.Delay(1000); } while (RoundManager.Instance.dungeonGenerator.Generator == null) { Debug.Log((object)"Moai Enemy: Awaiting to spawn gold moai - -2..."); await Task.Delay(1000); } while (RoundManager.Instance.dungeonGenerator.Generator.IsGenerating) { Debug.Log((object)"Moai Enemy: Awaiting to spawn gold moai - -1..."); await Task.Delay(1000); } while (awaitSpawn) { GameObject[] nodes = RoundManager.Instance.outsideAINodes; while (nodes == null || nodes.Length == 0) { Debug.Log((object)"Moai Enemy: Awaiting to spawn gold moai - 1..."); await Task.Delay(1000); nodes = RoundManager.Instance.outsideAINodes; } Vector3 originPos = nodes[new Random().Next(0, nodes.Length)].transform.position; Vector3 randomNavMeshPositionInBoxPredictable = GetRandomNavMeshPositionInBoxPredictable(originPos, 3f, RoundManager.Instance.navHit, new Random(), -5); if (randomNavMeshPositionInBoxPredictable == originPos) { Debug.Log((object)"Moai Enemy: Awaiting to spawn gold moai - 2..."); await Task.Delay(1000); continue; } Debug.Log((object)$"Moai Enemy: Set gold moai random position: {randomNavMeshPositionInBoxPredictable}"); awaitSpawn = false; hivePrefab = Plugin.GoldenHead; GameObject gameObject = Object.Instantiate(hivePrefab, randomNavMeshPositionInBoxPredictable + Vector3.up * 0.5f, Quaternion.Euler(Vector3.zero), RoundManager.Instance.spawnedScrapContainer); gameObject.SetActive(true); gameObject.GetComponent().Spawn(false); ((GrabbableObject)gameObject.GetComponent()).targetFloorPosition = randomNavMeshPositionInBoxPredictable + Vector3.up * 0.5f; SpawnHiveClientRpc(NetworkObjectReference.op_Implicit(gameObject.GetComponent()), randomNavMeshPositionInBoxPredictable + Vector3.up * 0.5f); } } [ClientRpc] public void SpawnHiveClientRpc(NetworkObjectReference hiveObject, Vector3 hivePosition) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) NetworkObject val = default(NetworkObject); if (((NetworkObjectReference)(ref hiveObject)).TryGet(ref val, (NetworkManager)null)) { hive = ((Component)val).gameObject.GetComponent(); ((GrabbableObject)hive).targetFloorPosition = hivePosition; ((GrabbableObject)hive).isInFactory = false; int num = new Random().Next(50, 200); ((GrabbableObject)hive).scrapValue = num; ScanNodeProperties componentInChildren = ((Component)hive).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.scrapValue = num; componentInChildren.headerText = "Golden Moai Head"; componentInChildren.subText = $"VALUE: ${num}"; } RoundManager instance = RoundManager.Instance; instance.totalScrapValueInLevel += (float)((GrabbableObject)hive).scrapValue; } else { Debug.LogError((object)"Moai Enemy: Error! gold moai could not be accessed from network object reference"); } Object.Destroy((Object)(object)((Component)this).gameObject); } public void OnDestroy() { Debug.Log((object)"Moai Enemy: Gold Moai Spawner has been destroyed in scene."); } } public class PortalMoaiSpawn : MonoBehaviour { private bool awaitSpawn = true; public void OnEnable() { SpawnHiveNearEnemy(); } private float RandomNumberInRadius(float radius, Random randomSeed) { return ((float)randomSeed.NextDouble() - 0.5f) * radius; } public Vector3 GetRandomNavMeshPositionInBoxPredictable(Vector3 pos, float radius = 10f, NavMeshHit navHit = default(NavMeshHit), Random randomSeed = null, int layerMask = -1) { //IL_0001: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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) //IL_0048: 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_006e: 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_0072: Unknown result type (might be due to invalid IL or missing references) float y = pos.y; float num = RandomNumberInRadius(radius, randomSeed); float num2 = RandomNumberInRadius(radius, randomSeed); float num3 = RandomNumberInRadius(radius, randomSeed); Vector3 val = new Vector3(num, num2, num3) + pos; val.y = y; float num4 = Vector3.Distance(pos, val); if (NavMesh.SamplePosition(val, ref navHit, num4 + 2f, layerMask)) { return ((NavMeshHit)(ref navHit)).position; } return pos; } private async void SpawnHiveNearEnemy() { if (!((NetworkBehaviour)RoundManager.Instance).IsServer) { return; } while ((Object)(object)RoundManager.Instance.dungeonGenerator == (Object)null) { Debug.Log((object)"Moai Enemy: Awaiting to spawn portal - -3..."); await Task.Delay(1000); } while (RoundManager.Instance.dungeonGenerator.Generator == null) { Debug.Log((object)"Moai Enemy: Awaiting to spawn portal - -2..."); await Task.Delay(1000); } while (RoundManager.Instance.dungeonGenerator.Generator.IsGenerating) { Debug.Log((object)"Moai Enemy: Awaiting to spawn portal - -1..."); await Task.Delay(1000); } while (awaitSpawn) { GameObject[] nodes = RoundManager.Instance.outsideAINodes; while (nodes == null || nodes.Length == 0) { Debug.Log((object)"EasterIslandPortal: Awaiting to spawn portal - 1..."); await Task.Delay(1000); nodes = RoundManager.Instance.outsideAINodes; } Vector3 originPos = nodes[new Random().Next(0, nodes.Length)].transform.position; Vector3 randomNavMeshPositionInBoxPredictable = GetRandomNavMeshPositionInBoxPredictable(originPos, 3f, RoundManager.Instance.navHit, new Random(), -5); if (randomNavMeshPositionInBoxPredictable == originPos) { Debug.Log((object)"Moai Enemy: Awaiting to spawn portal - 2..."); await Task.Delay(1000); continue; } if (Object.op_Implicit((Object)(object)GameObject.Find("PortalPair(Clone)"))) { Object.Destroy((Object)(object)GameObject.Find("PortalPair(Clone)")); } Debug.Log((object)$"EasterIslandPortal: Set portal random position: {randomNavMeshPositionInBoxPredictable}"); awaitSpawn = false; GameObject gameObject = Object.Instantiate(Plugin.portalPair, Plugin.portalPair.transform.position, Plugin.portalPair.transform.rotation); gameObject.SetActive(true); NetworkObject rootObj = gameObject.GetComponent(); ((Component)rootObj).GetComponent().Spawn(true); while (!rootObj.IsSpawned) { await Task.Delay(500); Debug.Log((object)$"EasterIslandPortal: Awaiting Root Object spawn: {randomNavMeshPositionInBoxPredictable}"); } GameObject labportal = ((Component)gameObject.transform.Find("LabPortal")).gameObject; GameObject islandportal = ((Component)gameObject.transform.Find("IslandPortal")).gameObject; while (!Object.op_Implicit((Object)(object)labportal)) { await Task.Delay(500); Debug.Log((object)$"EasterIslandPortal: Awaiting Lab Portal Object spawn: {randomNavMeshPositionInBoxPredictable}"); } while (!Object.op_Implicit((Object)(object)islandportal)) { await Task.Delay(500); Debug.Log((object)$"EasterIslandPortal: Awaiting Island Portal Object spawn: {randomNavMeshPositionInBoxPredictable}"); } Debug.Log((object)"Both portals spawned. Initializing portals."); labportal.GetComponent().initialize(((Component)this).transform.position); islandportal.GetComponent().initialize(randomNavMeshPositionInBoxPredictable + Vector3.up * 0.5f); } } } public class SceneItemInitializer : MonoBehaviour { private void Start() { } private void Update() { } } public class TechRadarItem : GrabbableObject { private AudioSource src; public AudioClip pingClip; public AudioClip turnOffClip; public AudioClip outOfBatteryClip; public AudioClip rechargeClip; public AudioClip continueClip; public Transform blankEnd; private LineRenderer line; private bool toggle = false; private float lastTimeSinceFind = 0f; private float lastTimeSinceScan = 0f; private float lastTimeSincePing = 0f; private float pingdelay = 1f; private float minDelay = 0.2f; private float pingDivisor = 30f; private float batteryDrainRate = 0.11f; private float scanPrecision = 1f; private float scanSteps = 120f; public Material lineMaterial; private GrabbableObject[] currentObjects; private EnemyAI[] currentEnemies; private EntranceTeleport[] currentTeleports; public override void Start() { ((GrabbableObject)this).Start(); base.itemProperties.verticalOffset = 0.12f; if (!((NetworkBehaviour)this).NetworkObject.IsSpawned && ((NetworkBehaviour)RoundManager.Instance).IsHost) { ((NetworkBehaviour)this).NetworkObject.Spawn(false); } else { src = ((Component)this).GetComponent(); } } private AnimationCurve CreateConstantCurve(float yValue, float xStart, float xEnd) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //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_002f: Expected O, but got Unknown Keyframe val = default(Keyframe); ((Keyframe)(ref val))..ctor(xStart, yValue); Keyframe val2 = default(Keyframe); ((Keyframe)(ref val2))..ctor(xEnd, yValue); return new AnimationCurve((Keyframe[])(object)new Keyframe[2] { val, val2 }); } [ServerRpc(RequireOwnership = false)] public void spawnLineServerRpc() { //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(1197722204u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1197722204u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; spawnLineClientRpc(); } } } [ClientRpc] public void spawnLineClientRpc() { //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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_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_0169: 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(2945946867u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2945946867u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)((Component)this).GetComponent() == (Object)null) { line = ((Component)this).gameObject.AddComponent(); Vector3[] array = (Vector3[])(object)new Vector3[2] { new Vector3(0f, 0f, 0f), new Vector3(0f, 1f, 0f) }; ((Renderer)line).material = lineMaterial; line.useWorldSpace = true; line.shadowBias = 0.5f; line.textureScale = new Vector2(1f, 1f); line.alignment = (LineAlignment)0; line.textureMode = (LineTextureMode)0; line.widthCurve = CreateConstantCurve(0.2f, 0f, 1f); } else { line = ((Component)this).GetComponent(); } } } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) src = ((Component)this).GetComponent(); if ((Object)(object)line == (Object)null) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { spawnLineClientRpc(); } else { spawnLineServerRpc(); } } toggle = !toggle; if (toggle) { Debug.Log((object)"Artifact Activate"); src.Stop(); src.Play(); } else { Debug.Log((object)"Artifact Deactivated"); line.SetPosition(1, ((Component)this).transform.position); src.Stop(); src.PlayOneShot(turnOffClip); } } public override void UseUpBatteries() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"Artifact Use up Batteries"); ((GrabbableObject)this).UseUpBatteries(); RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 13f, 0.65f, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); src.Stop(); } public override void PocketItem() { if (!((NetworkBehaviour)this).IsOwner) { ((GrabbableObject)this).PocketItem(); } else { ((GrabbableObject)this).PocketItem(); } } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); } public override void ChargeBatteries() { ((GrabbableObject)this).ChargeBatteries(); src.PlayOneShot(rechargeClip); } public override void Update() { //IL_008a: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0226: 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_0259: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); base.itemProperties.verticalOffset = 0.12f; if (!src.isPlaying && toggle) { src.PlayOneShot(continueClip); src.PlayOneShot(continueClip); } if ((Object)(object)line == (Object)null) { return; } if (toggle) { line.SetPosition(1, ((Component)this).transform.position); } if (base.insertedBattery.charge <= 0f && toggle) { toggle = false; src.PlayOneShot(outOfBatteryClip); } Vector3 val = blankEnd.position - ((Component)this).transform.position; Vector3 val2 = navmeshRaycast(); line.SetPosition(0, ((Component)this).transform.position); if (toggle) { Battery insertedBattery = base.insertedBattery; insertedBattery.charge -= 0.02f * Time.deltaTime * batteryDrainRate; RaycastHit val3 = default(RaycastHit); if (val2 != Vector3.zero) { line.SetPosition(1, val2); if ((double)lastTimeSinceScan + 0.2 < (double)Time.time) { scanArea(val2); lastTimeSinceScan = Time.time; } if (lastTimeSincePing + pingdelay < Time.time) { src.PlayOneShot(pingClip); lastTimeSincePing = Time.time; } } else if (Physics.Raycast(((Component)this).transform.position, val, ref val3)) { Battery insertedBattery2 = base.insertedBattery; insertedBattery2.charge -= 0.02f * Time.deltaTime * batteryDrainRate; line.SetPosition(1, ((RaycastHit)(ref val3)).transform.position); if ((double)lastTimeSinceScan + 0.2 < (double)Time.time) { scanArea(((RaycastHit)(ref val3)).transform.position); lastTimeSinceScan = Time.time; } if (lastTimeSincePing + pingdelay < Time.time) { src.PlayOneShot(pingClip); lastTimeSincePing = Time.time; } } else { line.SetPosition(1, ((Component)blankEnd).transform.position); pingdelay = 100f; ((Component)this).GetComponent().startColor = new Color(1f, 1f, 1f, 1f); ((Component)this).GetComponent().endColor = new Color(1f, 1f, 1f, 1f); } } else { line.SetPosition(0, ((Component)blankEnd).transform.position); line.SetPosition(1, ((Component)blankEnd).transform.position); } } public Vector3 navmeshRaycast() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.Normalize(blankEnd.position - ((Component)this).transform.position); NavMeshHit val3 = default(NavMeshHit); for (int i = 0; (float)i < scanSteps; i++) { Vector3 val2 = ((Component)this).transform.position + val * ((float)i * scanPrecision); if (NavMesh.SamplePosition(val2, ref val3, scanPrecision, -1)) { return ((NavMeshHit)(ref val3)).position; } } return Vector3.zero; } public void scanArea(Vector3 position) { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) if (lastTimeSinceFind + 10f < Time.time) { currentObjects = Object.FindObjectsOfType(); currentEnemies = Object.FindObjectsOfType(); currentTeleports = Object.FindObjectsOfType(); lastTimeSinceFind = Time.time; } GameObject val = null; float num = 9999f; string text = ""; GrabbableObject[] array = currentObjects; foreach (GrabbableObject val2 in array) { float num2 = Vector3.Distance(((Component)val2).transform.position, position); if (num2 < num && !val2.isHeld && !val2.isInShipRoom) { if (((Object)val2).name.ToLower().Contains("gold")) { num = num2; text = "gold"; val = ((Component)val2).gameObject; } else { num = num2; text = "object"; val = ((Component)val2).gameObject; } } } EnemyAI[] array2 = currentEnemies; foreach (EnemyAI val3 in array2) { float num3 = Vector3.Distance(((Component)val3).transform.position, position); if (num3 < num) { num = num3; text = "enemy"; val = ((Component)val3).gameObject; } } EntranceTeleport[] array3 = currentTeleports; foreach (EntranceTeleport val4 in array3) { float num4 = Vector3.Distance(((Component)val4).transform.position, position); if (num4 < num) { num = num4; text = "door"; val = ((Component)val4).gameObject; } } Debug.Log((object)("closestObj: " + (object)val)); Debug.Log((object)("closestDistance: " + num)); Debug.Log((object)("closestType: " + text)); if (!((Object)(object)val == (Object)null)) { if (text.Equals("gold")) { ((Component)this).GetComponent().startColor = new Color(1f, 1f, 0f, 1f); ((Component)this).GetComponent().endColor = new Color(1f, 1f, 0f, 1f); } if (text.Equals("object")) { ((Component)this).GetComponent().startColor = new Color(0f, 1f, 0f, 1f); ((Component)this).GetComponent().endColor = new Color(0f, 1f, 0f, 1f); } if (text.Equals("enemy")) { ((Component)this).GetComponent().startColor = new Color(1f, 0f, 0f, 1f); ((Component)this).GetComponent().endColor = new Color(1f, 0f, 0f, 1f); } if (text.Equals("door")) { ((Component)this).GetComponent().startColor = new Color(0f, 0f, 1f, 1f); ((Component)this).GetComponent().endColor = new Color(0f, 0f, 1f, 1f); } pingdelay = num / pingDivisor + minDelay; } } 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(1197722204u, new RpcReceiveHandler(__rpc_handler_1197722204), "spawnLineServerRpc"); ((NetworkBehaviour)this).__registerRpc(2945946867u, new RpcReceiveHandler(__rpc_handler_2945946867), "spawnLineClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_1197722204(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; ((TechRadarItem)(object)target).spawnLineServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2945946867(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; ((TechRadarItem)(object)target).spawnLineClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TechRadarItem"; } } public class MeteorScript : MonoBehaviour { private AudioSource src; public ParticleSystem part; public List collisionEvents; private void Start() { src = ((Component)this).GetComponent(); part = ((Component)this).GetComponent(); collisionEvents = new List(); } private void Update() { } private void OnParticleCollision(GameObject other) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) int num = ParticlePhysicsExtensions.GetCollisionEvents(part, other, collisionEvents); for (int i = 0; i < num; i++) { ParticleCollisionEvent val = collisionEvents[i]; Vector3 intersection = ((ParticleCollisionEvent)(ref val)).intersection; spawnExplosionClientRpc(intersection); } } [ClientRpc] private async void spawnExplosionClientRpc(Vector3 position) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) Landmine.SpawnExplosion(position + Vector3.up, true, 18f, 22f, 50, 0f, (GameObject)null, false); GameObject gSource = new GameObject(); gSource.transform.position = position; AudioSource source = gSource.AddComponent(); source.clip = src.clip; source.priority = src.priority; source.bypassReverbZones = src.bypassReverbZones; source.bypassEffects = src.bypassEffects; source.loop = src.loop; source.playOnAwake = src.playOnAwake; source.spatialBlend = src.spatialBlend; source.volume = src.volume; source.minDistance = src.minDistance; source.maxDistance = src.maxDistance; source.rolloffMode = src.rolloffMode; source.outputAudioMixerGroup = src.outputAudioMixerGroup; source.Play(); await Task.Delay(8000); Object.Destroy((Object)(object)gSource); } } public class Spewer : NetworkBehaviour { public int eruptHour; public int currentHour = -2; public bool noErupt; public int hoursForce = 0; private void Start() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown Spewer[] array = Object.FindObjectsOfType(); Plugin.destroyOnLoad.Add(((Component)this).gameObject); try { ItemDropship val = Object.FindObjectsOfType()[0]; GameObject val2 = new GameObject(); LineRenderer val3 = val2.AddComponent(); val2.SetActive(false); LineRenderer[] ropes = (LineRenderer[])(object)new LineRenderer[1] { val3 }; val.ropes = ropes; } catch (Exception ex) { Debug.LogError((object)ex); } Spewer[] array2 = array; foreach (Spewer spewer in array2) { if ((Object)(object)spewer != (Object)(object)this) { Object.Destroy((Object)(object)spewer); } } GameObject gameObject = ((Component)((Component)this).transform.Find("meteors")).gameObject; gameObject.GetComponent().Stop(); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if ((double)Random.Range(0f, 1f) < 0.5) { eruptHour = 1001; noErupt = true; } else { eruptHour = 2 + Random.Range(2, 17); noErupt = false; } fogTick(); } } private void fogTick() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } int num = eruptHour - getHour(); if (noErupt || num < 0) { setFogColorClientRpc(new Color(0f, 1f, 0.80784315f)); return; } switch (num) { case 0: setFogColorClientRpc(new Color(1f, 47f / 85f, 0f)); break; case 1: setFogColorClientRpc(new Color(1f, 47f / 85f, 0f)); break; case 2: setFogColorClientRpc(new Color(1f, 0f, 0f)); break; case 3: setFogColorClientRpc(new Color(0f, 1f, 0f)); break; case 4: setFogColorClientRpc(new Color(0.9372549f, 1f, 0f)); break; default: setFogColorClientRpc(new Color(0.5294118f, 0f, 1f)); break; } } private int getHour() { return TimeOfDay.Instance.hour; } private void Update() { if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } if (currentHour != getHour()) { if (hoursForce > 0) { hoursForce--; } currentHour = getHour(); fogTick(); GameObject gameObject = ((Component)((Component)this).transform.Find("meteors")).gameObject; if (getHour() == eruptHour) { uint seed = (uint)Random.Range(0, 255000); playParticleSystemClientRpc(seed); } else { stopParticleSystemClientRpc(); } } if (hoursForce > 0) { uint seed2 = (uint)Random.Range(0, 255000); playParticleSystemClientRpc(seed2); } } [ClientRpc] private void setFogColorClientRpc(Color color) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3595457311u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref color); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3595457311u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"MOAI: setFogColorClientRpc Called"); Transform transform = GameObject.Find("VolcanoMeters").transform; foreach (Transform item in transform) { Transform val3 = item; if (((Object)val3).name.Contains("Fog")) { LocalVolumetricFog component = ((Component)val3).GetComponent(); component.parameters.albedo = color; } } } [ClientRpc] private void playParticleSystemClientRpc(uint seed) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(151241951u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, seed); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 151241951u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"MOAI: playParticleSystemClientRpc Called"); GameObject gameObject = ((Component)((Component)this).transform.Find("meteors")).gameObject; ParticleSystem component = gameObject.GetComponent(); component.randomSeed = seed; ((Component)component).GetComponent().Play(); } } } [ClientRpc] private void stopParticleSystemClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(361439863u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 361439863u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"MOAI: stopParticleSystemClientRpc Called"); GameObject gameObject = ((Component)((Component)this).transform.Find("meteors")).gameObject; ParticleSystem component = gameObject.GetComponent(); component.Stop(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3595457311u, new RpcReceiveHandler(__rpc_handler_3595457311), "setFogColorClientRpc"); ((NetworkBehaviour)this).__registerRpc(151241951u, new RpcReceiveHandler(__rpc_handler_151241951), "playParticleSystemClientRpc"); ((NetworkBehaviour)this).__registerRpc(361439863u, new RpcReceiveHandler(__rpc_handler_361439863), "stopParticleSystemClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3595457311(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Color fogColorClientRpc = default(Color); ((FastBufferReader)(ref reader)).ReadValueSafe(ref fogColorClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((Spewer)(object)target).setFogColorClientRpc(fogColorClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_151241951(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) { uint seed = default(uint); ByteUnpacker.ReadValueBitPacked(reader, ref seed); target.__rpc_exec_stage = (__RpcExecStage)1; ((Spewer)(object)target).playParticleSystemClientRpc(seed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_361439863(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; ((Spewer)(object)target).stopParticleSystemClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Spewer"; } } public class SpewerSpawner : MonoBehaviour { private GameObject controller; private int checkLoop = 75; private void Start() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)RoundManager.Instance == (Object)null) && ((NetworkBehaviour)RoundManager.Instance).IsHost) { Debug.Log((object)"IsHost is true, spawning EruptionController"); controller = Object.Instantiate(Plugin.EruptionController, ((Component)this).transform.position, Quaternion.Euler(Vector3.zero)); controller.SetActive(true); NetworkObject component = controller.GetComponent(); if ((Object)(object)component != (Object)null) { component.Spawn(false); Debug.Log((object)"NetworkObject spawned successfully"); } } } private void Update() { if (checkLoop > 0) { checkLoop--; return; } checkLoop = 75; if (!Object.op_Implicit((Object)(object)controller)) { Start(); } } } namespace DayNightCycles { public class DayAndNightCycle : MonoBehaviour { [Header("Time Settings")] [Range(0f, 24f)] [Tooltip("Slider allows you to set the starting time. Range 0-24")] public float currentTime; [Tooltip("Time elapsed multiplier. When set to 1, one second of real time equals one minute of script time. A negative value turns back time.")] public float timeSpeed = 1f; private float timeDivider = 60f; [Header("Current Time")] [Tooltip("Current time in the hh:mm:ss system.")] public string currentTimeString; [Header("Sun Settings")] [Tooltip("A light source simulating the Sun.")] public Light sunLight; [Range(0f, 90f)] [Tooltip("Sun latitude determines the maximum height of the Sun. Range 0-90")] public float sunLatitude = 20f; [Range(-180f, 180f)] [Tooltip("Sun longitude determines position of the Sun. Range -180, 180")] public float sunLongitude = -90f; [Tooltip("Basic Sun intensity value. Together with Sun Intensity Multiplier affects the brightness of the Sun during the cycle.")] public float sunIntensity = 60000f; [Tooltip("Decreases or increases Sun intensity over time. 0 - Midnight | 0.25 - Dawn | 0.5 - Noon | 0.75 - Dusk | 1 - Midnight")] public AnimationCurve sunIntensityMultiplier; [Range(1500f, 7000f)] [Tooltip("Basic Sun temperature value in Kelvin. Together with Sun Temperature Curve affects the temperature of the Sun during the cycle.")] public float sunTemperature = 6500f; [Tooltip("Decreases or increases Sun temperature over time. 0 - Midnight | 0.25 - Dawn | 0.5 - Noon | 0.75 - Dusk | 1 - Midnight")] public AnimationCurve sunTemperatureCurve; [Header("Moon Settings")] [Tooltip("A light source simulating the Moon.")] public Light moonLight; [Range(0f, 90f)] [Tooltip("Moon latitude determines the maximum height of the Moon. For best results, the value should be the same as star latitude. Range 0-90")] public float moonLatitude = 40f; [Range(-180f, 180f)] [Tooltip("Moon longitude determines position of the Moon. For best results, the value should be the same as star longitude. Range -180, 180")] public float moonLongitude = 90f; [Tooltip("Basic moon intensity value. Together with Moon Intensity Multiplier affects the brightness of the Moon during the cycle.")] public float moonIntensity = 12000f; public AnimationCurve moonIntensityMultiplier; [Range(6500f, 20000f)] [Tooltip("Basic Moon temperature value in Kelvin. Together with Moon Temperature Curve affects the temperature of the Moon during the cycle.")] public float moonTemperature = 10000f; [Tooltip("Decreases or increases Moon temperature over time. 0 - Midnight | 0.25 - Dawn | 0.5 - Noon | 0.75 - Dusk | 1 - Midnight")] public AnimationCurve moonTemperatureCurve; [Header("Stars")] public VolumeProfile volumeProfile; private PhysicallyBasedSky skySettings; [Range(0f, 90f)] [Tooltip("Star latitude determines the height of the stars rotation point (Polar Star). Range 0-90")] public float polarStarLatitude = 40f; [Range(-180f, 180f)] [Tooltip("Star longitude determines the position of the stars rotation point (Polar Star). Range -180, 180")] public float polarStarLongitude = 90f; [Tooltip("Star intensity value. Together with Star Curve affects the brightness of the skybox during the cycle.")] public float starsIntensity = 8000f; [Tooltip("Decreases or increases skybox intensity over time. 0 - Midnight | 0.25 - Dawn | 0.5 - Noon | 0.75 - Dusk | 1 - Midnight")] public AnimationCurve starsCurve; [Tooltip("The curve of the horizon tint changing over time")] public AnimationCurve horizonTintCurve; [Tooltip("The curve of the zenit tint changing over time")] public AnimationCurve zenithTintCurve; [Header("Control Indicators")] [Tooltip("Displays a marker whether it is day or night")] public bool isDay = true; [Tooltip("Displays a marker whether it Sun is active or not")] public bool sunActive = true; [Tooltip("Displays a marker whether it Moon is active or not")] public bool moonActive = true; [Header("Moon Activation Trigger")] [Tooltip("Determines when the moon turns on and off.")] public float moonActivationStart = 6.3f; public float moonActivationEnd = 17.7f; private HDAdditionalLightData sunLightData; private HDAdditionalLightData moonLightData; private Light sunLightComponent; private Light moonLightComponent; public GameObject stormyFog; public GameObject normalSun; public GameObject normalVolume; public GameObject eclipseSun; public GameObject eclipseVolume; private float fluxTimer = 10f; public GameObject fluxPrefab; public GameObject mainVolume; public GameObject QuantumVolume; public Light trueLightSource; public static List volumesEnforced = new List(); private void Awake() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Invalid comparison between Unknown and I4 //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) sunLightData = ((Component)sunLight).GetComponent(); moonLightData = ((Component)moonLight).GetComponent(); sunLightComponent = ((Component)sunLight).GetComponent(); moonLightComponent = ((Component)moonLight).GetComponent(); if ((int)StartOfRound.Instance.currentLevel.currentWeather == 2 || (int)StartOfRound.Instance.currentLevel.currentWeather == 1) { stormyFog.SetActive(true); } else { stormyFog.SetActive(false); } if ((int)StartOfRound.Instance.currentLevel.currentWeather == 5) { eclipseSun.SetActive(true); eclipseVolume.SetActive(true); Object.Destroy((Object)(object)normalSun); Object.Destroy((Object)(object)normalVolume); normalSun = eclipseSun; normalVolume = eclipseVolume; enforceOnlyVolume(); } if (EIWeatherManager.assignedWeather.ToLower().Contains("night")) { currentTime = 19.28f; } if (EIWeatherManager.assignedWeather.ToLower().Contains("quantum")) { mainVolume.SetActive(false); QuantumVolume.SetActive(true); trueLightSource.color = new Color(1f, 0.8f, 1f); } try { ClipboardItem[] array = Object.FindObjectsOfType(); ClipboardItem[] array2 = array; foreach (ClipboardItem val in array2) { if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Component)val).gameObject)) { ((Behaviour)val).enabled = false; CUSTOM_ClipboardItem cUSTOM_ClipboardItem = ((Component)val).gameObject.AddComponent(); cUSTOM_ClipboardItem.clipboardAnimator = val.clipboardAnimator; cUSTOM_ClipboardItem.currentPage = val.currentPage; ((GrabbableObject)cUSTOM_ClipboardItem).currentUseCooldown = ((GrabbableObject)val).currentUseCooldown; ((GrabbableObject)cUSTOM_ClipboardItem).customGrabTooltip = ((GrabbableObject)val).customGrabTooltip; ((GrabbableObject)cUSTOM_ClipboardItem).fallTime = ((GrabbableObject)val).fallTime; ((GrabbableObject)cUSTOM_ClipboardItem).floorYRot = ((GrabbableObject)val).floorYRot; ((GrabbableObject)cUSTOM_ClipboardItem).grabbable = ((GrabbableObject)val).grabbable; ((GrabbableObject)cUSTOM_ClipboardItem).grabbableToEnemies = ((GrabbableObject)val).grabbableToEnemies; ((GrabbableObject)cUSTOM_ClipboardItem).scrapValue = ((GrabbableObject)val).scrapValue; ((GrabbableObject)cUSTOM_ClipboardItem).startFallingPosition = ((GrabbableObject)val).startFallingPosition; ((GrabbableObject)cUSTOM_ClipboardItem).targetFloorPosition = ((GrabbableObject)val).targetFloorPosition; cUSTOM_ClipboardItem.thisAudio = val.thisAudio; cUSTOM_ClipboardItem.truckManual = val.truckManual; cUSTOM_ClipboardItem.turnPageSFX = val.turnPageSFX; ((GrabbableObject)cUSTOM_ClipboardItem).useCooldown = ((GrabbableObject)val).useCooldown; ((GrabbableObject)cUSTOM_ClipboardItem).isInShipRoom = ((GrabbableObject)val).isInShipRoom; ((GrabbableObject)cUSTOM_ClipboardItem).isInFactory = ((GrabbableObject)val).isInFactory; ((GrabbableObject)cUSTOM_ClipboardItem).isInElevator = ((GrabbableObject)val).isInElevator; ((GrabbableObject)cUSTOM_ClipboardItem).isHeld = ((GrabbableObject)val).isHeld; ((GrabbableObject)cUSTOM_ClipboardItem).isHeldByEnemy = ((GrabbableObject)val).isHeldByEnemy; ((GrabbableObject)cUSTOM_ClipboardItem).mainObjectRenderer = ((GrabbableObject)val).mainObjectRenderer; ((GrabbableObject)cUSTOM_ClipboardItem).propBody = ((GrabbableObject)val).propBody; ((GrabbableObject)cUSTOM_ClipboardItem).parentObject = ((GrabbableObject)val).parentObject; ((GrabbableObject)cUSTOM_ClipboardItem).radarIcon = ((GrabbableObject)val).radarIcon; ((GrabbableObject)cUSTOM_ClipboardItem).itemProperties = ((GrabbableObject)val).itemProperties; ((GrabbableObject)cUSTOM_ClipboardItem).isPocketed = ((GrabbableObject)val).isPocketed; ((GrabbableObject)cUSTOM_ClipboardItem).reachedFloorTarget = ((GrabbableObject)val).reachedFloorTarget; ((GrabbableObject)cUSTOM_ClipboardItem).scrapPersistedThroughRounds = ((GrabbableObject)val).scrapPersistedThroughRounds; ((GrabbableObject)cUSTOM_ClipboardItem).rotateObject = ((GrabbableObject)val).rotateObject; ((GrabbableObject)cUSTOM_ClipboardItem).wasOwnerLastFrame = ((GrabbableObject)val).wasOwnerLastFrame; } } } catch (Exception) { Debug.LogError((object)"LegendOfTheMoai Error: Clipboard patch failure. Might cause increased lag on EI."); } } private void enforceOnlyVolume() { Volume[] array = Object.FindObjectsOfType(); Volume[] array2 = array; foreach (Volume val in array2) { if (((Object)val).name.ToLower().Contains("main") && ((Object)val).name.ToLower().Contains("volume")) { ((Behaviour)val).enabled = false; volumesEnforced.Add(val); } } } private void Update() { currentTime += Time.deltaTime * timeSpeed / timeDivider; if (currentTime >= 24f) { currentTime = 0f; } if (currentTime < 0f) { currentTime = 23.99999f; } UpdateTimeText(); UpdateLight(); CheckShadowStatus(); SkyStar(); if (EIWeatherManager.assignedWeather.ToLower().Contains("quantum")) { fluxTimer -= Time.deltaTime; } if (fluxTimer < 0f) { fluxTimer = 10f; QuantumBurst(); } } private async void QuantumBurst() { Debug.Log((object)"EASTER ISLAND: Quantum Burst Activated"); int randDelay = new Random().Next(0, 2000); int fluxCount = new Random().Next(0, 10); for (int i = 0; i < fluxCount; i++) { GameObject GO = Object.Instantiate(fluxPrefab, selectQuantumPos(), fluxPrefab.transform.rotation); GO.GetComponent().Spawn(false); await Task.Delay(randDelay); } } private Vector3 selectQuantumPos() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0081: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_00bc: 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_00cb: Unknown result type (might be due to invalid IL or missing references) Random random = new Random(); GameObject[] outsideAINodes = RoundManager.Instance.outsideAINodes; Vector3 position = outsideAINodes[random.Next(0, outsideAINodes.Length)].transform.position; float num = (float)(random.NextDouble() * 10.0 - 5.0); float num2 = (float)(random.NextDouble() * 10.0 - 5.0); float num3 = (float)(random.NextDouble() * 10.0 - 5.0); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(position.x + num, position.y + num2, position.z + num3); NavMeshHit val2 = default(NavMeshHit); if (NavMesh.SamplePosition(val, ref val2, 30f, -1)) { return ((NavMeshHit)(ref val2)).position; } return position; } private void OnValidate() { if ((((Object)(object)sunLightData == (Object)null) & ((Object)(object)sunLightComponent == (Object)null)) || (((Object)(object)moonLightData == (Object)null) & ((Object)(object)moonLightComponent == (Object)null))) { Awake(); } UpdateLight(); CheckShadowStatus(); SkyStar(); } private void UpdateTimeText() { currentTimeString = Mathf.Floor(currentTime).ToString("00") + ":" + Mathf.Floor(currentTime * 60f % 60f).ToString("00") + ":" + Mathf.Floor(currentTime * 3600f % 60f).ToString("00"); } private void UpdateLight() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00aa: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)eclipseSun == (Object)(object)normalSun)) { float num = currentTime / 24f * 360f; ((Component)sunLight).transform.localRotation = Quaternion.Euler(sunLatitude - 90f, sunLongitude, 0f) * Quaternion.Euler(0f, num, 0f); ((Component)moonLight).transform.localRotation = Quaternion.Euler(90f - moonLatitude, moonLongitude, 0f) * Quaternion.Euler(0f, num, 0f); float num2 = currentTime / 24f; float num3 = sunIntensityMultiplier.Evaluate(num2); float num4 = moonIntensityMultiplier.Evaluate(num2); float num5 = sunTemperatureCurve.Evaluate(num2); float num6 = moonTemperatureCurve.Evaluate(num2); if ((Object)(object)sunLightData != (Object)null) { sunLightData.intensity = num3 * sunIntensity; } if ((Object)(object)moonLightData != (Object)null) { moonLightData.intensity = num4 * moonIntensity; } if ((Object)(object)sunLightComponent != (Object)null) { sunLightComponent.colorTemperature = num5 * sunTemperature; } if ((Object)(object)moonLightComponent != (Object)null) { moonLightComponent.colorTemperature = num6 * moonTemperature; } } } private void CheckShadowStatus() { if (!((Object)(object)eclipseSun == (Object)(object)normalSun)) { float num = currentTime; if (num >= 5.9f && num <= 18.1f) { sunLightData.EnableShadows(true); moonLightData.EnableShadows(false); isDay = true; } else { sunLightData.EnableShadows(false); moonLightData.EnableShadows(true); isDay = false; } if (num >= 5.7f && num <= 18.3f) { ((Component)sunLight).gameObject.SetActive(true); sunActive = true; } else { ((Component)sunLight).gameObject.SetActive(false); sunActive = false; } if (num >= moonActivationStart && num <= moonActivationEnd) { ((Component)moonLight).gameObject.SetActive(false); moonActive = false; } else { ((Component)moonLight).gameObject.SetActive(true); moonActive = true; } } } private void SkyStar() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) volumeProfile.TryGet(ref skySettings); ((VolumeParameter)(object)skySettings.spaceEmissionMultiplier).value = starsCurve.Evaluate(currentTime / 24f) * starsIntensity; Vector3Parameter spaceRotation = skySettings.spaceRotation; Quaternion val = Quaternion.Euler(90f - polarStarLatitude, polarStarLongitude, 0f) * Quaternion.Euler(0f, currentTime / 24f * 360f, 60f); ((VolumeParameter)(object)spaceRotation).value = ((Quaternion)(ref val)).eulerAngles; float num = horizonTintCurve.Evaluate(currentTime / 24f); ((VolumeParameter)(object)skySettings.horizonTint).value = new Color(num, num, num); float num2 = zenithTintCurve.Evaluate(currentTime / 24f); ((VolumeParameter)(object)skySettings.zenithTint).value = new Color(num2, num2, num2); } } } namespace MoaiEnemy.src.MoaiNormal { public class PlasmaBall : NetworkBehaviour { public Gradient ballColor; public Gradient trailColor; public float speed; [Range(0f, 10f)] public float moveDelay; public GameObject explosionEffect; private bool hasDamagedBoss = false; private bool canMove = false; private Animator anim; private List ballPS; private List trailPS; private float creationTime = -1f; private float explosionTime = -1f; public AudioSource laserHit; private List explosions; public int owner; protected float selfCollisionThreshold = 0.25f; private void Start() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) GetRequiredComponents(); SetParticleColors(); if ((Object)(object)anim != (Object)null) { anim.SetFloat("speedMultiplier", speed); } ((MonoBehaviour)this).Invoke("MovementStatus", moveDelay); creationTime = Time.time; explosions = new List(); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { ((Component)this).GetComponent().isKinematic = false; ((Component)this).GetComponent().velocity = ((Component)this).transform.forward * speed; } } private void FixedUpdate() { if (((NetworkBehaviour)RoundManager.Instance).IsHost && ((explosionTime != -1f && Time.time - explosionTime > 3f) || Time.time - creationTime > 30f)) { for (int i = 0; i < explosions.Count; i++) { Object.Destroy((Object)(object)explosions[i]); } Object.Destroy((Object)(object)((Component)this).gameObject); } } private void OnCollisionEnter(Collision collision) { if (!((NetworkBehaviour)RoundManager.Instance).IsHost || Time.time - creationTime < selfCollisionThreshold) { return; } GameObject gameObject = collision.gameObject; if (Object.op_Implicit((Object)(object)collision.gameObject)) { spawnExplosionClientRpc(); EnemyAI val = enemyParentWalk(gameObject); if (Object.op_Implicit((Object)(object)val) && ((Object)val).GetInstanceID() != owner) { val.HitEnemy(8, (PlayerControllerB)null, true, -1); } PlayerControllerB val2 = playerParentWalk(gameObject); if (Object.op_Implicit((Object)(object)val2)) { dmgPlayerClientRpc(((NetworkBehaviour)val2).NetworkObjectId); } } else if (Object.op_Implicit((Object)(object)collision.collider)) { spawnExplosionClientRpc(); } } private void OnTriggerEnter(Collider other) { if (!((NetworkBehaviour)RoundManager.Instance).IsHost || Time.time - creationTime < selfCollisionThreshold) { return; } GameObject gameObject = ((Component)other).gameObject; if (Object.op_Implicit((Object)(object)gameObject)) { Debug.Log((object)("PlasmaBall triggered by: " + ((Object)gameObject).name)); spawnExplosionClientRpc(); EnemyAI val = enemyParentWalk(gameObject); if (Object.op_Implicit((Object)(object)val) && ((Object)val).GetInstanceID() != owner) { Debug.Log((object)("PlasmaBall triggered enemyAI: " + ((Object)val).name)); val.HitEnemy(8, (PlayerControllerB)null, true, -1); } PlayerControllerB val2 = playerParentWalk(gameObject); if (Object.op_Implicit((Object)(object)val2)) { Debug.Log((object)("PlasmaBall triggered player: " + val2.playerUsername)); dmgPlayerClientRpc(((NetworkBehaviour)val2).NetworkObjectId); } } else { spawnExplosionClientRpc(); } } [ClientRpc] private void dmgPlayerClientRpc(ulong nid) { //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) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(22814628u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, nid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 22814628u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val3 in allPlayerScripts) { if (((NetworkBehaviour)val3).NetworkObjectId == nid) { val3.DamagePlayer(20, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } } } [ClientRpc] private void spawnExplosionClientRpc() { //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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1595928132u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1595928132u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; canMove = false; explosionTime = Time.time; GameObject val3 = Object.Instantiate(explosionEffect); val3.transform.position = ((Component)this).transform.position; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { explosions.Add(val3); } laserHit.Play(); Landmine.SpawnExplosion(((Component)this).transform.position, true, 9f, 12f, 30, 40f, (GameObject)null, true); if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } CompanyFightScript[] array = Object.FindObjectsOfType(); CompanyFightScript[] array2 = array; foreach (CompanyFightScript companyFightScript in array2) { Vector3 position = companyFightScript.companyHitBox.transform.position; if (Vector3.Distance(((Component)this).transform.position, position) <= 12f && !hasDamagedBoss) { hasDamagedBoss = true; if (!CompanyFightScript.hostile) { companyFightScript.beginFight(); } else { companyFightScript.takeDamage(5); } } } } public PlayerControllerB playerParentWalk(GameObject leaf) { while ((Object)(object)leaf != (Object)null && (Object)(object)leaf.GetComponent() == (Object)null) { leaf = ((!Object.op_Implicit((Object)(object)leaf.transform.parent) || !Object.op_Implicit((Object)(object)((Component)leaf.transform.parent).gameObject)) ? null : ((Component)leaf.transform.parent).gameObject); } if (Object.op_Implicit((Object)(object)leaf) && Object.op_Implicit((Object)(object)leaf.GetComponent())) { return leaf.GetComponent(); } return null; } public EnemyAI enemyParentWalk(GameObject leaf) { while ((Object)(object)leaf != (Object)null && (Object)(object)leaf.GetComponent() == (Object)null) { leaf = ((!Object.op_Implicit((Object)(object)leaf.transform.parent) || !Object.op_Implicit((Object)(object)((Component)leaf.transform.parent).gameObject)) ? null : ((Component)leaf.transform.parent).gameObject); } if (Object.op_Implicit((Object)(object)leaf) && Object.op_Implicit((Object)(object)leaf.GetComponent())) { return leaf.GetComponent(); } return null; } private void GetRequiredComponents() { ParticleSystem[] componentsInChildren = ((Component)this).GetComponentsInChildren(); anim = ((Component)this).GetComponentInChildren(); if (componentsInChildren == null) { Debug.LogError((object)("Missing Particle System: No Particle System was found inside" + ((object)((Component)this).gameObject).ToString())); return; } ballPS = new List(); trailPS = new List(); for (int i = 0; i < componentsInChildren.Length; i++) { if (((Object)((Component)componentsInChildren[i]).gameObject).name == "Ball") { ballPS.Add(componentsInChildren[i]); } else if (((Object)((Component)componentsInChildren[i]).gameObject).name == "Trail") { trailPS.Add(componentsInChildren[i]); } } } private void SetParticleColors() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < ballPS.Count; i++) { ColorOverLifetimeModule colorOverLifetime = ballPS[i].colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = new MinMaxGradient(ballColor); } for (int j = 0; j < trailPS.Count; j++) { ColorOverLifetimeModule colorOverLifetime2 = trailPS[j].colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime2)).color = new MinMaxGradient(trailColor); } } private void MovementStatus() { canMove = true; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(22814628u, new RpcReceiveHandler(__rpc_handler_22814628), "dmgPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(1595928132u, new RpcReceiveHandler(__rpc_handler_1595928132), "spawnExplosionClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_22814628(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong nid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref nid); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlasmaBall)(object)target).dmgPlayerClientRpc(nid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1595928132(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; ((PlasmaBall)(object)target).spawnExplosionClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PlasmaBall"; } } } namespace EasterIsland { internal class ConfigModel { public static ConfigEntry moaiGlobalSize; public static ConfigEntry moaiGlobalMusicVol; public static ConfigEntry moaiGlobalRarity; public static ConfigEntry moaiGlobalSpeed; public static void setupConfig() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0028: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0050: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0078: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007e: 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_008e: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00a0: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown ConfigEntry obj = moaiGlobalSize; FloatSliderOptions val = new FloatSliderOptions(); ((BaseRangeOptions)val).Min = 0.05f; ((BaseRangeOptions)val).Max = 5f; FloatSliderConfigItem val2 = new FloatSliderConfigItem(obj, val); ConfigEntry obj2 = moaiGlobalMusicVol; FloatSliderOptions val3 = new FloatSliderOptions(); ((BaseRangeOptions)val3).Min = 0f; ((BaseRangeOptions)val3).Max = 2f; FloatSliderConfigItem val4 = new FloatSliderConfigItem(obj2, val3); ConfigEntry obj3 = moaiGlobalRarity; FloatSliderOptions val5 = new FloatSliderOptions(); ((BaseRangeOptions)val5).Min = 0f; ((BaseRangeOptions)val5).Max = 10f; FloatSliderConfigItem val6 = new FloatSliderConfigItem(obj3, val5); ConfigEntry obj4 = moaiGlobalSpeed; FloatSliderOptions val7 = new FloatSliderOptions(); ((BaseRangeOptions)val7).Min = 0f; ((BaseRangeOptions)val7).Max = 5f; FloatSliderConfigItem val8 = new FloatSliderConfigItem(obj4, val7); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("LegendOfTheMoai", "Legend of The Moai", "1.8.8")] public class Plugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__40_0; public static hook_LoadNewLevel <>9__40_1; public static hook_DespawnPropsAtEndOfRound <>9__40_2; public static hook_OnClientConnect <>9__40_7; public static hook_BeginUsingTerminal <>9__40_9; internal bool b__40_0(Assembly a) { return a.GetName().Name.ToLower().Contains("weatherregistry"); } internal void b__40_1(orig_LoadNewLevel orig, RoundManager self, int randomSeed, SelectableLevel newLevel) { orig.Invoke(self, randomSeed, newLevel); try { foreach (GameObject item in destroyOnLoad) { if (Object.op_Implicit((Object)(object)item)) { Object.Destroy((Object)(object)item); } } QuantumItemScript.itemsTeleportedTo.Clear(); PortalScript.instances.Clear(); string text = newLevel.PlanetName.ToLower(); if (text.Contains("easter") && text.Contains("island")) { try { Weight_Adjuster.adjustRarities(newLevel); } catch (Exception ex) { Debug.LogError((object)("Easter Island Error: Failed to adjust spawn weights of critical items! " + ex)); } } } catch (Exception) { } if (HeavenLoader.isSceneLoaded) { HeavenLoader.UnloadHeavenWorld(); } } internal void b__40_2(orig_DespawnPropsAtEndOfRound orig, RoundManager self, bool despawnAllItems) { orig.Invoke(self, despawnAllItems); try { foreach (GameObject item in destroyOnLoad) { if (Object.op_Implicit((Object)(object)item)) { Object.Destroy((Object)(object)item); } } if (HeavenLoader.isSceneLoaded) { HeavenLoader.UnloadHeavenWorld(); } } catch (Exception) { } } internal void b__40_7(orig_OnClientConnect orig, StartOfRound self, ulong clientId) { try { if (Object.op_Implicit((Object)(object)weatherScript) && !Object.op_Implicit((Object)(object)((Component)weatherScript).gameObject)) { Object.Destroy((Object)(object)weatherScript); } if (Object.op_Implicit((Object)(object)weatherScript) && Object.op_Implicit((Object)(object)((Component)weatherScript).gameObject)) { Object.Destroy((Object)(object)((Component)weatherScript).gameObject); } } catch (Exception) { } orig.Invoke(self, clientId); } internal void b__40_9(orig_BeginUsingTerminal orig, Terminal self) { terminal = self; try { if (Object.op_Implicit((Object)(object)easterislandNode)) { easterislandNode.itemCost = easterIslandCost.Value; } else { attemptGetIslandNode(); if (Object.op_Implicit((Object)(object)easterislandNode)) { easterislandNode.itemCost = easterIslandCost.Value; } if (Object.op_Implicit((Object)(object)easterrouteNode)) { easterrouteNode.itemCost = easterIslandCost.Value; } } } catch (Exception ex) { Debug.LogError((object)ex); } orig.Invoke(self); } } public static Harmony _harmony; public static EnemyType ExampleEnemy; public static ManualLogSource Logger; public static AssetBundle easterislandBundle; public static AssetBundle heavenNetBundle; public static GameObject EruptionController; public static GameObject CannonConstructor; public static GameObject CannonBall; public static GameObject DualPortal; private int quantumPropertyIDMatch = 1144122785; public static GameObject PartHawkWings; public static GameObject PartDogHead; public static GameObject HeavenBase; public static GameObject GoldenHead; public static Item GoldenHeadItem; public static GameObject GHFPrefab; public static Item GHFItem; public static GameObject MorshuPrefab; public static Item MorshuItem; public static GameObject KingPrefab; public static Item KingItem; public static GameObject PlasmaCannonPrefab; public static Item PlasmaCannonItem; public static GameObject QuantumPaintingPrefab; public static Item QuantumPaintingItem; public static GameObject QuantumEnergyPrefab; public static Item QuantumEnergyItem; private long seedSync = -1L; public static List highPlayers = new List(); public static GameObject EatenGumPrefab; public static GameObject portalPair; public static Terminal terminal; public static GameObject weatherManagerAsset; public static GameObject weatherManager; public static EIWeatherManager weatherScript; internal static InputMap controls; public static TerminalNode easterislandNode = null; public static TerminalNode easterrouteNode = null; public static List destroyOnLoad = new List(); public static ConfigEntry easterIslandCost; public static ConfigEntry nightfallChance; public static ConfigEntry quantumStormChance; public static ConfigEntry spawnOverride; public void LogIfDebugBuild(string text) { Logger.LogInfo((object)text); } private void Awake() { //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Expected O, but got Unknown //IL_05c0: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Expected O, but got Unknown //IL_05d2: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Expected O, but got Unknown //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Expected O, but got Unknown //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_0600: Expected O, but got Unknown //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Expected O, but got Unknown //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Expected O, but got Unknown //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_061a: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Expected O, but got Unknown //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Expected O, but got Unknown Logger = ((BaseUnityPlugin)this).Logger; PopulateAssets(); bindVars(); bool flag = AppDomain.CurrentDomain.GetAssemblies().Any((Assembly a) => a.GetName().Name.ToLower().Contains("weatherregistry")); Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods; try { methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); } catch { continue; } MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes; try { customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); } catch { continue; } if (customAttributes.Length != 0) { try { methodInfo.Invoke(null, null); } catch (Exception ex) { Debug.LogError((object)("LegendOfTheMoai: Failed to invoke " + methodInfo.Name + ": " + ex.Message)); } } } } try { _harmony = new Harmony("bcs4313.legendofthemoai"); _harmony.PatchAll(); } catch (Exception ex2) { Debug.LogError((object)("LegendOfTheMoai: Weather patch failure. This can cause general issues with Easter Island weather! " + ex2.ToString())); } EruptionController = easterislandBundle.LoadAsset("EruptionController"); portalPair = easterislandBundle.LoadAsset("PortalPair"); CannonConstructor = easterislandBundle.LoadAsset("CannonConstructor"); CannonBall = easterislandBundle.LoadAsset("PlasmaBall01"); DualPortal = easterislandBundle.LoadAsset("DualPortal"); EatenGumPrefab = easterislandBundle.LoadAsset("EatenGumGum"); PartHawkWings = heavenNetBundle.LoadAsset("PartHawkWings"); PartDogHead = heavenNetBundle.LoadAsset("PartMouthDogHead"); HeavenBase = heavenNetBundle.LoadAsset("HeavenInsideBase"); try { GoldenHead = easterislandBundle.LoadAsset("GoldenHeadItemInside"); GoldenHeadItem = easterislandBundle.LoadAsset("Golden Head"); Items.RegisterScrap(GoldenHeadItem, 0, (LevelTypes)1); NetworkPrefabs.RegisterNetworkPrefab(GoldenHead); } catch (Exception ex3) { Debug.LogError((object)("LegendOfTheMoai Error: " + ex3)); } try { GHFPrefab = easterislandBundle.LoadAsset("TechRadarPrefab"); GHFItem = easterislandBundle.LoadAsset("TechRadarItem"); Items.RegisterScrap(GHFItem, 0, (LevelTypes)1); NetworkPrefabs.RegisterNetworkPrefab(GHFPrefab); } catch (Exception ex4) { Debug.LogError((object)("LegendOfTheMoai Error: " + ex4)); } try { MorshuPrefab = easterislandBundle.LoadAsset("MorshuPrefab"); MorshuItem = easterislandBundle.LoadAsset("MorshuItem"); Items.RegisterScrap(MorshuItem, 0, (LevelTypes)1); NetworkPrefabs.RegisterNetworkPrefab(MorshuPrefab); } catch (Exception ex5) { Debug.LogError((object)("LegendOfTheMoai Error: " + ex5)); } try { KingPrefab = easterislandBundle.LoadAsset("KingPrefab"); KingItem = easterislandBundle.LoadAsset("KingItem"); Items.RegisterScrap(KingItem, 0, (LevelTypes)1); NetworkPrefabs.RegisterNetworkPrefab(KingPrefab); } catch (Exception ex6) { Debug.LogError((object)("LegendOfTheMoai Error: " + ex6)); } try { PlasmaCannonPrefab = easterislandBundle.LoadAsset("Quantum_Cannon"); PlasmaCannonItem = easterislandBundle.LoadAsset("QuantumCannon"); Items.RegisterScrap(PlasmaCannonItem, 0, (LevelTypes)1); NetworkPrefabs.RegisterNetworkPrefab(PlasmaCannonPrefab); } catch (Exception ex7) { Debug.LogError((object)("LegendOfTheMoai Error: " + ex7)); } try { QuantumPaintingPrefab = easterislandBundle.LoadAsset("QuantamItemTest2"); QuantumPaintingItem = easterislandBundle.LoadAsset("QuantumPainting"); Items.RegisterScrap(QuantumPaintingItem, 0, (LevelTypes)1); NetworkPrefabs.RegisterNetworkPrefab(QuantumPaintingPrefab); } catch (Exception ex8) { Debug.LogError((object)("LegendOfTheMoai Error: " + ex8)); } try { QuantumEnergyPrefab = easterislandBundle.LoadAsset("QuantumItem"); QuantumEnergyItem = easterislandBundle.LoadAsset("QuantumItemDef"); Items.RegisterScrap(QuantumEnergyItem, 0, (LevelTypes)1); NetworkPrefabs.RegisterNetworkPrefab(QuantumEnergyPrefab); } catch (Exception ex9) { Debug.LogError((object)("LegendOfTheMoai Error: " + ex9)); } Random.InitState((int)DateTime.Now.Ticks); NetworkPrefabs.RegisterNetworkPrefab(EruptionController); NetworkPrefabs.RegisterNetworkPrefab(portalPair); NetworkPrefabs.RegisterNetworkPrefab(CannonConstructor); NetworkPrefabs.RegisterNetworkPrefab(CannonBall); NetworkPrefabs.RegisterNetworkPrefab(DualPortal); NetworkPrefabs.RegisterNetworkPrefab(EatenGumPrefab); NetworkPrefabs.RegisterNetworkPrefab(PartDogHead); NetworkPrefabs.RegisterNetworkPrefab(PartHawkWings); NetworkPrefabs.RegisterNetworkPrefab(HeavenBase); weatherManagerAsset = easterislandBundle.LoadAsset("EIWeatherManager"); NetworkPrefabs.RegisterNetworkPrefab(weatherManagerAsset); object obj3 = <>c.<>9__40_1; if (obj3 == null) { hook_LoadNewLevel val = delegate(orig_LoadNewLevel orig, RoundManager self, int randomSeed, SelectableLevel newLevel) { orig.Invoke(self, randomSeed, newLevel); try { foreach (GameObject item in destroyOnLoad) { if (Object.op_Implicit((Object)(object)item)) { Object.Destroy((Object)(object)item); } } QuantumItemScript.itemsTeleportedTo.Clear(); PortalScript.instances.Clear(); string text = newLevel.PlanetName.ToLower(); if (text.Contains("easter") && text.Contains("island")) { try { Weight_Adjuster.adjustRarities(newLevel); } catch (Exception ex18) { Debug.LogError((object)("Easter Island Error: Failed to adjust spawn weights of critical items! " + ex18)); } } } catch (Exception) { } if (HeavenLoader.isSceneLoaded) { HeavenLoader.UnloadHeavenWorld(); } }; <>c.<>9__40_1 = val; obj3 = (object)val; } RoundManager.LoadNewLevel += (hook_LoadNewLevel)obj3; object obj4 = <>c.<>9__40_2; if (obj4 == null) { hook_DespawnPropsAtEndOfRound val2 = delegate(orig_DespawnPropsAtEndOfRound orig, RoundManager self, bool despawnAllItems) { orig.Invoke(self, despawnAllItems); try { foreach (GameObject item2 in destroyOnLoad) { if (Object.op_Implicit((Object)(object)item2)) { Object.Destroy((Object)(object)item2); } } if (HeavenLoader.isSceneLoaded) { HeavenLoader.UnloadHeavenWorld(); } } catch (Exception) { } }; <>c.<>9__40_2 = val2; obj4 = (object)val2; } RoundManager.DespawnPropsAtEndOfRound += (hook_DespawnPropsAtEndOfRound)obj4; TimeOfDay.CalculatePlanetTime += (hook_CalculatePlanetTime)delegate(orig_CalculatePlanetTime orig, TimeOfDay self, SelectableLevel level) { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Invalid comparison between Unknown and I4 float result = orig.Invoke(self, level); try { if (Object.op_Implicit((Object)(object)StartOfRound.Instance) && StartOfRound.Instance.randomMapSeed != seedSync) { seedSync = StartOfRound.Instance.randomMapSeed; try { List list = new List(); if (DayAndNightCycle.volumesEnforced.Count > 0 && Object.op_Implicit((Object)(object)StartOfRound.Instance.currentLevel) && (!StartOfRound.Instance.currentLevel.PlanetName.ToLower().Contains("easter") || (int)StartOfRound.Instance.currentLevel.currentWeather != 5)) { foreach (Volume item3 in DayAndNightCycle.volumesEnforced) { if ((Object)(object)item3 != (Object)null) { ((Behaviour)item3).enabled = true; list.Add(item3); } } for (int num5 = 0; num5 < list.Count; num5++) { if (DayAndNightCycle.volumesEnforced.Contains(list[num5])) { DayAndNightCycle.volumesEnforced.Remove(list[num5]); } } } } catch (Exception ex15) { Debug.LogError((object)ex15); } } } catch (Exception) { } return result; }; StunGrenadeItem.ExplodeStunGrenade += (hook_ExplodeStunGrenade)delegate(orig_ExplodeStunGrenade orig, StunGrenadeItem self, bool destroy) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: 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) orig.Invoke(self, destroy); if (!((NetworkBehaviour)RoundManager.Instance).IsServer) { return; } try { foreach (PortalScript instance in PortalScript.instances) { GameObject gameObject3 = ((Component)instance).gameObject; if (Vector3.Distance(gameObject3.transform.position, ((Component)self).transform.position) < 4f) { Logger.LogInfo((object)"Moai Portal: Checking nearby objects to quantumfy"); GrabbableObject[] array9 = Object.FindObjectsOfType(false); foreach (GrabbableObject val9 in array9) { if (Vector3.Distance(((Component)val9).transform.position, ((Component)self).transform.position) < 4f && ((Behaviour)val9).isActiveAndEnabled) { Logger.LogInfo((object)("Moai Portal: Object found: " + ((Object)val9).name + " ... quantumfying")); if (!Object.op_Implicit((Object)(object)((Component)((Component)val9).transform).GetComponentInChildren())) { GameObject val10 = Object.Instantiate(getQuantumItemRegisteredPrefab()); val10.GetComponent().Spawn(false); quantumLoop(val9, val10); } } } } } QuantumItemScript[] array10 = Object.FindObjectsOfType(); QuantumItemScript[] array11 = array10; foreach (QuantumItemScript quantumItemScript2 in array11) { GameObject gameObject4 = ((Component)quantumItemScript2).gameObject; if (Vector3.Distance(gameObject4.transform.position, ((Component)self).transform.position) < 4f) { Logger.LogInfo((object)"Quantum Object: Checking nearby objects to quantumfy"); GrabbableObject[] array12 = Object.FindObjectsOfType(false); foreach (GrabbableObject val11 in array12) { if (Vector3.Distance(((Component)val11).transform.position, ((Component)self).transform.position) < 4f && ((Behaviour)val11).isActiveAndEnabled) { Logger.LogInfo((object)("Moai Portal: Object found: " + ((Object)val11).name + " ... quantumfying")); if (!Object.op_Implicit((Object)(object)((Component)((Component)val11).transform).GetComponentInChildren())) { GameObject val12 = Object.Instantiate(getQuantumItemRegisteredPrefab()); val12.GetComponent().Spawn(false); quantumLoop(val11, val12); } } } } } NuclearBomb[] array13 = Object.FindObjectsOfType(); NuclearBomb[] array14 = array13; foreach (NuclearBomb nuclearBomb2 in array14) { if (Vector3.Distance(((Component)self).transform.position, ((Component)nuclearBomb2).transform.position) < 7.2f) { nuclearBomb2.dangerLevel++; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { nuclearBomb2.dangerResultActivateClientRpc(nuclearBomb2.dangerLevel); } } } } catch (Exception ex14) { Debug.LogError((object)ex14); } }; Landmine.SpawnExplosion += (hook_SpawnExplosion)delegate(orig_SpawnExplosion orig, Vector3 explosionPosition, bool spawnExplosionEffect, float killRange, float damageRange, int nonLethalDamage, float physicsForce, GameObject overridePrefab, bool goThroughCar) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(explosionPosition, spawnExplosionEffect, killRange, damageRange, nonLethalDamage, physicsForce, overridePrefab, goThroughCar); if (!((NetworkBehaviour)RoundManager.Instance).IsServer) { return; } try { foreach (PortalScript instance2 in PortalScript.instances) { GameObject gameObject = ((Component)instance2).gameObject; if (Vector3.Distance(gameObject.transform.position, explosionPosition) < 4f) { Logger.LogInfo((object)"Moai Portal: Checking nearby objects to quantumfy"); GrabbableObject[] array3 = Object.FindObjectsOfType(false); foreach (GrabbableObject val5 in array3) { if (Vector3.Distance(((Component)val5).transform.position, explosionPosition) < 4f && ((Behaviour)val5).isActiveAndEnabled) { Logger.LogInfo((object)("Moai Portal: Object found: " + ((Object)val5).name + " ... quantumfying")); if (!Object.op_Implicit((Object)(object)((Component)((Component)val5).transform).GetComponentInChildren())) { GameObject val6 = Object.Instantiate(getQuantumItemRegisteredPrefab()); val6.GetComponent().Spawn(false); quantumLoop(val5, val6); } } } } } QuantumItemScript[] array4 = Object.FindObjectsOfType(); QuantumItemScript[] array5 = array4; foreach (QuantumItemScript quantumItemScript in array5) { GameObject gameObject2 = ((Component)quantumItemScript).gameObject; if (Vector3.Distance(gameObject2.transform.position, explosionPosition) < 4f) { Logger.LogInfo((object)"Quantum Object: Checking nearby objects to quantumfy"); GrabbableObject[] array6 = Object.FindObjectsOfType(false); foreach (GrabbableObject val7 in array6) { if (Vector3.Distance(((Component)val7).transform.position, explosionPosition) < 4f && ((Behaviour)val7).isActiveAndEnabled) { Logger.LogInfo((object)("Moai Portal: Object found: " + ((Object)val7).name + " ... quantumfying")); if (!Object.op_Implicit((Object)(object)((Component)((Component)val7).transform).GetComponentInChildren())) { GameObject val8 = Object.Instantiate(getQuantumItemRegisteredPrefab()); val8.GetComponent().Spawn(false); quantumLoop(val7, val8); } } } } } NuclearBomb[] array7 = Object.FindObjectsOfType(); NuclearBomb[] array8 = array7; foreach (NuclearBomb nuclearBomb in array8) { if (Vector3.Distance(explosionPosition, ((Component)nuclearBomb).transform.position) < 7.2f) { nuclearBomb.dangerLevel += 2; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { nuclearBomb.dangerResultActivateClientRpc(nuclearBomb.dangerLevel); } } if (Vector3.Distance(explosionPosition, ((Component)nuclearBomb).transform.position) < 4f) { nuclearBomb.dangerLevel += 2; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { nuclearBomb.dangerResultActivateClientRpc(nuclearBomb.dangerLevel); } } } } catch (Exception ex13) { Debug.LogError((object)ex13); } }; StartOfRound.Awake += (hook_Awake)delegate(orig_Awake orig, StartOfRound self) { orig.Invoke(self); try { if (((NetworkBehaviour)StartOfRound.Instance).IsHost && !Object.op_Implicit((Object)(object)weatherManager) && Object.op_Implicit((Object)(object)weatherManager.GetComponent()) && weatherManager.GetComponent().IsSpawned) { initWeatherManager(); } } catch (Exception ex12) { Debug.LogError((object)"Easter Island: Error starting weather manager! Custom EI weathers will not load!"); Debug.LogError((object)ex12.ToString()); } }; object obj5 = <>c.<>9__40_7; if (obj5 == null) { hook_OnClientConnect val3 = delegate(orig_OnClientConnect orig, StartOfRound self, ulong clientId) { try { if (Object.op_Implicit((Object)(object)weatherScript) && !Object.op_Implicit((Object)(object)((Component)weatherScript).gameObject)) { Object.Destroy((Object)(object)weatherScript); } if (Object.op_Implicit((Object)(object)weatherScript) && Object.op_Implicit((Object)(object)((Component)weatherScript).gameObject)) { Object.Destroy((Object)(object)((Component)weatherScript).gameObject); } } catch (Exception) { } orig.Invoke(self, clientId); }; <>c.<>9__40_7 = val3; obj5 = (object)val3; } StartOfRound.OnClientConnect += (hook_OnClientConnect)obj5; StartOfRound.SetPlanetsWeather += (hook_SetPlanetsWeather)delegate(orig_SetPlanetsWeather orig, StartOfRound self, int connectedPlayersOnServer) { orig.Invoke(self, connectedPlayersOnServer); weatherManagerBoot(); }; object obj6 = <>c.<>9__40_9; if (obj6 == null) { hook_BeginUsingTerminal val4 = delegate(orig_BeginUsingTerminal orig, Terminal self) { terminal = self; try { if (Object.op_Implicit((Object)(object)easterislandNode)) { easterislandNode.itemCost = easterIslandCost.Value; } else { attemptGetIslandNode(); if (Object.op_Implicit((Object)(object)easterislandNode)) { easterislandNode.itemCost = easterIslandCost.Value; } if (Object.op_Implicit((Object)(object)easterrouteNode)) { easterrouteNode.itemCost = easterIslandCost.Value; } } } catch (Exception ex10) { Debug.LogError((object)ex10); } orig.Invoke(self); }; <>c.<>9__40_9 = val4; obj6 = (object)val4; } Terminal.BeginUsingTerminal += (hook_BeginUsingTerminal)obj6; controls = new InputMap(); JetPackFix.setupFix(); ArenaSetup.Start(); } public async void weatherManagerBoot() { int attempts = 10; try { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if (!Object.op_Implicit((Object)(object)weatherScript)) { initWeatherManager(); } else { weatherScript.weatherTickServerOnly(); } } } catch (Exception e) { await Task.Delay(1000); if (attempts - 1 != 0) { weatherManagerBoot(); return; } Debug.LogError((object)"Easter Island: Error starting weather manager! Custom EI weathers will not load!"); Debug.LogError((object)e.ToString()); } } public GameObject getQuantumItemRegisteredPrefab() { return QuantumEnergyPrefab; } public async void initWeatherManager() { weatherManager = Object.Instantiate(weatherManagerAsset); NetworkObject netObj = weatherManager.GetComponent(); netObj.Spawn(false); weatherScript = weatherManager.GetComponent(); int timeOut = 100; while (!netObj.IsSpawned) { await Task.Delay(100); timeOut--; if (timeOut <= 0) { Debug.LogError((object)"EasterIsland: WeatherManager failed to spawn after waiting."); return; } } Debug.Log((object)"EasterIsland: WeatherManager successfully spawned."); weatherScript.weatherTickServerOnly(); } public async void quantumLoop(GrabbableObject obj, GameObject quantumObj) { Logger.LogInfo((object)"Moai Portal: Awaiting Spawn of quantum object"); while (!quantumObj.GetComponent().IsSpawned) { Logger.LogInfo((object)"Moai Portal: Awaiting Spawn of quantum object..."); await Task.Delay(200); } Logger.LogInfo((object)"Moai Portal: Quantum Object spawned: now initializing variables for all clients"); quantumObj.GetComponent().initClientRpc(((NetworkBehaviour)obj).NetworkObject.NetworkObjectId); } public static void attemptGetIslandNode() { TerminalNode[] array = Object.FindObjectsOfType(); TerminalNode[] array2 = array; foreach (TerminalNode val in array2) { if (((Object)val).name.ToLower().Equals("easterislandroute")) { easterislandNode = val; break; } if (((Object)val).name.ToLower().Equals("easterislandrouteconfirm")) { easterrouteNode = val; break; } } } public void bindVars() { //IL_0092: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00b8: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00e8: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_0118: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown easterIslandCost = ((BaseUnityPlugin)this).Config.Bind("Global", "Easter Island Moon Cost", 650, "Cost to travel to the moon. "); nightfallChance = ((BaseUnityPlugin)this).Config.Bind("Global", "Nightfall Weather Chance", 15f, "% Chance for nightfall to occur on Easter Island."); quantumStormChance = ((BaseUnityPlugin)this).Config.Bind("Global", "Quantum Storm Chance", 0f, "% Chance for a quantum storm to occur on Easter Island."); spawnOverride = ((BaseUnityPlugin)this).Config.Bind("Global", "Only spawn Moai on Easter Island.", false, "Ensures that moai only spawn on the Easter Island moon. Overrides all settings on moai enemy."); ConfigEntry obj = easterIslandCost; IntInputFieldOptions val = new IntInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val).Min = 0; ((BaseRangeOptions)val).Max = 100000000; IntInputFieldConfigItem val2 = new IntInputFieldConfigItem(obj, val); ConfigEntry obj2 = nightfallChance; FloatInputFieldOptions val3 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val3).Min = 0f; ((BaseRangeOptions)val3).Max = 100f; FloatInputFieldConfigItem val4 = new FloatInputFieldConfigItem(obj2, val3); ConfigEntry obj3 = quantumStormChance; FloatInputFieldOptions val5 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val5).Min = 0f; ((BaseRangeOptions)val5).Max = 100f; FloatInputFieldConfigItem val6 = new FloatInputFieldConfigItem(obj3, val5); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val2); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val4); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val6); } public static void PopulateAssets() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); easterislandBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "eastermoonnetobjects")); heavenNetBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "easterheavennetobjs")); try { HeavenLoader.heavenBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "easterislandheavenscene")); } catch (Exception) { Debug.LogError((object)"Easter Island Heaven Bundle Error"); } Debug.Log((object)("Easter Heaven Bundle::: " + (object)HeavenLoader.heavenBundle)); HeavenLoader.LoadHeavenAssets(); } } } namespace EasterIsland.src { internal class InputMap : LcInputActions { [InputAction(/*Could not decode attribute arguments.*/)] public InputAction BookForward { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction BookBackward { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction summonGeorge { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction InspectGum { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction InspectLog { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction K1 { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction K2 { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction K3 { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction K4 { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction K5 { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction K6 { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction K7 { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction K8 { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction K9 { get; set; } [InputAction(/*Could not decode attribute arguments.*/)] public InputAction K0 { get; set; } } } namespace EasterIsland.src.EasterIslandScripts { public class CaveGenerator : NetworkBehaviour { public GameObject cavePopulatorRoot; public GameObject[] mandatoryRoomStartNodes; public int mandatoryRoomIndex = 0; public List endNodesFinished; public List tilesFinished; public int retryGenerationDeleteQuantity = 1; public GameObject[] caveTiles; public List allCollidersToRemove; public List endNodeQueue; public GameObject startCaveNode; public GameObject deadEndTile; public GameObject capTile; public GameObject scanSquare; public BoxCollider mostRecentCollider; private int failureStreak = 0; private int generationRate = 50; protected int generationLimit = 50; protected int generationsLeft = -1; protected float tileSize = 0.25f; protected bool deleteIntersectionColliders = true; public void Start() { if (!((Component)this).GetComponent().IsSpawned && ((NetworkBehaviour)RoundManager.Instance).IsHost) { ((Component)this).GetComponent().Spawn(false); } } public GameObject GetStartNode(GameObject tile) { Transform val = tile.transform.Find("StartNode"); if ((Object)(object)val == (Object)null) { Debug.LogError((object)("StartNode not found on tile: " + ((Object)tile).name)); } return ((Component)val).gameObject; } public List GetEndNodes(GameObject tile) { List endNodes = new List(); FindEndNodes(tile.transform); if (endNodes.Count == 0) { Debug.LogWarning((object)("No EndNodes found on tile: " + ((Object)tile).name)); } else { Debug.Log((object)$"Found {endNodes.Count} EndNodes on tile: {((Object)tile).name}"); } return endNodes; void FindEndNodes(Transform parent) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown foreach (Transform item in parent) { Transform val = item; if (((Object)val).name.StartsWith("EndNode")) { endNodes.Add(((Component)val).gameObject); } FindEndNodes(val); } } } public void ConnectTiles(GameObject endNode, GameObject startNode) { //IL_000d: 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) startNode.transform.position = endNode.transform.position; startNode.transform.rotation = endNode.transform.rotation; } public async Task GenerateNewTile(GameObject endNode) { bool attemptingMandatoryRoom = false; if (failureStreak > 3) { Debug.LogWarning((object)"Failure streak maxed for end node: Capping off pathway."); capOutTile(endNode); endNodeQueue.Remove(endNode); failureStreak = 0; return; } GameObject newTile; if (generationsLeft > 0) { newTile = Object.Instantiate(caveTiles[Random.Range(0, caveTiles.Length)]); } else if (mandatoryRoomIndex < mandatoryRoomStartNodes.Length) { newTile = Object.Instantiate(mandatoryRoomStartNodes[mandatoryRoomIndex]); mandatoryRoomIndex++; attemptingMandatoryRoom = true; } else { newTile = Object.Instantiate(deadEndTile); } GameObject startNode = GetStartNode(newTile); startNode.transform.localScale = new Vector3(tileSize, tileSize, tileSize); ConnectTiles(endNode, startNode); newTile.transform.parent = cavePopulatorRoot.transform; Physics.SyncTransforms(); Transform colliderTransform = startNode.transform.Find("CaveCollider"); if ((Object)(object)colliderTransform != (Object)null) { int timeout = 10; mostRecentCollider = ((Component)colliderTransform).GetComponent(); while ((Object)(object)mostRecentCollider == (Object)null || !((Collider)mostRecentCollider).enabled || !((Component)mostRecentCollider).gameObject.activeInHierarchy) { Physics.SyncTransforms(); await Task.Delay(50); timeout--; if (timeout <= 0) { break; } } } await Task.Delay(generationRate); if (!IsTilePlacementValid(startNode)) { Debug.LogWarning((object)("Invalid placement detected for tile: " + ((Object)newTile).name + ". Destroying tile.")); Object.Destroy((Object)(object)newTile); failureStreak++; if (mandatoryRoomIndex > 0 && attemptingMandatoryRoom) { mandatoryRoomIndex--; } } else { failureStreak = 0; endNodeQueue.Remove(endNode); endNodeQueue.AddRange(GetEndNodes(newTile)); endNodesFinished.Add(endNode); tilesFinished.Add(newTile); allCollidersToRemove.Add(mostRecentCollider); } } public void capOutTile(GameObject endNode) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(capTile); GameObject startNode = GetStartNode(val); startNode.transform.localScale = new Vector3(tileSize, tileSize, tileSize); ConnectTiles(endNode, startNode); tilesFinished.Add(val); val.transform.parent = cavePopulatorRoot.transform; } public bool IsTilePlacementValid(GameObject startNode) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) Transform val = startNode.transform.Find("CaveCollider"); if ((Object)(object)val == (Object)null) { Debug.LogError((object)("StartNode " + ((Object)startNode).name + " is missing a Collider GameObject.")); return false; } BoxCollider component = ((Component)val).GetComponent(); if ((Object)(object)component == (Object)null) { Debug.LogError((object)("Tile " + ((Object)val).name + " is missing a BoxCollider component.")); return false; } Vector3 val2 = ((Component)component).transform.TransformPoint(component.center); Vector3 val3 = Vector3.Scale(component.size, ((Component)component).transform.lossyScale) * 0.5f; Collider[] array = Physics.OverlapBox(val2, val3, ((Component)component).transform.rotation); Debug.Log((object)("Data for: CaveCollider GO: " + ((Object)((Component)val).gameObject).GetInstanceID())); Vector3 val4 = val2; Debug.Log((object)("World Center: " + ((object)(Vector3)(ref val4)).ToString())); val4 = val3; Debug.Log((object)("World Half Extents: " + ((object)(Vector3)(ref val4)).ToString())); Quaternion rotation = ((Component)component).transform.rotation; Debug.Log((object)("Rotation: " + ((object)(Quaternion)(ref rotation)).ToString())); Debug.Log((object)"Collision List: "); Collider[] array2 = array; foreach (Collider val5 in array2) { if ((Object)(object)((Component)val5).gameObject != (Object)(object)((Component)val).gameObject) { if (((Object)((Component)val5).gameObject).name.ToLower().Contains("cavecollider")) { Debug.Log((object)("Valid Collision detected with " + ((Object)((Component)val5).gameObject).name)); return false; } } else { Debug.Log((object)"SELF COLLIDE: "); val4 = ((Component)val5).transform.position; Debug.Log((object)("AT POSITION: " + ((object)(Vector3)(ref val4)).ToString())); } } return true; } public async void generateCave(Vector3 startPosition) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) generationsLeft = generationLimit; mandatoryRoomIndex = 0; endNodeQueue = new List(); endNodesFinished = new List(); tilesFinished = new List(); GameObject CaveGenerationRoot = Object.Instantiate(startCaveNode, Vector3.zero, startCaveNode.transform.rotation); CaveGenerationRoot.transform.position = startPosition; GetStartNode(CaveGenerationRoot).transform.localScale = new Vector3(tileSize, tileSize, tileSize); allCollidersToRemove.Add(((Component)GetStartNode(CaveGenerationRoot).transform.Find("CaveCollider")).GetComponent()); CaveGenerationRoot.transform.parent = cavePopulatorRoot.transform; endNodeQueue.AddRange(GetEndNodes(CaveGenerationRoot)); while (generationsLeft > 0 || mandatoryRoomIndex < mandatoryRoomStartNodes.Length) { if (retryGenerationDeleteQuantity < endNodesFinished.Count) { retryGenerationDeleteQuantity++; } else { retryGenerationDeleteQuantity = endNodesFinished.Count; } while (endNodeQueue.Count > 0) { GameObject currentEndNode = endNodeQueue[0]; await GenerateNewTile(currentEndNode); generationsLeft--; } if (generationsLeft > 0 || mandatoryRoomIndex < mandatoryRoomStartNodes.Length) { for (int i = 0; i < retryGenerationDeleteQuantity; i++) { Object.Destroy((Object)(object)tilesFinished[tilesFinished.Count - 1]); endNodeQueue.Add(endNodesFinished[endNodesFinished.Count - 1]); endNodesFinished.RemoveAt(endNodesFinished.Count - 1); tilesFinished.RemoveAt(tilesFinished.Count - 1); if (mandatoryRoomIndex > 0) { if (mandatoryRoomIndex - retryGenerationDeleteQuantity < 0) { mandatoryRoomIndex = 0; } else { mandatoryRoomIndex -= retryGenerationDeleteQuantity; } } } continue; } if (deleteIntersectionColliders) { foreach (BoxCollider c in allCollidersToRemove) { if ((Object)(object)c != (Object)null && (Object)(object)((Component)c).gameObject != (Object)null) { ((Component)c).gameObject.SetActive(false); } } } transferServerData(CaveGenerationRoot); await Task.Delay(3000); cavePopulatorRoot.GetComponent().PopulateEnvironment(); } } public void transferServerData(GameObject caveGenerationRoot) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_0098: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } string name = ((Object)caveGenerationRoot).name; Vector3 position = GetStartNode(caveGenerationRoot).transform.position; Quaternion rotation = GetStartNode(caveGenerationRoot).transform.rotation; spawnTileClientRpc(name, position, rotation); foreach (GameObject item in tilesFinished) { name = ((Object)item).name; position = GetStartNode(item).transform.position; rotation = GetStartNode(item).transform.rotation; spawnTileClientRpc(name, position, rotation); } } public GameObject getPrefabFromID(string name) { if (name.Contains(((Object)startCaveNode).name)) { return startCaveNode; } if (name.Contains(((Object)capTile).name)) { return capTile; } if (name.Contains(((Object)deadEndTile).name)) { return deadEndTile; } GameObject[] array = caveTiles; foreach (GameObject val in array) { if (name.Contains(((Object)val).name)) { return val; } } GameObject[] array2 = mandatoryRoomStartNodes; foreach (GameObject val2 in array2) { if (name.Contains(((Object)val2).name)) { return val2; } } return null; } [ClientRpc] public void spawnTileClientRpc(string tileIdentity, Vector3 startNodePosition, Quaternion startNodeRotation) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_014d: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(497050774u, val, (RpcDelivery)0); bool flag = tileIdentity != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(tileIdentity, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startNodePosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startNodeRotation); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 497050774u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { GameObject prefabFromID = getPrefabFromID(tileIdentity); GameObject tile = Object.Instantiate(prefabFromID); GameObject startNode = GetStartNode(tile); startNode.transform.position = startNodePosition; startNode.transform.rotation = startNodeRotation; ((Component)startNode.transform.Find("CaveCollider")).gameObject.SetActive(false); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(497050774u, new RpcReceiveHandler(__rpc_handler_497050774), "spawnTileClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_497050774(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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string tileIdentity = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref tileIdentity, false); } Vector3 startNodePosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startNodePosition); Quaternion startNodeRotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startNodeRotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((CaveGenerator)(object)target).spawnTileClientRpc(tileIdentity, startNodePosition, startNodeRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CaveGenerator"; } } public class CavePopulator : NetworkBehaviour { protected NavMeshSurface bakedNavmesh; protected GameObject[] caveAINodes; protected GameObject[] caveSpawnNodes; protected GameObject[] caveTrapNodes; public CaveEnvironment env; public void getAllNodes() { CaveAINode[] array = Object.FindObjectsOfType(); caveAINodes = (GameObject[])(object)new GameObject[array.Length]; for (int i = 0; i < caveAINodes.Length; i++) { caveAINodes[i] = ((Component)array[i]).gameObject; } CaveSpawnNode[] array2 = Object.FindObjectsOfType(); caveSpawnNodes = (GameObject[])(object)new GameObject[array2.Length]; for (int j = 0; j < caveSpawnNodes.Length; j++) { caveSpawnNodes[j] = ((Component)array2[j]).gameObject; } CaveTrapNode[] array3 = Object.FindObjectsOfType(); caveTrapNodes = (GameObject[])(object)new GameObject[array3.Length]; for (int k = 0; k < caveTrapNodes.Length; k++) { caveTrapNodes[k] = ((Component)array3[k]).gameObject; } } public void PopulateEnvironment() { //IL_0032: 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) Plugin.Logger.LogMessage((object)"Populating Cave Environment..."); getAllNodes(); NavMeshSurface component = ((Component)this).GetComponent(); BoxCollider component2 = ((Component)env).gameObject.GetComponent(); component.size = component2.size; component.center = component2.center; if ((Object)(object)component != (Object)null) { component.BuildNavMesh(); bakedNavmesh = component; } int amount = Random.RandomRangeInt(2, 5); int amount2 = Random.RandomRangeInt(10, 20); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { spawnMoai(amount); spawnMine(amount2); } } public async void spawnMine(int amount) { GameObject mine = null; SpawnableMapObject[] trapList = RoundManager.Instance.currentLevel.spawnableMapObjects; SpawnableMapObject[] array = trapList; foreach (SpawnableMapObject spawnable in array) { Plugin.Logger.LogInfo((object)((Object)spawnable.prefabToSpawn).name); if (((Object)spawnable.prefabToSpawn).name.ToLower().Contains("land") && ((Object)spawnable.prefabToSpawn).name.ToLower().Contains("mine")) { mine = spawnable.prefabToSpawn; } } if (!((Object)(object)mine != (Object)null)) { return; } List nodesUsed = new List(); NavMeshHit hit = default(NavMeshHit); for (int i = 0; i < amount; i++) { int val = Random.RandomRangeInt(0, caveTrapNodes.Length); if (!nodesUsed.Contains(val)) { Vector3 sourcePos = caveTrapNodes[val].transform.position; if (NavMesh.SamplePosition(sourcePos, ref hit, 5f, -1)) { GameObject gameObject = Object.Instantiate(mine, ((NavMeshHit)(ref hit)).position, Quaternion.Euler(Vector3.zero)); gameObject.GetComponentInChildren().Spawn(true); nodesUsed.Add(val); } else { Plugin.Logger.LogWarning((object)"Easter Island Cave Generator: Trap failed to find node to spawn in!"); } hit = default(NavMeshHit); } } } public async void spawnMoai(int amount) { List enemyList = RoundManager.Instance.currentLevel.DaytimeEnemies; List possibleSpawns = new List(); foreach (SpawnableEnemyWithRarity spawnable in enemyList) { Plugin.Logger.LogInfo((object)spawnable.enemyType.enemyName); if (spawnable.enemyType.enemyName.ToLower().Contains("moai")) { possibleSpawns.Add(spawnable); } } for (int i = 0; i < amount; i++) { int randomSelect = Random.RandomRangeInt(0, possibleSpawns.Count); GameObject gameObject = Object.Instantiate(possibleSpawns[randomSelect].enemyType.enemyPrefab, new Vector3(0f, 0f, 0f), Quaternion.Euler(Vector3.zero)); gameObject.GetComponentInChildren().Spawn(true); EnemyAI ai = gameObject.GetComponent(); RoundManager.Instance.SpawnedEnemies.Add(ai); await Task.Delay(2000); transportMoai(ai); } } public void transportMoai(EnemyAI moai) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) moai.allAINodes = caveAINodes; moai.isOutside = false; Vector3 position = caveSpawnNodes[Random.RandomRangeInt(0, caveSpawnNodes.Length)].transform.position; NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(position, ref val, 5f, -1)) { ManualLogSource logger = Plugin.Logger; Vector3 position2 = ((Component)moai).transform.position; logger.LogInfo((object)("Easter Island Cave Generator: Transporting Moai to: " + ((object)(Vector3)(ref position2)).ToString())); moai.serverPosition = ((NavMeshHit)(ref val)).position; ((Component)moai).transform.position = ((NavMeshHit)(ref val)).position; moai.isOutside = false; moai.agent.Warp(moai.serverPosition); moai.SyncPositionToClients(); } else { Plugin.Logger.LogWarning((object)"Easter Island Cave Generator: Moai transport Failed to find Navmesh!"); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "CavePopulator"; } } [HarmonyPatch(typeof(Terminal), "TextPostProcess")] public class Patch_Terminal_WeatherDisplay { private static void Postfix(ref string __result, TerminalNode node) { Debug.Log((object)"Legend Of The Moai: Post Process Terminal Patch"); if (!((Object)(object)node != (Object)null) || !__result.ToLower().Contains("company")) { return; } string[] array = __result.Split('\n'); for (int i = 0; i < array.Length; i++) { if (array[i].Contains("Easter Island") && EIWeatherManager.assignedWeather != "") { array[i] = "Easter Island (" + EIWeatherManager.assignedWeather + ")"; Debug.Log((object)("Patched line to: " + array[i])); } } __result = string.Join("\n", array); } } public class EIWeatherManager : NetworkBehaviour { public int currentMapSeed = 0; public static Random random = new Random(); public double[] nightFallChance; public double[] fluxChance; public double[] sunnyChance; public static string assignedWeather = ""; public static int hostVar1 = -1; public static int hostVar2 = -1; [ServerRpc(RequireOwnership = false)] public void weatherTickServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1261791615u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1261791615u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; weatherTickServerOnly(); serverUpdateWeatherClientRpc(assignedWeather, hostVar1, hostVar2); } } } [ClientRpc] public void serverUpdateWeatherClientRpc(string weatherName, int var1, int var2) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3542723152u, val, (RpcDelivery)0); bool flag = weatherName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(weatherName, false); } BytePacker.WriteValueBitPacked(val2, var1); BytePacker.WriteValueBitPacked(val2, var2); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3542723152u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; modifyWeatherClientRpc(weatherName, var1, var2); } } public void weatherTickServerOnly() { if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } if (currentMapSeed != StartOfRound.Instance.randomMapSeed) { double num = random.NextDouble(); if (num < (double)(Plugin.nightfallChance.Value / 100f)) { modifyWeatherClientRpc("Night Fall", 1, 2); } else if (num > (double)(Plugin.nightfallChance.Value / 100f) && num < (double)(Plugin.quantumStormChance.Value / 100f + Plugin.nightfallChance.Value / 100f)) { modifyWeatherClientRpc("Quantum Storm", 1, 2); } else { clearCustomWeathersClientRpc(); } } else { serverUpdateWeatherClientRpc(assignedWeather, hostVar1, hostVar2); } currentMapSeed = StartOfRound.Instance.randomMapSeed; } [ClientRpc] public void clearCustomWeathersClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(363187775u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 363187775u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; assignedWeather = ""; } } } [ClientRpc] public void modifyWeatherClientRpc(string weatherName, int var1, int var2) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(846634191u, val, (RpcDelivery)0); bool flag = weatherName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(weatherName, false); } BytePacker.WriteValueBitPacked(val2, var1); BytePacker.WriteValueBitPacked(val2, var2); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 846634191u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; assignedWeather = weatherName; hostVar1 = var1; hostVar2 = var2; if (!Object.op_Implicit((Object)(object)Plugin.terminal)) { Plugin.terminal = Object.FindObjectsOfType()[0]; } SelectableLevel[] moonsCatalogueList = Plugin.terminal.moonsCatalogueList; SelectableLevel[] array = moonsCatalogueList; foreach (SelectableLevel val3 in array) { string text = val3.PlanetName.ToLower(); if (text.Contains("easter") && text.Contains("island")) { Debug.Log((object)"LegendOfTheMoai: stabilized weather."); val3.currentWeather = (LevelWeatherType)(-1); Type type = Type.GetType("WeatherRegistry.WeatherManager, WeatherRegistry"); if (type != null) { WeatherRegistryCompatibility.ForceClearWeather(val3); } } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1261791615u, new RpcReceiveHandler(__rpc_handler_1261791615), "weatherTickServerRpc"); ((NetworkBehaviour)this).__registerRpc(3542723152u, new RpcReceiveHandler(__rpc_handler_3542723152), "serverUpdateWeatherClientRpc"); ((NetworkBehaviour)this).__registerRpc(363187775u, new RpcReceiveHandler(__rpc_handler_363187775), "clearCustomWeathersClientRpc"); ((NetworkBehaviour)this).__registerRpc(846634191u, new RpcReceiveHandler(__rpc_handler_846634191), "modifyWeatherClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1261791615(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; ((EIWeatherManager)(object)target).weatherTickServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3542723152(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string weatherName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref weatherName, false); } int var = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref var); int var2 = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref var2); target.__rpc_exec_stage = (__RpcExecStage)1; ((EIWeatherManager)(object)target).serverUpdateWeatherClientRpc(weatherName, var, var2); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_363187775(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; ((EIWeatherManager)(object)target).clearCustomWeathersClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_846634191(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string weatherName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref weatherName, false); } int var = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref var); int var2 = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref var2); target.__rpc_exec_stage = (__RpcExecStage)1; ((EIWeatherManager)(object)target).modifyWeatherClientRpc(weatherName, var, var2); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "EIWeatherManager"; } } internal class GoldenCompassScript { } internal class GoldenHeadScript : NetworkBehaviour { private GameObject summonedMoai; public GrabbableObject item; public AudioSource moaiBelch; private void Update() { //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) InputMap controls = Plugin.controls; if (!Object.op_Implicit((Object)(object)item.playerHeldBy) || !item.playerHeldBy.isPlayerControlled) { return; } if (controls.K1.triggered) { playBelch(0.5f); } if (controls.K2.triggered) { playBelch(0.6667f); } if (controls.K3.triggered) { playBelch(0.8333f); } if (controls.K4.triggered) { playBelch(1f); } if (controls.K5.triggered) { playBelch(1.1667f); } if (controls.K6.triggered) { playBelch(1.3333f); } if (controls.K7.triggered) { playBelch(1.5f); } if (controls.K8.triggered) { playBelch(1.6667f); } if (controls.K9.triggered) { playBelch(1.8333f); } if (controls.K0.triggered) { playBelch(2f); } if (controls.summonGeorge.triggered) { if (!Object.op_Implicit((Object)(object)summonedMoai) || !summonedMoai.activeInHierarchy) { summonGeorgeKeyServerRpc(((Component)item.playerHeldBy).transform.position); } else { summonGeorgeKeyServerRpc(((Component)item.playerHeldBy).transform.position); } } } [ServerRpc] public void summonGeorgeKeyServerRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_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 //IL_014a: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__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(3493489530u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3493489530u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!Object.op_Implicit((Object)(object)summonedMoai) || !summonedMoai.activeInHierarchy) { summonGeorge(position); } else { teleportGeorge(position); } } } public void summonGeorge(Vector3 playerPosition) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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) EnemyType val = findGeorgeInMods(); if (Object.op_Implicit((Object)(object)val)) { Vector3 val2 = GenerateRandomPosition(playerPosition, 5f); if (val2 == Vector3.zero) { return; } NetworkObjectReference val3 = RoundManager.Instance.SpawnEnemyGameObject(val2, 0f, 1, val); NetworkObject val4 = default(NetworkObject); if (((NetworkObjectReference)(ref val3)).TryGet(ref val4, (NetworkManager)null)) { summonedMoai = ((Component)val4).gameObject; if (item.playerHeldBy.isInsideFactory) { summonedMoai.GetComponent().isOutside = false; summonedMoai.GetComponent().allAINodes = GameObject.FindGameObjectsWithTag("AINode"); } else { summonedMoai.GetComponent().isOutside = true; summonedMoai.GetComponent().allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode"); } } else { Debug.LogError((object)"Gold Moai: Net retrieve failure. Failed to find Gold Moai network reference!"); } } else { Debug.LogError((object)"Gold Moai: Spawn failure. Failed to find Gold Moai as a defined enemy!"); } } private Vector3 GenerateRandomPosition(Vector3 target, float radius) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) Vector2 insideUnitCircle = Random.insideUnitCircle; Vector2 normalized = ((Vector2)(ref insideUnitCircle)).normalized; Vector3 val = target + new Vector3(normalized.x, 0f, normalized.y) * radius; NavMeshHit val2 = default(NavMeshHit); if (NavMesh.SamplePosition(val, ref val2, 10f, -1)) { return ((NavMeshHit)(ref val2)).position; } return Vector3.zero; } public void teleportGeorge(Vector3 playerPosition) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_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_002b: Unknown result type (might be due to invalid IL or missing references) Vector3 val = GenerateRandomPosition(playerPosition, 5f); if (!(val == Vector3.zero)) { summonedMoai.transform.position = val; } } public EnemyType findGeorgeInMods() { RoundManager instance = RoundManager.Instance; List daytimeEnemies = instance.currentLevel.DaytimeEnemies; for (int i = 0; i < daytimeEnemies.Count; i++) { SpawnableEnemyWithRarity val = daytimeEnemies[i]; if (((Object)val.enemyType).name.Contains("Moai") && ((Object)val.enemyType).name.Contains("Gold")) { return val.enemyType; } } return null; } public void playBelch(float pitchValue) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { playBelchClientRpc(pitchValue); } else { playBelchServerRpc(pitchValue); } } [ServerRpc] public void playBelchServerRpc(float pitchValue) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0122: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //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)base.__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(4979120u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pitchValue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4979120u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; playBelchClientRpc(pitchValue); } } [ClientRpc] public void playBelchClientRpc(float pitchValue) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2210203693u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pitchValue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2210203693u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; moaiBelch.pitch = pitchValue; moaiBelch.Play(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3493489530u, new RpcReceiveHandler(__rpc_handler_3493489530), "summonGeorgeKeyServerRpc"); ((NetworkBehaviour)this).__registerRpc(4979120u, new RpcReceiveHandler(__rpc_handler_4979120), "playBelchServerRpc"); ((NetworkBehaviour)this).__registerRpc(2210203693u, new RpcReceiveHandler(__rpc_handler_2210203693), "playBelchClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3493489530(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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_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 { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((GoldenHeadScript)(object)target).summonGeorgeKeyServerRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4979120(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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: 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 { float pitchValue = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pitchValue, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GoldenHeadScript)(object)target).playBelchServerRpc(pitchValue); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2210203693(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float pitchValue = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pitchValue, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GoldenHeadScript)(object)target).playBelchClientRpc(pitchValue); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "GoldenHeadScript"; } } public class EatenGumScript : NetworkBehaviour { public Random random; public AudioSource eatenAudioSource; public PlayerControllerB eater; public float jumpBoost = 1f; public float speedBoost = 1f; public float healthBoost = 1f; public float impurity = 1f; public int durationMs = 1; private bool hasPlayedAudio = false; public void Start() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { random = new Random(); if (!((Component)this).GetComponent().IsSpawned) { ((Component)this).GetComponent().Spawn(false); } applyBuffsClientRpc(((NetworkBehaviour)eater).NetworkObject.NetworkObjectId, speedBoost, jumpBoost, impurity, healthBoost, durationMs); awaitDestructionServerOnly(); eater.isHoldingObject = false; } } public void Update() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost) { ((Component)this).transform.position = ((Component)eater).transform.position; if (!hasPlayedAudio) { playConsumeClientRpc(); hasPlayedAudio = true; } } } [ClientRpc] public void playConsumeClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2417730439u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2417730439u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; eatenAudioSource.Play(); } } } [ClientRpc] public void applyBuffsClientRpc(ulong uid, float _speedBoost, float _jumpBoost, float _impurity, float _healthBoost, int _durationMs) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1003691061u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref _speedBoost, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref _jumpBoost, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref _impurity, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref _healthBoost, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, _durationMs); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1003691061u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; applyBuffstoClient(uid, _speedBoost, _jumpBoost, _impurity, _healthBoost, _durationMs); } } } public async void applyBuffstoClient(ulong uid, float _speedBoost, float _jumpBoost, float _impurity, float _healthBoost, int _durationMs) { PlayerControllerB[] players = RoundManager.Instance.playersManager.allPlayerScripts; _ = ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId; foreach (PlayerControllerB player in players) { if (((NetworkBehaviour)player).NetworkObject.NetworkObjectId == uid) { Plugin.highPlayers.Add(player); player.DamagePlayer((int)((0f - _healthBoost) * 100f), true, true, (CauseOfDeath)0, 0, false, default(Vector3)); if (player.health > 100) { player.health = 100; } float genericSpeed = 4.6f; float genericJumpHeight = 13f; int genericClimbSpeed = 3; player.drunkness = _impurity; player.movementSpeed = genericSpeed * _speedBoost; player.jumpForce = genericJumpHeight * _jumpBoost; player.climbSpeed = (float)genericClimbSpeed * _speedBoost * _jumpBoost; await Task.Delay(_durationMs); player.movementSpeed = genericSpeed; player.jumpForce = genericJumpHeight; player.climbSpeed = genericClimbSpeed; if (player.health > 100) { player.health = 100; } Plugin.highPlayers.Remove(player); } } } public async void awaitDestructionServerOnly() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { await Task.Delay(durationMs); await Task.Delay(5000); ((NetworkBehaviour)this).NetworkObject.Despawn(true); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2417730439u, new RpcReceiveHandler(__rpc_handler_2417730439), "playConsumeClientRpc"); ((NetworkBehaviour)this).__registerRpc(1003691061u, new RpcReceiveHandler(__rpc_handler_1003691061), "applyBuffsClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2417730439(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; ((EatenGumScript)(object)target).playConsumeClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1003691061(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); float num = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); float num2 = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num2, default(ForPrimitives)); float num3 = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num3, default(ForPrimitives)); float num4 = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num4, default(ForPrimitives)); int num5 = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref num5); target.__rpc_exec_stage = (__RpcExecStage)1; ((EatenGumScript)(object)target).applyBuffsClientRpc(uid, num, num2, num3, num4, num5); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "EatenGumScript"; } } public class GumScript : NetworkBehaviour { public Random random; public AudioClip[] warioDropSounds; public AudioClip[] warioPickupSounds; public AudioClip consumeSound; public AudioSource eatenAudioSource; public GrabbableObject wario; public bool held = true; public ScanNodeProperties scan; private float rarity; public float jumpBoost; public float speedBoost; public float healthBoost; public float impurity; public int durationMs; private readonly (float threshold, float probability)[] rarityProbabilities = new(float, float)[6] { (1f, 0.35f), (2f, 0.25f), (3f, 0.18f), (4f, 0.12f), (6f, 0.07f), (10f, 0.03f) }; public void Start() { try { random = new Random(); if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } rarity = GenerateRarity(); List list = new List { "Jump", "Speed", "Health" }; float num = 1f; int num2 = 1; while (random.NextDouble() < (double)num && list.Count > 0) { string text = list[random.Next(0, list.Count)]; list.Remove(text); if (text.Equals("Jump")) { jumpBoost = (float)((random.NextDouble() * 0.2 + 0.05) * (double)rarity + 1.0); } if (text.Equals("Health")) { healthBoost = (float)(random.NextDouble() * 0.25 * (double)rarity); } if (text.Equals("Speed")) { speedBoost = (float)((random.NextDouble() * 0.5 + 0.1) * (double)rarity + 1.0); } num = Math.Max(0.1f, 0.5f * rarity / (float)num2); num2++; } durationMs = (int)((float)random.Next(1000, (int)(800f * rarity + 4000f)) * rarity); impurity = (float)Math.Max(0.0, 1.0 - random.NextDouble() * random.NextDouble() * (double)rarity); setWarioStatsClientRpc(speedBoost, healthBoost, jumpBoost, durationMs, impurity, rarity); } catch (Exception ex) { Debug.Log((object)ex); } } [ClientRpc] public void setWarioStatsClientRpc(float _speedBoost, float _healthboost, float _jumpboost, int _durationMs, float _impurity, float _rarity) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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_00b9: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(301328441u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref _speedBoost, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref _healthboost, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref _jumpboost, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, _durationMs); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref _impurity, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref _rarity, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 301328441u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; rarity = _rarity; impurity = _impurity; durationMs = _durationMs; jumpBoost = _jumpboost; healthBoost = _healthboost; speedBoost = _speedBoost; if (rarity >= 10f) { scan.headerText = "Gum Gum (Mythical)"; } else if (rarity >= 6f) { scan.headerText = "Gum Gum (Legendary)"; } else if (rarity >= 4f) { scan.headerText = "Gum Gum (Epic)"; } else if (rarity >= 3f) { scan.headerText = "Gum Gum (Rare)"; } else if (rarity >= 2f) { scan.headerText = "Gum Gum (Uncommon)"; } else { scan.headerText = "Gum Gum (Common)"; } } } private float GenerateRarity() { float num = (float)random.NextDouble(); float num2 = 0f; (float, float)[] array = rarityProbabilities; for (int i = 0; i < array.Length; i++) { (float, float) tuple = array[i]; float item = tuple.Item1; float item2 = tuple.Item2; num2 += item2; if (num < num2) { return item; } } return 1f; } public void Update() { if (!wario.isHeld || (wario.isHeld && wario.isPocketed)) { if (held && ((NetworkBehaviour)RoundManager.Instance).IsHost) { changeDropAndPickupSFX(); } held = false; } else { held = true; } if (Plugin.controls.InspectGum.triggered && wario.isHeld && !wario.isPocketed && ((NetworkBehaviour)wario.playerHeldBy).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { showItemStats(); } if (wario.isBeingUsed && ((NetworkBehaviour)wario.playerHeldBy).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { wario.isBeingUsed = false; eatWario(); } else { wario.isBeingUsed = false; eatWarioServerRpc(); } } } public void DropHeldItem(bool itemsFall = true, bool disconnecting = false) { //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_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) PlayerControllerB playerHeldBy = wario.playerHeldBy; if ((Object)(object)wario == (Object)null || (Object)(object)wario.playerHeldBy == (Object)null || wario.playerHeldBy.ItemSlots == null) { return; } try { for (int i = 0; i < wario.playerHeldBy.ItemSlots.Length; i++) { GrabbableObject val = wario.playerHeldBy.ItemSlots[i]; if (!((Object)(object)val != (Object)null) || !val.isHeld || val.isPocketed) { continue; } if (itemsFall) { val.parentObject = null; val.heldByPlayerOnServer = false; if (val.playerHeldBy.isInElevator) { ((Component)val).transform.SetParent(playerHeldBy.playersManager.elevatorTransform, true); } else { ((Component)val).transform.SetParent(playerHeldBy.playersManager.propsContainer, true); } val.playerHeldBy.SetItemInElevator(playerHeldBy.isInHangarShipRoom, playerHeldBy.isInElevator, val); val.EnablePhysics(true); val.EnableItemMeshes(true); ((Component)val).transform.localScale = val.originalScale; val.isHeld = false; val.isPocketed = false; val.startFallingPosition = ((Component)val).transform.parent.InverseTransformPoint(((Component)val).transform.position); val.FallToGround(true, false, default(Vector3)); val.fallTime = Random.Range(-0.3f, 0.05f); Plugin.Logger.LogInfo((object)"Gum Gum: DiscardingItem"); val.DiscardItemOnClient(); val.playerHeldBy = null; } if (((NetworkBehaviour)this).IsOwner && !disconnecting) { ((Behaviour)HUDManager.Instance.holdingTwoHandedItem).enabled = false; ((Behaviour)HUDManager.Instance.itemSlotIcons[i]).enabled = false; HUDManager.Instance.ClearControlTips(); playerHeldBy.activatingItem = false; } playerHeldBy.ItemSlots[i] = null; break; } Plugin.Logger.LogInfo((object)"Gum Gum: Resetting player hand..."); playerHeldBy.isHoldingObject = false; SetSpecialGrabAnimationBool(setTrue: false, playerHeldBy.currentlyHeldObjectServer, playerHeldBy); playerHeldBy.playerBodyAnimator.SetBool("cancelHolding", true); playerHeldBy.playerBodyAnimator.SetTrigger("Throw"); playerHeldBy.activatingItem = false; playerHeldBy.currentlyHeldObjectServer = null; } catch (Exception ex) { Debug.Log((object)ex); } } private void SetSpecialGrabAnimationBool(bool setTrue, GrabbableObject currentItem, PlayerControllerB ply) { if (!((NetworkBehaviour)this).IsOwner) { return; } ply.playerBodyAnimator.SetBool("Grab", setTrue); if (string.IsNullOrEmpty(currentItem.itemProperties.grabAnim)) { return; } try { ply.playerBodyAnimator.SetBool(currentItem.itemProperties.grabAnim, setTrue); } catch (Exception) { Debug.LogError((object)("An item tried to set an animator bool which does not exist: " + currentItem.itemProperties.grabAnim)); } } public void eatWario() { activateBuffClientRpc(Plugin.highPlayers.Contains(wario.playerHeldBy)); } [ClientRpc] public void warnPlayerClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(835530790u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 835530790u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (Object.op_Implicit((Object)(object)wario.playerHeldBy) && ((NetworkBehaviour)wario.playerHeldBy).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { HUDManager.Instance.DisplayTip("Hey DUM DUM", "You already ate your gum gum. Wait first to let me have Sum Sum.", false, false, "LC_Tip1"); wario.isBeingUsed = false; } } } [ClientRpc] public void activateBuffClientRpc(bool guard) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1909100034u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref guard, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1909100034u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB playerHeldBy = wario.playerHeldBy; if (Plugin.highPlayers.Contains(wario.playerHeldBy) || guard) { HUDManager.Instance.DisplayTip("Hey DUM DUM", "You already ate your gum gum. Wait first to let me have Sum Sum.", false, false, "LC_Tip1"); wario.isBeingUsed = false; return; } Object.Destroy((Object)(object)((Component)wario).gameObject.GetComponent()); Object.Destroy((Object)(object)((Component)((Component)wario).gameObject.transform.Find("Sphere")).GetComponent()); Object.Destroy((Object)(object)((Component)((Component)wario).gameObject.transform.Find("ScanNode")).GetComponent()); DropHeldItem(); Plugin.Logger.LogDebug((object)"Gum Gum: Local Player Check..."); if (Object.op_Implicit((Object)(object)playerHeldBy) && ((NetworkBehaviour)playerHeldBy).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { Plugin.Logger.LogDebug((object)"Gum Gum: Applying Buffs..."); applyBuffsClientRpc(((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId); } else { Plugin.Logger.LogDebug((object)"Gum Gum: Applying Buffs..."); applyBuffsServerRpc(((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId); } } wario.DiscardItemOnClient(); } [ServerRpc(RequireOwnership = false)] public void applyBuffsServerRpc(ulong uid) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1408630822u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1408630822u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; applyBuffsClientRpc(uid); } } } [ClientRpc] public void applyBuffsClientRpc(ulong uid) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(533646865u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 533646865u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; eatenAudioSource.Play(); applyBuffstoClient(uid); } } } public async void applyBuffstoClient(ulong uid) { PlayerControllerB[] players = RoundManager.Instance.playersManager.allPlayerScripts; foreach (PlayerControllerB player in players) { if (((NetworkBehaviour)player).NetworkObject.NetworkObjectId == uid) { Plugin.highPlayers.Add(player); player.DamagePlayer((int)(healthBoost * -100f), true, true, (CauseOfDeath)0, 0, false, default(Vector3)); if (player.health > 100) { player.health = 100; } float genericSpeed = 4.6f; float genericJumpHeight = 13f; int genericClimbSpeed = 3; player.drunkness = impurity; player.movementSpeed = genericSpeed * speedBoost; player.jumpForce = genericJumpHeight * jumpBoost; player.climbSpeed = (float)genericClimbSpeed * speedBoost * jumpBoost; await Task.Delay(durationMs); player.movementSpeed = genericSpeed; player.jumpForce = genericJumpHeight; player.climbSpeed = genericClimbSpeed; if (player.health > 100) { player.health = 100; } Plugin.highPlayers.Remove(player); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { Demolish(); } else { destroyServerRpc(); } } } } [ServerRpc(RequireOwnership = false)] public void destroyServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2174915218u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2174915218u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Demolish(); } } } public void Demolish() { Object.Destroy((Object)(object)((Component)this).gameObject); } [ServerRpc(RequireOwnership = false)] public void eatWarioServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1647298692u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1647298692u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; eatWario(); } } } public void changeDropAndPickupSFX() { setSFXClientRpc(random.Next(0, warioDropSounds.Length), random.Next(0, warioPickupSounds.Length)); } [ClientRpc] public void setSFXClientRpc(int dropIndex, int pickupIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4213932931u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, dropIndex); BytePacker.WriteValueBitPacked(val2, pickupIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4213932931u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioClip dropSFX = warioDropSounds[dropIndex]; AudioClip grabSFX = warioPickupSounds[pickupIndex]; wario.itemProperties.dropSFX = dropSFX; wario.itemProperties.grabSFX = grabSFX; } } } public void showItemStats() { string text = ""; string text2 = ""; text2 = ((rarity >= 10f) ? (text2 + "Rarity: Mythical ") : ((rarity >= 6f) ? (text2 + "Rarity: Legendary ") : ((rarity >= 4f) ? (text2 + "Rarity: Epic ") : ((rarity >= 3f) ? (text2 + "Rarity: Rare ") : ((!(rarity >= 2f)) ? (text2 + "Rarity: Common ") : (text2 + "Rarity: Uncommon ")))))); text2 = text2 + "Time: " + durationMs / 1000 + "s\n"; if (speedBoost != 1f) { text = text + "Speed Boost: " + 100f * (speedBoost - 1f) + "%\n"; } if (healthBoost != 1f) { text = text + "HP Heal: " + healthBoost * 100f + "\n"; } if (jumpBoost != 1f) { text = text + "Jump Boost: " + (jumpBoost - 1f) * 100f + "%\n"; } text = text + "Purity: " + (100f - 100f * impurity) + "%\n"; HUDManager.Instance.DisplayTip(text2, text, false, false, "LC_Tip1"); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(301328441u, new RpcReceiveHandler(__rpc_handler_301328441), "setWarioStatsClientRpc"); ((NetworkBehaviour)this).__registerRpc(835530790u, new RpcReceiveHandler(__rpc_handler_835530790), "warnPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(1909100034u, new RpcReceiveHandler(__rpc_handler_1909100034), "activateBuffClientRpc"); ((NetworkBehaviour)this).__registerRpc(1408630822u, new RpcReceiveHandler(__rpc_handler_1408630822), "applyBuffsServerRpc"); ((NetworkBehaviour)this).__registerRpc(533646865u, new RpcReceiveHandler(__rpc_handler_533646865), "applyBuffsClientRpc"); ((NetworkBehaviour)this).__registerRpc(2174915218u, new RpcReceiveHandler(__rpc_handler_2174915218), "destroyServerRpc"); ((NetworkBehaviour)this).__registerRpc(1647298692u, new RpcReceiveHandler(__rpc_handler_1647298692), "eatWarioServerRpc"); ((NetworkBehaviour)this).__registerRpc(4213932931u, new RpcReceiveHandler(__rpc_handler_4213932931), "setSFXClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_301328441(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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float num = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); float healthboost = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref healthboost, default(ForPrimitives)); float jumpboost = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref jumpboost, default(ForPrimitives)); int num2 = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref num2); float num3 = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num3, default(ForPrimitives)); float num4 = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num4, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GumScript)(object)target).setWarioStatsClientRpc(num, healthboost, jumpboost, num2, num3, num4); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_835530790(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; ((GumScript)(object)target).warnPlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1909100034(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 guard = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref guard, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GumScript)(object)target).activateBuffClientRpc(guard); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1408630822(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)1; ((GumScript)(object)target).applyBuffsServerRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_533646865(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)1; ((GumScript)(object)target).applyBuffsClientRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2174915218(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; ((GumScript)(object)target).destroyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1647298692(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; ((GumScript)(object)target).eatWarioServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4213932931(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int dropIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref dropIndex); int pickupIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref pickupIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((GumScript)(object)target).setSFXClientRpc(dropIndex, pickupIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "GumScript"; } } internal class MorshuScript : MonoBehaviour { public GrabbableObject item; public void Start() { if (!((NetworkBehaviour)item).NetworkObject.IsSpawned) { ((NetworkBehaviour)item).NetworkObject.Spawn(false); Object.Destroy((Object)(object)this); } else { ScanNodeProperties componentInChildren = ((Component)item).gameObject.GetComponentInChildren(); componentInChildren.subText = "Value: " + componentInChildren.scrapValue + " rupees"; } } } public class PaintingItemScript : NetworkBehaviour { public GrabbableObject hostItem; private void Start() { //IL_0026: 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_0051: Unknown result type (might be due to invalid IL or missing references) Plugin.Logger.LogInfo((object)"Setting Painting Floor Position to::: "); Plugin.Logger.LogInfo((object)((Component)hostItem).gameObject.transform.localPosition); hostItem.targetFloorPosition = ((Component)hostItem).gameObject.transform.localPosition; hostItem.SetScrapValue(0); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "PaintingItemScript"; } } internal class PortalScript : NetworkBehaviour { public GameObject destination; public static List instances = new List(); public AudioSource stage1; public AudioSource stage2; public AudioSource stage3; public AudioSource teleportSound; public AudioSource destinationTeleportSound; private bool initialized = false; private float charge; private int cycle = 0; private bool charging = false; private float timeStarted = 0f; public void initialize(Vector3 spawnPos) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) setupTeleporterClientRpc(spawnPos); } [ClientRpc] public void setupTeleporterClientRpc(Vector3 spawnPos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(222026528u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref spawnPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 222026528u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PortalScript component = ((Component)this).gameObject.GetComponent(); PortalScript component2 = component.destination.GetComponent(); component.destination = ((Component)component2).gameObject; component.destinationTeleportSound = ((Component)component2).GetComponent().teleportSound; component2.destination = ((Component)component).gameObject; component2.destinationTeleportSound = ((Component)component).GetComponent().teleportSound; instances.Add(((Component)component2).GetComponent()); instances.Add(((Component)component).GetComponent()); ((Component)this).transform.position = spawnPos; initialized = true; } } } private void Start() { timeStarted = Time.time; } private void Update() { //IL_00ee: 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) if (!initialized) { return; } if (charging) { charge += 25f * Time.deltaTime; } if (!Object.op_Implicit((Object)(object)RoundManager.Instance.dungeonGenerator) && Time.time - timeStarted > 10f) { if (Object.op_Implicit((Object)(object)GameObject.Find("PortalPair(Clone)"))) { Object.Destroy((Object)(object)GameObject.Find("PortalPair(Clone)")); } else { Object.Destroy((Object)(object)this); } } soundLogic(charge); if (charge > 100f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { teleportPlayersClientRpc(destination.transform.position); } else { teleportPlayersServerRpc(destination.transform.position); } playSoundClientRpc(3); charge = 0f; } if (cycle < 20) { cycle++; return; } cycle = 0; charging = getNearestPlayers().Count > 0; } private void soundLogic(float c) { if (c < 25f && !stage1.isPlaying) { playSoundClientRpc(0); } else if (c < 50f && !stage2.isPlaying) { playSoundClientRpc(1); } else if (c < 75f && !stage3.isPlaying) { playSoundClientRpc(2); } } [ClientRpc] private void playSoundClientRpc(int id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3662068299u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, id); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3662068299u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; switch (id) { case 0: stage1.Play(); stage2.Stop(); stage3.Stop(); break; case 1: stage2.Play(); stage1.Stop(); stage3.Stop(); break; case 2: stage3.Play(); stage1.Stop(); stage2.Stop(); break; case 3: teleportSound.Play(); destinationTeleportSound.Play(); stage1.Stop(); stage2.Stop(); stage3.Stop(); break; } } } [ClientRpc] private void teleportPlayersClientRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2461046778u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2461046778u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (PlayerControllerB nearestPlayer in getNearestPlayers()) { ((Component)nearestPlayer).transform.position = position; } } [ServerRpc] private void teleportPlayersServerRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_011b: 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_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)base.__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(1711253795u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1711253795u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; teleportPlayersClientRpc(position); } } private List getNearestPlayers() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; List list = new List(); PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (Vector3.Distance(((Component)val).transform.position, ((Component)this).transform.position) <= 2f) { list.Add(val); } } return list; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(222026528u, new RpcReceiveHandler(__rpc_handler_222026528), "setupTeleporterClientRpc"); ((NetworkBehaviour)this).__registerRpc(3662068299u, new RpcReceiveHandler(__rpc_handler_3662068299), "playSoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(2461046778u, new RpcReceiveHandler(__rpc_handler_2461046778), "teleportPlayersClientRpc"); ((NetworkBehaviour)this).__registerRpc(1711253795u, new RpcReceiveHandler(__rpc_handler_1711253795), "teleportPlayersServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_222026528(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 spawnPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((PortalScript)(object)target).setupTeleporterClientRpc(spawnPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3662068299(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 id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((PortalScript)(object)target).playSoundClientRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2461046778(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((PortalScript)(object)target).teleportPlayersClientRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1711253795(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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_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 { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((PortalScript)(object)target).teleportPlayersServerRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PortalScript"; } } public class QuantumItemScript : NetworkBehaviour { public float instability = 0f; public GameObject parent; public GameObject ball; public GameObject arcs; private Vector3 prevPos; private bool justTeleported = false; public static List itemsTeleportedTo = new List(); private float ballUpdateTick = 0f; public AudioSource T1; public AudioSource T2; public AudioSource T3; public AudioSource TELE; public float teleportTime; private bool awaitReassign = false; private float lastReassignTime = 0f; public GrabbableObject hostItem; public Vector3 sampleObjFall(GrabbableObject objTarget) { //IL_001e: 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_0014: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)objTarget)) { return Vector3.zero; } NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(((Component)objTarget).transform.position, ref val, 15f, -1)) { return ((NavMeshHit)(ref val)).position; } return Vector3.zero; } private void Start() { //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) ((Behaviour)((Component)this).GetComponent()).enabled = false; Transform val = ((Component)this).gameObject.transform.parent; if (!((Component)this).GetComponent().IsSpawned && ((NetworkBehaviour)RoundManager.Instance).IsHost && Object.op_Implicit((Object)(object)hostItem)) { ((Component)this).GetComponent().Spawn(false); ((Component)this).transform.parent = ((Component)hostItem).gameObject.transform; } if ((Object)(object)hostItem != (Object)null) { Plugin.Logger.LogInfo((object)"Setting Painting Floor Position to::: "); Plugin.Logger.LogInfo((object)((Component)hostItem).gameObject.transform.localPosition); hostItem.targetFloorPosition = ((Component)hostItem).gameObject.transform.localPosition; } prevPos = ((Component)this).transform.position; if (!Object.op_Implicit((Object)(object)val)) { Debug.Log((object)"LegendOfTheMoai: Failed to find parent of QuantamItem. Reassigning..."); awaitReassign = true; lastReassignTime = Time.time; return; } parent = ((Component)val).gameObject; hostItem = parent.GetComponent(); if (!Object.op_Implicit((Object)(object)hostItem)) { Debug.Log((object)"LegendOfTheMoai: Failed to find root item of QuantamItem. Reassigning..."); awaitReassign = true; lastReassignTime = Time.time; } } [ClientRpc] public void initClientRpc(ulong id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2691398462u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, id); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2691398462u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; Plugin.Logger.LogInfo((object)"Quantum Client Init:"); GrabbableObject[] array = Object.FindObjectsOfType(false); foreach (GrabbableObject val3 in array) { if (Object.op_Implicit((Object)(object)val3) && Object.op_Implicit((Object)(object)((NetworkBehaviour)val3).NetworkObject) && ((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == id) { Plugin.Logger.LogInfo((object)("Found object to inject data into: " + ((Object)val3).name + " injecting...")); if (((NetworkBehaviour)RoundManager.Instance).IsServer) { ((Component)this).transform.parent = ((Component)val3).transform; } QuantumItemScript component = ((Component)this).GetComponent(); if (((NetworkBehaviour)RoundManager.Instance).IsServer) { component.parent = ((Component)val3).gameObject; } component.hostItem = val3; finalizeVariables(val3); } } } public async void finalizeVariables(GrabbableObject obj) { Plugin.Logger.LogInfo((object)"setting quantum item localpos"); while (!Object.op_Implicit((Object)(object)obj)) { Plugin.Logger.LogInfo((object)"awaiting Find for obj"); await Task.Delay(200); } while (!Object.op_Implicit((Object)(object)((Component)obj).gameObject)) { Plugin.Logger.LogInfo((object)"awaiting Find for obj.gameObject"); await Task.Delay(200); } while (!Object.op_Implicit((Object)(object)((Component)obj).gameObject.transform.Find("QuantumItem(Clone)"))) { Plugin.Logger.LogInfo((object)"awaiting Find for QuantumItem(Clone)"); await Task.Delay(200); } Plugin.Logger.LogInfo((object)"Finalizing..."); ((Component)((Component)obj).gameObject.transform.Find("QuantumItem(Clone)")).transform.localPosition = new Vector3(0f, 0f, 0f); } [ClientRpc] private void tier1ClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3938071111u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3938071111u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!T1.isPlaying) { T1.Play(); T2.Stop(); T3.Stop(); } } } [ClientRpc] private void tier2ClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2656192976u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2656192976u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!T2.isPlaying) { T1.Stop(); T2.Play(); T3.Stop(); } } } [ClientRpc] private void tier3ClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1544694196u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1544694196u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!T3.isPlaying) { T1.Stop(); T2.Stop(); T3.Play(); } } } [ClientRpc] private void teleSoundClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2030709911u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2030709911u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; T1.Stop(); T2.Stop(); T3.Stop(); TELE.Play(); } } } [ClientRpc] private void stopSoundsClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2306016485u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2306016485u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; T1.Stop(); T2.Stop(); T3.Stop(); } } } [ClientRpc] private void setArcsClientRpc(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) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3804902141u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3804902141u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (value) { arcs.SetActive(true); arcs.GetComponent().Play(); } else { arcs.SetActive(false); arcs.GetComponent().Stop(); } } } [ClientRpc] private void setBallSizeClientRpc(float size) { //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) //IL_0102: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1747313565u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref size, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1747313565u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ball.transform.localScale = new Vector3(1f + size, 1f + size, 1f + size); } } } public void attemptReassign() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) try { Debug.Log((object)"LegendOfTheMoai: Reassigning Quantum Item Parent (From Save)"); Vector3 position = ((Component)this).gameObject.transform.position; GrabbableObject[] array = Object.FindObjectsOfType(); GrabbableObject val = null; float num = 9999f; GrabbableObject[] array2 = array; foreach (GrabbableObject val2 in array2) { if (Object.op_Implicit((Object)(object)val2.itemProperties) && !val2.itemProperties.itemName.Equals(((Component)this).gameObject.GetComponent().itemProperties.itemName)) { Vector3 position2 = ((Component)val2).transform.position; float num2 = Vector3.Distance(position, position2); if (num2 < num) { num = num2; val = val2; } } } Debug.Log((object)("LegendOfTheMoai: Assigned quantum host item: " + ((Object)val).name)); hostItem = val; if (!((Component)this).GetComponent().IsSpawned && ((NetworkBehaviour)RoundManager.Instance).IsHost) { ((Component)this).GetComponent().Spawn(false); } ((Component)this).transform.parent = ((Component)hostItem).gameObject.transform; hostItem = val; awaitReassign = false; ((Component)this).transform.localPosition = Vector3.zero; } catch (Exception ex) { Debug.LogError((object)ex); } } private void Update() { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) if (awaitReassign && Time.time - lastReassignTime > 2f) { lastReassignTime = Time.time; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { attemptReassign(); } } if (!Object.op_Implicit((Object)(object)hostItem)) { return; } if (Time.time < teleportTime + 2.5f) { instability = 0f; } else { if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } if (instability > 0f) { instability -= 10f * Time.deltaTime; } Vector3 position = ((Component)this).transform.position; Vector3 val = position - prevPos; if (((Vector3)(ref val)).magnitude < 1f && !hostItem.isInShipRoom) { instability += ((Vector3)(ref val)).magnitude * 3.6f; } if ((double)((Vector3)(ref val)).magnitude < 0.01 && instability > 0f) { instability -= 35f * Time.deltaTime; } prevPos = ((Component)this).transform.position; if (justTeleported) { instability = 0f; justTeleported = false; } if (instability < 25f && (T1.isPlaying || T2.isPlaying || T3.isPlaying)) { stopSoundsClientRpc(); } if (instability > 25f && instability < 50f && !T1.isPlaying) { tier1ClientRpc(); } if (instability >= 50f && instability < 75f && !T2.isPlaying) { tier2ClientRpc(); } if (instability > 75f && !T3.isPlaying) { tier3ClientRpc(); } if (instability > 75f && (!arcs.activeInHierarchy || !arcs.GetComponent().isPlaying)) { setArcsClientRpc(value: true); } if (instability < 35f && arcs.activeInHierarchy) { setArcsClientRpc(value: false); } if ((double)ballUpdateTick + 0.1 < (double)Time.time) { float ballSizeClientRpc = instability * 0.07f; setBallSizeClientRpc(ballSizeClientRpc); ballUpdateTick = Time.time; } if (!(instability >= 100f)) { return; } teleportTime = Time.time; instability = 0f; justTeleported = true; teleSoundClientRpc(); Debug.Log((object)"LegendOfTheMoai: A quantum item is very unstable, attempting to swap item with another instance of itself."); List itemTargets = getItemTargets(hostItem); GrabbableObject val2 = itemTargets[Random.Range(0, itemTargets.Count)]; Vector3 position2 = ((Component)hostItem).transform.position; Vector3 position3 = ((Component)val2).transform.position; List nearbyPlayers = getNearbyPlayers(); NavMeshHit val4 = default(NavMeshHit); foreach (PlayerControllerB item in nearbyPlayers) { Vector3 val3 = position3 + new Vector3(-5f + Random.Range(0f, 10f), -5f + Random.Range(0f, 10f), -5f + Random.Range(0f, 10f)); if (NavMesh.SamplePosition(val3, ref val4, 15f, -1)) { teleportPlayerClientRpc(((NetworkBehaviour)item).NetworkObjectId, ((NavMeshHit)(ref val4)).position); } else { teleportPlayerClientRpc(((NetworkBehaviour)item).NetworkObjectId, position3); } if (val2.isInFactory) { SetAudioPresetClientRpc(((NetworkBehaviour)item).NetworkObjectId); } } if (hostItem.isHeld && Object.op_Implicit((Object)(object)hostItem.playerHeldBy)) { if (((Object)hostItem).GetInstanceID() != ((Object)val2).GetInstanceID()) { teleportItemClientRpc(position2, ((NetworkBehaviour)val2).NetworkObjectId); bool isInFactory = hostItem.isInFactory; bool isInFactory2 = val2.isInFactory; hostItem.isInFactory = isInFactory2; val2.isInFactory = isInFactory; } } else if (hostItem.isHeld && hostItem.isHeldByEnemy) { hostItem.DiscardItemFromEnemy(); teleportItemClientRpc(position3, ((NetworkBehaviour)hostItem).NetworkObjectId); teleportItemClientRpc(position2, ((NetworkBehaviour)val2).NetworkObjectId); bool isInFactory3 = hostItem.isInFactory; bool isInFactory4 = val2.isInFactory; hostItem.isInFactory = isInFactory4; val2.isInFactory = isInFactory3; } else { teleportItemClientRpc(position3, ((NetworkBehaviour)hostItem).NetworkObjectId); teleportItemClientRpc(position2, ((NetworkBehaviour)val2).NetworkObjectId); bool isInFactory5 = hostItem.isInFactory; bool isInFactory6 = val2.isInFactory; hostItem.isInFactory = isInFactory6; val2.isInFactory = isInFactory5; } itemsTeleportedTo.Add(((Object)val2).GetInstanceID()); } } [ClientRpc] public void teleportItemClientRpc(Vector3 pos, ulong itemid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014f: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4131987086u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); BytePacker.WriteValueBitPacked(val2, itemid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4131987086u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; GrabbableObject[] array = Object.FindObjectsOfType(); GrabbableObject val3 = null; GrabbableObject[] array2 = array; foreach (GrabbableObject val4 in array2) { if (((NetworkBehaviour)val4).NetworkObjectId == itemid) { val3 = val4; } } if ((Object)(object)val3 == (Object)null) { Plugin.Logger.LogError((object)"Easter Island Quantum Item Error: failed to find item for player teleport!"); return; } val3.startFallingPosition = pos; ((Component)val3).transform.position = pos; val3.FallToGround(false, false, default(Vector3)); } [ClientRpc] public void teleportPlayerClientRpc(ulong playerid, Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2913414184u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2913414184u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB val3 = null; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val4 in array) { if (((NetworkBehaviour)val4).NetworkObjectId == playerid) { val3 = val4; } } if ((Object)(object)val3 == (Object)null) { Plugin.Logger.LogError((object)"Easter Island Quantum Item Error: failed to find player for player teleport!"); } else { ((Component)val3).transform.position = pos; } } public List getNearbyPlayers() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB[] array = Object.FindObjectsOfType(); List list = new List(); PlayerControllerB[] array2 = array; foreach (PlayerControllerB val in array2) { if (Vector3.Distance(((Component)val).transform.position, ((Component)hostItem).transform.position) < 8f) { list.Add(val); } } return list; } public PlayerControllerB getNearestPlayer() { //IL_0025: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB[] array = Object.FindObjectsOfType(); float num = 9999f; PlayerControllerB result = null; PlayerControllerB[] array2 = array; foreach (PlayerControllerB val in array2) { if (Vector3.Distance(((Component)val).transform.position, ((Component)hostItem).transform.position) < num) { result = val; num = Vector3.Distance(((Component)val).transform.position, ((Component)hostItem).transform.position); } } return result; } [ClientRpc] private void SetAudioPresetClientRpc(ulong playerid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_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) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3599005628u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3599005628u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB val3 = null; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val4 in array) { if (((NetworkBehaviour)val4).NetworkObjectId == playerid) { val3 = val4; } } if ((Object)(object)val3 == (Object)null) { Plugin.Logger.LogError((object)"Easter Island Quantum Item Error: failed to find player for Audio Preset!"); } else { Object.FindObjectOfType().audioPresets[2].ChangeAudioReverbForPlayer(val3); } } public List getItemTargets(GrabbableObject hostingItem) { GrabbableObject[] array = Object.FindObjectsOfType(); List list = new List(); if (array.Length == 1) { list.Add(array[0]); return list; } GrabbableObject[] array2 = array; foreach (GrabbableObject val in array2) { if (((Object)val.itemProperties).name.Equals(((Object)hostingItem.itemProperties).name) && ((Object)val).GetInstanceID() != ((Object)hostingItem).GetInstanceID() && (val.isInFactory || !hostingItem.isInFactory)) { list.Add(val); } } if (list.Count == 0) { list = new List(); list.Add(hostingItem); } return list; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2691398462u, new RpcReceiveHandler(__rpc_handler_2691398462), "initClientRpc"); ((NetworkBehaviour)this).__registerRpc(3938071111u, new RpcReceiveHandler(__rpc_handler_3938071111), "tier1ClientRpc"); ((NetworkBehaviour)this).__registerRpc(2656192976u, new RpcReceiveHandler(__rpc_handler_2656192976), "tier2ClientRpc"); ((NetworkBehaviour)this).__registerRpc(1544694196u, new RpcReceiveHandler(__rpc_handler_1544694196), "tier3ClientRpc"); ((NetworkBehaviour)this).__registerRpc(2030709911u, new RpcReceiveHandler(__rpc_handler_2030709911), "teleSoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(2306016485u, new RpcReceiveHandler(__rpc_handler_2306016485), "stopSoundsClientRpc"); ((NetworkBehaviour)this).__registerRpc(3804902141u, new RpcReceiveHandler(__rpc_handler_3804902141), "setArcsClientRpc"); ((NetworkBehaviour)this).__registerRpc(1747313565u, new RpcReceiveHandler(__rpc_handler_1747313565), "setBallSizeClientRpc"); ((NetworkBehaviour)this).__registerRpc(4131987086u, new RpcReceiveHandler(__rpc_handler_4131987086), "teleportItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(2913414184u, new RpcReceiveHandler(__rpc_handler_2913414184), "teleportPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3599005628u, new RpcReceiveHandler(__rpc_handler_3599005628), "SetAudioPresetClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2691398462(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong id = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumItemScript)(object)target).initClientRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3938071111(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; ((QuantumItemScript)(object)target).tier1ClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2656192976(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; ((QuantumItemScript)(object)target).tier2ClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1544694196(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; ((QuantumItemScript)(object)target).tier3ClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2030709911(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; ((QuantumItemScript)(object)target).teleSoundClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2306016485(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; ((QuantumItemScript)(object)target).stopSoundsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3804902141(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 arcsClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref arcsClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumItemScript)(object)target).setArcsClientRpc(arcsClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1747313565(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float ballSizeClientRpc = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref ballSizeClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumItemScript)(object)target).setBallSizeClientRpc(ballSizeClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4131987086(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); ulong itemid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref itemid); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumItemScript)(object)target).teleportItemClientRpc(pos, itemid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2913414184(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumItemScript)(object)target).teleportPlayerClientRpc(playerid, pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3599005628(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong audioPresetClientRpc = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref audioPresetClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumItemScript)(object)target).SetAudioPresetClientRpc(audioPresetClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "QuantumItemScript"; } } internal class SkyBoxBlendScript : MonoBehaviour { public Material skybox1; public Material skybox2; public float transitionDuration = 5f; private float transitionProgress = 0f; private void Start() { RenderSettings.skybox = skybox1; } private void Update() { transitionProgress += Time.deltaTime / transitionDuration; RenderSettings.skybox.Lerp(skybox1, skybox2, transitionProgress); if (transitionProgress > 1f) { transitionProgress = 1f; } } } } namespace EasterIsland.src.EasterIslandScripts.Weather { public class BoltConverter { public static int counter = 1; public static int deathCounter = 1; public static void queueChar(int id) { if (id == counter) { counter++; } else if (counter != 6) { counter = 1; } if (counter != 6) { return; } PlayerControllerB localPlayerController = RoundManager.Instance.playersManager.localPlayerController; if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { if (!Object.op_Implicit((Object)(object)localPlayerController.currentlyHeldObjectServer)) { return; } queueBoltServerRpc(((NetworkBehaviour)localPlayerController.currentlyHeldObjectServer).NetworkObject.NetworkObjectId); } counter = 1; } public static void queueChar2(int id) { if (id == deathCounter) { deathCounter++; } else if (deathCounter != 6) { deathCounter = 1; } if (deathCounter == 6) { PlayerControllerB localPlayerController = RoundManager.Instance.playersManager.localPlayerController; if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { commitDieServerRpc(((NetworkBehaviour)localPlayerController).NetworkObject.NetworkObjectId); } deathCounter = 1; } } [ServerRpc(RequireOwnership = false)] public static void queueBoltServerRpc(ulong itemUID) { //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)getBolt())) { bool flag = false; Debug.Log((object)"No bolt exists. Attempting to spawn bolt..."); List spawnableScrap = RoundManager.Instance.currentLevel.spawnableScrap; foreach (SpawnableItemWithRarity item in spawnableScrap) { if (item != null && !((Object)(object)item.spawnableItem == (Object)null) && !((Object)(object)item.spawnableItem.spawnPrefab == (Object)null)) { string text = ((Object)item.spawnableItem.spawnPrefab).name.ToLower(); Debug.Log((object)("spawn indice: " + text)); if (text.Contains("big") && text.Contains("bolt")) { GameObject val = Object.Instantiate(item.spawnableItem.spawnPrefab, Vector3.zero, Quaternion.identity, new GameObject().transform); GrabbableObject component = val.GetComponent(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.scrapValue = 1; component.SetScrapValue(component.scrapValue); NetworkObject component2 = val.GetComponent(); component2.Spawn(true); int[] array = new int[1] { component.scrapValue }; NetworkObjectReference[] array2 = (NetworkObjectReference[])(object)new NetworkObjectReference[1] { NetworkObjectReference.op_Implicit(component2) }; val.GetComponent().SetScrapValue(component.scrapValue); flag = true; } } } Debug.Log((object)("Bolt spawn status: " + flag)); } queueBoltClientRpc(itemUID); } [ServerRpc(RequireOwnership = false)] public static void commitDieServerRpc(ulong playerUID) { commitDieClientRpc(playerUID); } public static void commitDieClientRpc(ulong playerUID) { //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (((NetworkBehaviour)val).NetworkObject.NetworkObjectId == playerUID) { val.KillPlayer(new Vector3(0f, 10f, 0f), true, (CauseOfDeath)0, 0, default(Vector3), false); } } } [ClientRpc] public static void queueBoltClientRpc(ulong itemUID) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } GrabbableObject[] array = Object.FindObjectsOfType(); GrabbableObject[] array2 = array; foreach (GrabbableObject val in array2) { if (((NetworkBehaviour)val).NetworkObject.NetworkObjectId != itemUID) { continue; } Debug.Log((object)("object to convert: " + (object)val)); GrabbableObject bolt = getBolt(); MeshFilter component = ((Component)bolt).GetComponent(); Debug.Log((object)("bolt: " + (object)bolt)); Debug.Log((object)("bolt filter: " + (object)component)); Debug.Log((object)"Destroying Mesh Renderer and Filter..."); Debug.Log((object)("object = " + (object)val)); Debug.Log((object)"Adding Filters"); MeshFilter[] componentsInChildren = ((Component)val).gameObject.GetComponentsInChildren(); foreach (MeshFilter val2 in componentsInChildren) { Debug.Log((object)("object filter: " + (object)val2)); if ((Object)(object)val2 != (Object)null) { val2.mesh = component.mesh; } } SkinnedMeshRenderer[] componentsInChildren2 = ((Component)val).gameObject.GetComponentsInChildren(); foreach (SkinnedMeshRenderer val3 in componentsInChildren2) { Debug.Log((object)("object skin filter: " + (object)val3)); if ((Object)(object)val3 != (Object)null) { val3.sharedMesh = component.mesh; } } } } public static GrabbableObject getBolt() { GrabbableObject[] array = Object.FindObjectsOfType(); GrabbableObject[] array2 = array; foreach (GrabbableObject val in array2) { string text = val.itemProperties.itemName.ToLower(); if (text.Contains("bolt") && text.Contains("big")) { return val; } } return null; } public static MeshRenderer getBoltRenderer(GrabbableObject bolt) { return ((Component)bolt).gameObject.GetComponent(); } public static MeshFilter getBoltFilter(GrabbableObject bolt) { return ((Component)bolt).gameObject.GetComponent(); } } public class QuantumFlux : NetworkBehaviour { public struct teleportLog { public ulong uid; public float time; } public NavMeshAgent agent; private Vector3 targetPosition; private Random r = new Random(); private float lifetime = 10f; private float chargeTime = 3f; private bool activated = false; public Collider collider; public GameObject chargingObject; public GameObject fluxObject; public static EnemyAI[] ais; public AudioSource quantumExplosion; private float timeTick = -1f; public static List teleports; public static List fluxes; public GameObject teleportFX; public AudioClip teleportSound; public void Start() { findNewPosition(); chargingObject.SetActive(true); fluxObject.SetActive(false); if (teleports == null) { teleports = new List(); fluxes = new List(); } ais = Object.FindObjectsOfType(); ((Component)this).transform.SetParent(RoundManager.Instance.mapPropsContainer.transform); fluxes.Add(((Component)this).gameObject); } public void Update() { //IL_017b: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) if (Time.time - timeTick > 0.2f) { timeTick = Time.time; if ((Object)(object)RoundManager.Instance.dungeonGenerator == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } EnemyAI[] array = ais; foreach (EnemyAI val in array) { if (Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position) <= 7.5f) { Debug.Log((object)("Teleporting Enemy: " + ((Object)val).name)); teleportEnemy(val); } } } if (activated) { if (Vector3.Distance(((Component)this).gameObject.transform.position, agent.destination) < 8f || (int)agent.pathStatus == 2) { findNewPosition(); agent.SetDestination(targetPosition); } lifetime -= Time.deltaTime; if (lifetime <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } else { chargingObject.transform.localPosition = new Vector3(0f, chargeTime / 3f, 0f); if (chargeTime <= 0f) { activated = true; chargingObject.SetActive(false); fluxObject.SetActive(true); quantumExplosion.Play(); } chargeTime -= Time.deltaTime; } } private void OnCollisionEnter(Collision collision) { if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } GameObject gameObject = collision.gameObject; if (Object.op_Implicit((Object)(object)collision.gameObject)) { PlayerControllerB val = playerParentWalk(gameObject); if (Object.op_Implicit((Object)(object)val)) { updateLogs(); teleportPlayer(val); } } else if (!Object.op_Implicit((Object)(object)collision.collider)) { } } public void OnDestroy() { fluxes.Remove(((Component)this).gameObject); } public void updateLogs() { teleports.RemoveAll((teleportLog log) => Time.time - log.time >= 2f); } public bool notRecentlyTeleported(ulong uid) { foreach (teleportLog teleport in teleports) { if (teleport.uid == uid && Time.time - teleport.time < 2f) { return false; } } return true; } public void teleportPlayer(PlayerControllerB player) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) Vector3 telePosition = getTelePosition(); if (!(telePosition == Vector3.zero) && notRecentlyTeleported(((NetworkBehaviour)player).NetworkObjectId)) { teleportLog item = default(teleportLog); item.uid = ((NetworkBehaviour)player).NetworkObject.NetworkObjectId; item.time = Time.time; teleports.Add(item); confirmTeleportPlayerClientRpc(((NetworkBehaviour)player).NetworkObjectId, getTelePosition()); } } public void teleportEnemy(EnemyAI enemy) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Vector3 telePosition = getTelePosition(); if (!(telePosition == Vector3.zero)) { if (notRecentlyTeleported(((NetworkBehaviour)enemy).NetworkObjectId)) { teleportLog item = default(teleportLog); item.uid = ((NetworkBehaviour)enemy).NetworkObject.NetworkObjectId; item.time = Time.time; teleports.Add(item); confirmTeleportEnemyClientRpc(((NetworkBehaviour)enemy).NetworkObject.NetworkObjectId, getTelePosition()); } else { Debug.Log((object)"Denying Teleport. Already teleported recently."); } } } public Vector3 getTelePosition() { //IL_007a: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) GameObject val = null; for (int i = 0; i < 5; i++) { GameObject val2 = fluxes[r.Next(0, fluxes.Count)]; if ((Object)(object)val2 != (Object)(object)((Component)this).gameObject) { val = val2; break; } } if ((Object)(object)val == (Object)null) { Debug.Log((object)"Get Teleposition failure"); return Vector3.zero; } NavMeshHit val3 = default(NavMeshHit); if (NavMesh.SamplePosition(val.transform.position, ref val3, 6f, -1)) { Debug.Log((object)"Get Teleposition fully successful."); return ((NavMeshHit)(ref val3)).position; } Debug.Log((object)"Get Teleposition partially successful."); return val.transform.position; } [ClientRpc] public void confirmTeleportPlayerClientRpc(ulong uid, Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0143: 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_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(560888963u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 560888963u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == uid) { PlaySoundAtPosition(teleportSound, ((Component)val3).transform.position); particleEffectSpawn(((Component)val3).transform.position); PlaySoundAtPosition(teleportSound, position); particleEffectSpawn(position); ((Component)val3).transform.position = position; } } } public void PlaySoundAtPosition(AudioClip clip, Vector3 position, float volume = 1f, float minDistance = 1f, float maxDistance = 35f) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("TempAudio"); val.transform.position = position; AudioSource val2 = val.AddComponent(); val2.clip = clip; val2.volume = volume; val2.spatialBlend = 1f; val2.minDistance = minDistance; val2.maxDistance = maxDistance; val2.rolloffMode = (AudioRolloffMode)1; val2.Play(); Object.Destroy((Object)(object)val, clip.length); } public async void particleEffectSpawn(Vector3 position) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) GameObject obj = Object.Instantiate(teleportFX, position, teleportFX.transform.rotation); obj.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform); await Task.Delay(60000); Object.Destroy((Object)(object)obj); } [ClientRpc] public void confirmTeleportEnemyClientRpc(ulong uid, Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_014e: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3424000113u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3424000113u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; List spawnedEnemies = RoundManager.Instance.SpawnedEnemies; foreach (EnemyAI item in spawnedEnemies) { if (((NetworkBehaviour)item).NetworkObject.NetworkObjectId == uid) { PlaySoundAtPosition(teleportSound, item.serverPosition); particleEffectSpawn(item.serverPosition); PlaySoundAtPosition(teleportSound, position); particleEffectSpawn(position); item.serverPosition = position; ((Component)item).transform.position = position; item.agent.Warp(item.serverPosition); item.SyncPositionToClients(); Debug.Log((object)"Teleport Successful (ConfirmTeleportEnemyClientRPC)"); return; } } Debug.Log((object)"Teleport Unsuccessful (ConfirmTeleportEnemyClientRPC)"); } public PlayerControllerB playerParentWalk(GameObject leaf) { while ((Object)(object)leaf != (Object)null && (Object)(object)leaf.GetComponent() == (Object)null) { leaf = ((!Object.op_Implicit((Object)(object)leaf.transform.parent) || !Object.op_Implicit((Object)(object)((Component)leaf.transform.parent).gameObject)) ? null : ((Component)leaf.transform.parent).gameObject); } if (Object.op_Implicit((Object)(object)leaf) && Object.op_Implicit((Object)(object)leaf.GetComponent())) { return leaf.GetComponent(); } return null; } public EnemyAI enemyParentWalk(GameObject leaf) { while ((Object)(object)leaf != (Object)null && (Object)(object)leaf.GetComponent() == (Object)null) { leaf = ((!Object.op_Implicit((Object)(object)leaf.transform.parent) || !Object.op_Implicit((Object)(object)((Component)leaf.transform.parent).gameObject)) ? null : ((Component)leaf.transform.parent).gameObject); } if (Object.op_Implicit((Object)(object)leaf) && Object.op_Implicit((Object)(object)leaf.GetComponent())) { return leaf.GetComponent(); } return null; } public void findNewPosition() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c9: 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) GameObject[] outsideAINodes = RoundManager.Instance.outsideAINodes; Vector3 position = outsideAINodes[r.Next(0, outsideAINodes.Length)].transform.position; float num = (float)(r.NextDouble() * 10.0 - 5.0); float num2 = (float)(r.NextDouble() * 10.0 - 5.0); float num3 = (float)(r.NextDouble() * 10.0 - 5.0); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(position.x + num, position.y + num2, position.z + num3); NavMeshHit val2 = default(NavMeshHit); if (NavMesh.SamplePosition(val, ref val2, 30f, -1)) { targetPosition = ((NavMeshHit)(ref val2)).position; } else { targetPosition = position; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(560888963u, new RpcReceiveHandler(__rpc_handler_560888963), "confirmTeleportPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3424000113u, new RpcReceiveHandler(__rpc_handler_3424000113), "confirmTeleportEnemyClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_560888963(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumFlux)(object)target).confirmTeleportPlayerClientRpc(uid, position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3424000113(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumFlux)(object)target).confirmTeleportEnemyClientRpc(uid, position); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "QuantumFlux"; } } } namespace EasterIsland.src.EasterIslandScripts.MapExpansion { [RequireComponent(typeof(SphereCollider))] public class MoaiStatueTalker : NetworkBehaviour { public string[] lines; public float[] lineDelays; public AudioSource[] voiceSounds; public string speakerName = "Moai"; public float minTriggerRadius = 3f; public float maxTriggerRadius = 15f; public float rotationSpeed = 90f; public bool speakOncePerPlayer = false; private SphereCollider triggerCollider; private float activeRadius; private PlayerControllerB targetPlayer; private bool isSpeaking = false; private bool hasSpoken = false; private static MoaiStatueTalker currentSpeaker; private void Awake() { triggerCollider = ((Component)this).GetComponent(); ((Collider)triggerCollider).isTrigger = true; activeRadius = Random.Range(minTriggerRadius, maxTriggerRadius); triggerCollider.radius = activeRadius; } private void Update() { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsServer) { return; } if (!isSpeaking && (Object)(object)currentSpeaker == (Object)null) { if (speakOncePerPlayer && hasSpoken) { return; } PlayerControllerB val = FindClosestPlayerInRange(); if ((Object)(object)val != (Object)null) { targetPlayer = val; ((MonoBehaviour)this).StartCoroutine(SpeakRoutine()); } } if (isSpeaking && (Object)(object)targetPlayer != (Object)null) { Vector3 val2 = ((Component)targetPlayer).transform.position - ((Component)this).transform.position; val2.y = 0f; if (((Vector3)(ref val2)).sqrMagnitude > 0.01f) { Quaternion val3 = Quaternion.LookRotation(val2); ((Component)this).transform.rotation = Quaternion.RotateTowards(((Component)this).transform.rotation, val3, rotationSpeed * Time.deltaTime); } } } private PlayerControllerB FindClosestPlayerInRange() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB result = null; float num = activeRadius * activeRadius; PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && val.isPlayerControlled && !val.isPlayerDead) { Vector3 val2 = ((Component)val).transform.position - ((Component)this).transform.position; float sqrMagnitude = ((Vector3)(ref val2)).sqrMagnitude; if (sqrMagnitude <= num) { num = sqrMagnitude; result = val; } } } return result; } private bool IsPlayerStillInRange(PlayerControllerB p) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)p == (Object)null || !p.isPlayerControlled || p.isPlayerDead) { return false; } Vector3 val = ((Component)p).transform.position - ((Component)this).transform.position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; return sqrMagnitude <= activeRadius * activeRadius; } private IEnumerator SpeakRoutine() { currentSpeaker = this; isSpeaking = true; ulong targetClientId = targetPlayer.actualClientId; for (int i = 0; i < lines.Length; i++) { if (!IsPlayerStillInRange(targetPlayer)) { break; } int soundIndex = -1; if (voiceSounds != null && voiceSounds.Length != 0) { soundIndex = Random.Range(0, voiceSounds.Length); } SpeakLineClientRpc(lines[i], targetClientId, soundIndex); float delay = ((i < lineDelays.Length) ? lineDelays[i] : 3f); yield return (object)new WaitForSeconds(delay); } isSpeaking = false; hasSpoken = true; targetPlayer = null; if ((Object)(object)currentSpeaker == (Object)(object)this) { currentSpeaker = null; } OnDialogueComplete(); } [ClientRpc] private void SpeakLineClientRpc(string line, ulong targetClientId, int soundIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3764478431u, val, (RpcDelivery)0); bool flag = line != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(line, false); } BytePacker.WriteValueBitPacked(val2, targetClientId); BytePacker.WriteValueBitPacked(val2, soundIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3764478431u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = GameNetworkManager.Instance?.localPlayerController; if ((Object)(object)val3 != (Object)null && val3.actualClientId == targetClientId) { HUDManager.Instance.DisplayTip(speakerName, line, false, false, "LC_Tip1"); } if (soundIndex >= 0 && voiceSounds != null && soundIndex < voiceSounds.Length) { AudioSource val4 = voiceSounds[soundIndex]; if ((Object)(object)val4 != (Object)null) { val4.Play(); } } } protected virtual void OnDialogueComplete() { } public override void OnNetworkDespawn() { if ((Object)(object)currentSpeaker == (Object)(object)this) { currentSpeaker = null; } ((NetworkBehaviour)this).OnNetworkDespawn(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3764478431u, new RpcReceiveHandler(__rpc_handler_3764478431), "SpeakLineClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3764478431(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string line = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref line, false); } ulong targetClientId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref targetClientId); int soundIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref soundIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((MoaiStatueTalker)(object)target).SpeakLineClientRpc(line, targetClientId, soundIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "MoaiStatueTalker"; } } } namespace EasterIsland.src.EasterIslandScripts.ItemSpawners { public class GHFItemSpawner : MonoBehaviour { private bool awaitSpawn = true; public void OnEnable() { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { SpawnItem(); } } private async void SpawnItem() { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { while (RoundManager.Instance.dungeonIsGenerating) { await Task.Delay(1000); } while (!RoundManager.Instance.dungeonCompletedGenerating) { await Task.Delay(1000); } while (!StartOfRound.Instance.shipHasLanded) { await Task.Delay(1000); } while (awaitSpawn) { awaitSpawn = false; GameObject gameObject = Object.Instantiate(Plugin.GHFPrefab, ((Component)this).transform.position + Vector3.up * 0.5f, Quaternion.Euler(Vector3.zero), RoundManager.Instance.spawnedScrapContainer); gameObject.SetActive(true); gameObject.GetComponent().Spawn(false); gameObject.GetComponent().targetFloorPosition = ((Component)this).transform.position + Vector3.up * 0.5f; Object.Destroy((Object)(object)((Component)this).gameObject); } } } } public class KingItemSpawner : MonoBehaviour { private bool awaitSpawn = true; public void OnEnable() { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { SpawnItem(); } } private async void SpawnItem() { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { while (RoundManager.Instance.dungeonIsGenerating) { await Task.Delay(1000); } while (!RoundManager.Instance.dungeonCompletedGenerating) { await Task.Delay(1000); } while (!StartOfRound.Instance.shipHasLanded) { await Task.Delay(1000); } while (awaitSpawn) { awaitSpawn = false; GameObject gameObject = Object.Instantiate(Plugin.KingPrefab, ((Component)this).transform.position + Vector3.up * 0.5f, Quaternion.Euler(Vector3.zero), RoundManager.Instance.spawnedScrapContainer); gameObject.SetActive(true); gameObject.GetComponent().Spawn(false); ((GrabbableObject)gameObject.GetComponent()).targetFloorPosition = ((Component)this).transform.position + Vector3.up * 0.5f; Object.Destroy((Object)(object)((Component)this).gameObject); } } } } public class PlasmaCannonItemSpawner : MonoBehaviour { private bool awaitSpawn = true; public void OnEnable() { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { SpawnItem(); } } private async void SpawnItem() { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { while (RoundManager.Instance.dungeonIsGenerating) { await Task.Delay(1000); } while (!RoundManager.Instance.dungeonCompletedGenerating) { await Task.Delay(1000); } while (!StartOfRound.Instance.shipHasLanded) { await Task.Delay(1000); } while (awaitSpawn) { awaitSpawn = false; GameObject gameObject = Object.Instantiate(Plugin.MorshuPrefab, ((Component)this).transform.position + Vector3.up * 0.5f, Quaternion.Euler(Vector3.zero), RoundManager.Instance.spawnedScrapContainer); gameObject.SetActive(true); gameObject.GetComponent().Spawn(false); ((GrabbableObject)gameObject.GetComponent()).targetFloorPosition = ((Component)this).transform.position + Vector3.up * 0.5f; Object.Destroy((Object)(object)((Component)this).gameObject); } } } } public class QuantumPaintingItemSpawner : MonoBehaviour { private bool awaitSpawn = true; public void OnEnable() { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { SpawnItem(); } } private async void SpawnItem() { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { while (RoundManager.Instance.dungeonIsGenerating) { await Task.Delay(1000); } while (!RoundManager.Instance.dungeonCompletedGenerating) { await Task.Delay(1000); } while (!StartOfRound.Instance.shipHasLanded) { await Task.Delay(1000); } while (awaitSpawn) { awaitSpawn = false; GameObject gameObject = Object.Instantiate(Plugin.QuantumPaintingPrefab, ((Component)this).transform.position + Vector3.up * 0.5f, Quaternion.Euler(Vector3.zero), RoundManager.Instance.spawnedScrapContainer); gameObject.SetActive(true); gameObject.GetComponent().Spawn(false); gameObject.GetComponent().targetFloorPosition = ((Component)this).transform.position + Vector3.up * 0.5f; Object.Destroy((Object)(object)((Component)this).gameObject); } } } } } namespace EasterIsland.src.EasterIslandScripts.Library_Easter_egg { public class ButtonPressScreenUpdater : NetworkBehaviour { public Animator buttonAnimator; public SelectScreenManager screen; public AudioSource flickSound; public void Start() { } public void CreateAndPlayAnimation() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { animClientRpc(); } else { animServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void animServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(244681893u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 244681893u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animClientRpc(); } } } [ClientRpc] public void animClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2293251554u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2293251554u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; startEvent(); } } } public async void startEvent() { buttonAnimator.Play("Pressing_Anim"); flickSound.Play(); screen.swapClientRpc(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(244681893u, new RpcReceiveHandler(__rpc_handler_244681893), "animServerRpc"); ((NetworkBehaviour)this).__registerRpc(2293251554u, new RpcReceiveHandler(__rpc_handler_2293251554), "animClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_244681893(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; ((ButtonPressScreenUpdater)(object)target).animServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2293251554(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; ((ButtonPressScreenUpdater)(object)target).animClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ButtonPressScreenUpdater"; } } public class ButtonPressSurgeryClear : NetworkBehaviour { public Animator buttonAnimator; public AudioSource flickSound; private float elapsedTime = 0f; private bool isAnimating = false; public AudioSource initialPrep; public AudioSource surgeryNoise; public AudioSource surgeryCompletedNoise; public SelectScreenManager screen; public Animator shrineAnimator; public Collider surgeryHitBox; public List targetPlayers = new List(); public InteractTrigger opposingTrigger; public void Start() { } public void CreateAndPlayAnimation() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { animClientRpc(); } else { animServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void animServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2309290222u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2309290222u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animClientRpc(); } } } [ClientRpc] public void animClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(952789363u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 952789363u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; startEvent(); } } } public async void startEvent() { buttonAnimator.Play("Pressing_Anim"); flickSound.Play(); opposingTrigger.currentCooldownValue = 30f; opposingTrigger.cooldownTime = 30f; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { pingCooldownClientRpc(); } else { pingCoolDownServerRpc(); } beginRemoval(); } [ServerRpc] public void pingCoolDownServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__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(69755399u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 69755399u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; pingCooldownClientRpc(); } } [ClientRpc] public void pingCooldownClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(273716963u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 273716963u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; opposingTrigger.currentCooldownValue = 30f; opposingTrigger.cooldownTime = 30f; } } } public async void beginRemoval() { flickSound.Play(); initialPrep.Play(); await Task.Delay(2000); shrineAnimator.Play("Transform"); surgeryNoise.Play(); if (screen.selectedID == 0) { HUDManager.Instance.DisplayTip("Modification: REMOVAL", "Pending procedure. Please have a seat. Starting Modification Sequence in 10 seconds.", false, false, "LC_Tip1"); } else { HUDManager.Instance.DisplayTip("Modification: REMOVAL", "Pending procedure. Please have a seat. Starting Modification Sequence in 10 seconds.", false, false, "LC_Tip1"); } await Task.Delay(5000); HUDManager.Instance.DisplayTip("5 seconds remaining", "Please dispose of the wasted prototype post surgery", false, false, "LC_Tip1"); await Task.Delay(14000); removeParts(); await Task.Delay(8000); surgeryCompletedNoise.Play(); shrineAnimator.Play("Idle"); } public void removeParts() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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) DogHeadMod[] array = Object.FindObjectsOfType(); BaboonWingMod[] array2 = Object.FindObjectsOfType(); foreach (PlayerControllerB targetPlayer in targetPlayers) { if (!Object.op_Implicit((Object)(object)targetPlayer) || Object.op_Implicit((Object)(object)((Component)targetPlayer).GetComponentInChildren()) || !((NetworkBehaviour)RoundManager.Instance).IsHost) { continue; } DogHeadMod[] array3 = array; foreach (DogHeadMod dogHeadMod in array3) { if (Object.op_Implicit((Object)(object)((Component)dogHeadMod).gameObject) && Vector3.Distance(((Component)targetPlayer).transform.position, ((Component)dogHeadMod).transform.position) < 1.5f) { Object.Destroy((Object)(object)((Component)dogHeadMod).gameObject); } } BaboonWingMod[] array4 = array2; foreach (BaboonWingMod baboonWingMod in array4) { if (Object.op_Implicit((Object)(object)((Component)baboonWingMod).gameObject) && Vector3.Distance(((Component)targetPlayer).transform.position, ((Component)baboonWingMod).transform.position) < 1.5f) { Object.Destroy((Object)(object)((Component)baboonWingMod).gameObject); } } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2309290222u, new RpcReceiveHandler(__rpc_handler_2309290222), "animServerRpc"); ((NetworkBehaviour)this).__registerRpc(952789363u, new RpcReceiveHandler(__rpc_handler_952789363), "animClientRpc"); ((NetworkBehaviour)this).__registerRpc(69755399u, new RpcReceiveHandler(__rpc_handler_69755399), "pingCoolDownServerRpc"); ((NetworkBehaviour)this).__registerRpc(273716963u, new RpcReceiveHandler(__rpc_handler_273716963), "pingCooldownClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2309290222(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; ((ButtonPressSurgeryClear)(object)target).animServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_952789363(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; ((ButtonPressSurgeryClear)(object)target).animClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_69755399(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((ButtonPressSurgeryClear)(object)target).pingCoolDownServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_273716963(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; ((ButtonPressSurgeryClear)(object)target).pingCooldownClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ButtonPressSurgeryClear"; } } public class AnyItemPedestal : NetworkBehaviour { public InteractTrigger trigger; public Transform insertionTransform; public Transform dropTransform; public GrabbableObject insertedObj = null; private bool hasObj = false; public void interact(PlayerControllerB ply) { if (!hasObj) { yoinkItem(ply); } else { grantItem(ply); } } [ServerRpc(RequireOwnership = false)] public void setActivedServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3057857959u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3057857959u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; } } } [ClientRpc] public void setActivatedClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2269437130u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2269437130u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; } } } [ClientRpc] public void boostValueClientRpc(float mult) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2052580987u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref mult, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2052580987u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (Object.op_Implicit((Object)(object)insertedObj)) { insertedObj.SetScrapValue((int)((float)insertedObj.scrapValue * mult)); } } } public bool yoinkItem(PlayerControllerB player) { GrabbableObject[] itemSlots = player.ItemSlots; GrabbableObject val = null; val = player.currentlyHeldObjectServer; Plugin.Logger.LogMessage((object)("Held Object being inserted: " + (object)val)); if (Object.op_Implicit((Object)(object)val)) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { takeItemClientRpc(((NetworkBehaviour)player).NetworkObjectId, ((NetworkBehaviour)val).NetworkObjectId); } else { takeItemServerRpc(((NetworkBehaviour)player).NetworkObjectId, ((NetworkBehaviour)val).NetworkObjectId); } return true; } return false; } public void grantItem(PlayerControllerB player) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { onGrantClientRpc(); } else { onGrantServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void onGrantServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(225755871u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 225755871u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; onGrantClientRpc(); } } } [ClientRpc] public void onGrantClientRpc() { //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_00fe: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2532409777u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2532409777u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; hasObj = false; ((Behaviour)insertedObj).enabled = true; ((Component)insertedObj).transform.parent = null; ((Component)insertedObj).transform.position = dropTransform.position; insertedObj.startFallingPosition = dropTransform.position; insertedObj.targetFloorPosition = dropTransform.position; ((Component)insertedObj).transform.position = dropTransform.position; trigger.hoverTip = "Insert Item"; insertedObj = null; } } } [ServerRpc(RequireOwnership = false)] public void takeItemServerRpc(ulong playerid, ulong itemid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2621369199u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); BytePacker.WriteValueBitPacked(val2, itemid); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2621369199u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; takeItemClientRpc(playerid, itemid); } } } [ClientRpc] public void takeItemClientRpc(ulong playerid, ulong itemid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4071771259u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); BytePacker.WriteValueBitPacked(val2, itemid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4071771259u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; hasObj = true; trigger.hoverTip = "Remove Item"; PlayerControllerB player = getPlayer(playerid); if (!Object.op_Implicit((Object)(object)player)) { Debug.LogError((object)"Item Pedestal: Could not find target player for item removal! Cancelling item removal."); return; } GrabbableObject[] itemSlots = player.ItemSlots; foreach (GrabbableObject val3 in itemSlots) { if (!Object.op_Implicit((Object)(object)val3) || !Object.op_Implicit((Object)(object)((Component)val3).gameObject) || ((NetworkBehaviour)val3).NetworkObjectId != itemid) { continue; } if (!val3.isPocketed) { insertedObj = DropHeldItem(player); if (!Object.op_Implicit((Object)(object)insertedObj)) { Debug.LogError((object)"Item Pedestal: Could not find target item for movement to pedestal (player was found)!"); } ((Behaviour)insertedObj).enabled = false; ((Component)insertedObj).gameObject.transform.parent = insertionTransform; ((Component)insertedObj).gameObject.transform.localPosition = Vector3.zero; Debug.Log((object)"Item Pedestal: Dropped Held Object"); } return; } Debug.LogError((object)"Item Pedestal: Could not find target item for movement to pedestal (player was found)! Cancelling item removal."); } public GrabbableObject DropHeldItem(PlayerControllerB player, bool itemsFall = true) { //IL_0096: 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_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) GrabbableObject[] itemSlots = player.ItemSlots; for (int i = 0; i < itemSlots.Length; i++) { GrabbableObject val = itemSlots[i]; if (!((Object)(object)val != (Object)null) || !val.isHeld) { continue; } if (player.isHoldingObject) { player.isHoldingObject = false; player.playerBodyAnimator.SetBool("cancelHolding", true); player.playerBodyAnimator.SetTrigger("Throw"); } if (itemsFall) { val.parentObject = null; val.heldByPlayerOnServer = false; val.EnablePhysics(true); val.EnableItemMeshes(true); ((Component)val).transform.localScale = val.originalScale; val.isHeld = false; val.isPocketed = false; if (Object.op_Implicit((Object)(object)((Component)val).transform.parent)) { val.startFallingPosition = ((Component)val).transform.parent.InverseTransformPoint(((Component)val).transform.position); } val.fallTime = Random.Range(-0.3f, 0.05f); if (((NetworkBehaviour)this).IsOwner) { val.DiscardItemOnClient(); } else if (!val.itemProperties.syncDiscardFunction) { val.playerHeldBy = null; } } if (((NetworkBehaviour)this).IsOwner) { ((Behaviour)HUDManager.Instance.holdingTwoHandedItem).enabled = false; ((Behaviour)HUDManager.Instance.itemSlotIcons[i]).enabled = false; HUDManager.Instance.ClearControlTips(); player.activatingItem = false; } player.ItemSlots[i] = null; player.activatingItem = false; player.twoHanded = false; player.carryWeight = 1f; player.currentlyHeldObjectServer = null; return val; } return null; } public PlayerControllerB getPlayer(ulong playerid) { PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB result = null; foreach (PlayerControllerB val in allPlayerScripts) { if (((NetworkBehaviour)val).NetworkObjectId == playerid) { result = val; } } return result; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3057857959u, new RpcReceiveHandler(__rpc_handler_3057857959), "setActivedServerRpc"); ((NetworkBehaviour)this).__registerRpc(2269437130u, new RpcReceiveHandler(__rpc_handler_2269437130), "setActivatedClientRpc"); ((NetworkBehaviour)this).__registerRpc(2052580987u, new RpcReceiveHandler(__rpc_handler_2052580987), "boostValueClientRpc"); ((NetworkBehaviour)this).__registerRpc(225755871u, new RpcReceiveHandler(__rpc_handler_225755871), "onGrantServerRpc"); ((NetworkBehaviour)this).__registerRpc(2532409777u, new RpcReceiveHandler(__rpc_handler_2532409777), "onGrantClientRpc"); ((NetworkBehaviour)this).__registerRpc(2621369199u, new RpcReceiveHandler(__rpc_handler_2621369199), "takeItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(4071771259u, new RpcReceiveHandler(__rpc_handler_4071771259), "takeItemClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3057857959(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; ((AnyItemPedestal)(object)target).setActivedServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2269437130(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; ((AnyItemPedestal)(object)target).setActivatedClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2052580987(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float mult = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref mult, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AnyItemPedestal)(object)target).boostValueClientRpc(mult); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_225755871(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; ((AnyItemPedestal)(object)target).onGrantServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2532409777(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; ((AnyItemPedestal)(object)target).onGrantClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2621369199(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); ulong itemid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref itemid); target.__rpc_exec_stage = (__RpcExecStage)1; ((AnyItemPedestal)(object)target).takeItemServerRpc(playerid, itemid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4071771259(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); ulong itemid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref itemid); target.__rpc_exec_stage = (__RpcExecStage)1; ((AnyItemPedestal)(object)target).takeItemClientRpc(playerid, itemid); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "AnyItemPedestal"; } } public class ButtonPressAnimLibrary : NetworkBehaviour { public LibraryPopulator moaiSpawner; public Animator buttonAnimator; public GrabbableObject insertedGrabbableObject; public float[] boostValues = new float[3] { 2f, 1.75f, 1.5f }; private int activations = 0; private float elapsedTime = 0f; private bool isAnimating = false; private bool inEvent = false; public AudioSource flickSound; public AudioSource preparingSound; public AudioSource runningSound; public AudioSource completeSound; public GameObject boostingParticles; public GameObject plasmaExplosionParticles; public AnyItemPedestal ped; public void Start() { boostingParticles.SetActive(false); plasmaExplosionParticles.SetActive(false); } public void CreateAndPlayAnimation() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { animClientRpc(); } else { animServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void animServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(720930263u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 720930263u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animClientRpc(); } } } [ClientRpc] public void animClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1655062375u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1655062375u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; elapsedTime = 0f; isAnimating = true; startEvent(); } } } public async void startEvent() { if (!inEvent) { inEvent = true; int boostVal = Mathf.Min(2, activations); buttonAnimator.Play("Pressing_Anim"); flickSound.Play(); HUDManager.Instance.DisplayTip("Please Wait.", "Preparing to increase item value in gold canister... Boost: " + boostValues[boostVal] + "x time estimation: " + (30 + activations * 15) + "s", false, false, "LC_Tip1"); await Task.Delay(3000); preparingSound.Play(); await Task.Delay(1000); if ((Object)(object)ped.insertedObj == (Object)null) { HUDManager.Instance.DisplayTip("Error", "Item not detected, please insert an item in the gold canister.", false, false, "LC_Tip1"); plasmaExplosionParticles.SetActive(false); boostingParticles.SetActive(false); inEvent = false; return; } int guardianAmount = 3 + Random.Range(0, activations * 2); HUDManager.Instance.DisplayTip("WARNING", "You are not welcome here. Summoning " + guardianAmount + " Guardians.", true, false, "LC_Tip1"); plasmaExplosionParticles.SetActive(false); boostingParticles.SetActive(false); moaiSpawner.PopulateEnvironment(guardianAmount); boostingParticles.SetActive(true); await Task.Delay(20000 + activations * 10000); HUDManager.Instance.DisplayTip("Please Wait.", "Doubling...", false, false, "LC_Tip1"); runningSound.Play(); await Task.Delay(10000 + activations * 5000); HUDManager.Instance.DisplayTip("SUCCESS", "Item Value Increased. Please extract your item.", false, false, "LC_Tip1"); ped.boostValueClientRpc(boostValues[boostVal]); completeSound.Play(); plasmaExplosionParticles.SetActive(true); boostingParticles.SetActive(false); await Task.Delay(4000); plasmaExplosionParticles.SetActive(false); inEvent = false; activations++; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(720930263u, new RpcReceiveHandler(__rpc_handler_720930263), "animServerRpc"); ((NetworkBehaviour)this).__registerRpc(1655062375u, new RpcReceiveHandler(__rpc_handler_1655062375), "animClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_720930263(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; ((ButtonPressAnimLibrary)(object)target).animServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1655062375(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; ((ButtonPressAnimLibrary)(object)target).animClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ButtonPressAnimLibrary"; } } public class ButtonPressAnimLibrary2 : NetworkBehaviour { public LibraryPopulator moaiSpawner; public Animator buttonAnimator; protected Spewer volcano; private bool inEvent = false; public AudioSource flickSound; public AudioSource preparingSound; public AudioSource runningSound; public void Start() { } public void CreateAndPlayAnimation() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { animClientRpc(); } else { animServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void animServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2435386407u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2435386407u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animClientRpc(); } } } [ClientRpc] public void animClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(736828959u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 736828959u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; startEvent(); } } } public async void startEvent() { volcano = Object.FindAnyObjectByType(); if (!inEvent && Object.op_Implicit((Object)(object)volcano)) { inEvent = true; buttonAnimator.Play("Pressing_Anim"); flickSound.Play(); HUDManager.Instance.DisplayTip("Please Wait...", "", false, false, "LC_Tip1"); await Task.Delay(6000); preparingSound.Play(); await Task.Delay(1000); HUDManager.Instance.DisplayTip("Hello Bipedal Ones", "CONGRATULATIONS! You’ve just pressed the BIG RED VOLCANO BUTTON. Anyhow, enjoy the heat!", true, false, "LC_Tip1"); runningSound.Play(); volcano.hoursForce = 2; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2435386407u, new RpcReceiveHandler(__rpc_handler_2435386407), "animServerRpc"); ((NetworkBehaviour)this).__registerRpc(736828959u, new RpcReceiveHandler(__rpc_handler_736828959), "animClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2435386407(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; ((ButtonPressAnimLibrary2)(object)target).animServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_736828959(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; ((ButtonPressAnimLibrary2)(object)target).animClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ButtonPressAnimLibrary2"; } } public class LibraryAINode : MonoBehaviour { } public class LibraryPopulator : NetworkBehaviour { protected GameObject[] libraryAINodes; protected GameObject[] librarySpawnNodes; public void getAllNodes() { LibraryAINode[] array = Object.FindObjectsOfType(); libraryAINodes = (GameObject[])(object)new GameObject[array.Length]; for (int i = 0; i < libraryAINodes.Length; i++) { libraryAINodes[i] = ((Component)array[i]).gameObject; } LibrarySpawnNode[] array2 = Object.FindObjectsOfType(); librarySpawnNodes = (GameObject[])(object)new GameObject[array2.Length]; for (int j = 0; j < librarySpawnNodes.Length; j++) { librarySpawnNodes[j] = ((Component)array2[j]).gameObject; } } public void PopulateEnvironment(int amount) { Plugin.Logger.LogMessage((object)"EI: Populating Library Environment..."); getAllNodes(); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { spawnMoai(amount); } } public async void spawnMoai(int amount) { List enemyList = RoundManager.Instance.currentLevel.DaytimeEnemies; List possibleSpawns = new List(); foreach (SpawnableEnemyWithRarity spawnable in enemyList) { Plugin.Logger.LogInfo((object)spawnable.enemyType.enemyName); if (spawnable.enemyType.enemyName.ToLower().Contains("moai") && !spawnable.enemyType.enemyName.ToLower().Contains("gold")) { possibleSpawns.Add(spawnable); } } for (int i = 0; i < amount; i++) { int randomSelect = Random.RandomRangeInt(0, possibleSpawns.Count); GameObject gameObject = Object.Instantiate(possibleSpawns[randomSelect].enemyType.enemyPrefab, new Vector3(0f, 0f, 0f), Quaternion.Euler(Vector3.zero)); gameObject.GetComponentInChildren().Spawn(true); EnemyAI ai = gameObject.GetComponent(); RoundManager.Instance.SpawnedEnemies.Add(ai); await Task.Delay(500); transportMoai(ai); } } public void transportMoai(EnemyAI moai) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) moai.allAINodes = libraryAINodes; moai.isOutside = true; Vector3 position = librarySpawnNodes[Random.RandomRangeInt(0, librarySpawnNodes.Length)].transform.position; NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(position, ref val, 5f, -1)) { ManualLogSource logger = Plugin.Logger; Vector3 position2 = ((Component)moai).transform.position; logger.LogInfo((object)("Easter Island Library: Transporting Moai to: " + ((object)(Vector3)(ref position2)).ToString())); moai.serverPosition = ((NavMeshHit)(ref val)).position; ((Component)moai).transform.position = ((NavMeshHit)(ref val)).position; moai.isOutside = true; moai.agent.Warp(moai.serverPosition); moai.SyncPositionToClients(); moai.SetDestinationToPosition(libraryAINodes[Random.RandomRangeInt(0, libraryAINodes.Length)].transform.position, false); resetSearch(moai); } else { Plugin.Logger.LogWarning((object)"Easter Island Cave Generator: Moai transport Failed to find Navmesh!"); } } public async void resetSearch(EnemyAI moai) { if (moai.currentSearch != null) { moai.StopSearch(moai.currentSearch, true); await Task.Delay(1000); moai.StartSearch(((Component)moai).transform.position, (AISearchRoutine)null); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "LibraryPopulator"; } } public class LibrarySpawnNode : MonoBehaviour { } } namespace EasterIsland.src.EasterIslandScripts.Heaven { public class ButtonPressTeleportToHeaven : NetworkBehaviour { public Animator buttonAnimator; public AudioSource flickSound; public AudioSource teleportSound; public GameObject moaiShip; public ShipCrashScript shipScript; public string moaiShipHeavenDestination; public Vector3 moaiShipHome; private bool atHeaven = false; public void Start() { } public void Update() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (shipScript.getCrashing()) { moaiShipHome = moaiShip.transform.position; } } public void CreateAndPlayAnimation() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { animClientRpc(); } else { animServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void animServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1111702636u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1111702636u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animClientRpc(); } } } [ClientRpc] public void animClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(232046355u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 232046355u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; startEvent(); } } } public async void startEvent() { buttonAnimator.Play("Pressing_Anim"); HeavenLoader.LoadHeavenWorld(); flickSound.Play(); await Task.Delay(2000); teleportSound.Play(); if (atHeaven) { HUDManager.Instance.DisplayTip("Quantum Drive Charging", "DESTINATION: Home", false, false, "LC_Tip1"); } else { HUDManager.Instance.DisplayTip("Quantum Drive Charging", "DESTINATION: Road_To_Heaven", false, false, "LC_Tip1"); } await Task.Delay(4100); try { ((Behaviour)moaiShip.GetComponent()).enabled = false; } catch (Exception e) { Debug.LogError((object)e); } if (atHeaven) { Debug.Log((object)"ATHEAVEN-> GOTO HOME"); atHeaven = false; moaiShip.transform.position = moaiShipHome; } else { Debug.Log((object)"!ATHEAVEN-> GOTO HEAVEN"); Vector3 loc = GameObject.Find(moaiShipHeavenDestination).transform.position; Vector3 val = loc; Debug.Log((object)("HEAVENTO->" + ((object)(Vector3)(ref val)).ToString())); atHeaven = true; moaiShip.transform.position = loc; } HUDManager.Instance.DisplayTip("Destabilization Complete", "Please Unboard the Ship.", false, false, "LC_Tip1"); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1111702636u, new RpcReceiveHandler(__rpc_handler_1111702636), "animServerRpc"); ((NetworkBehaviour)this).__registerRpc(232046355u, new RpcReceiveHandler(__rpc_handler_232046355), "animClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1111702636(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; ((ButtonPressTeleportToHeaven)(object)target).animServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_232046355(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; ((ButtonPressTeleportToHeaven)(object)target).animClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ButtonPressTeleportToHeaven"; } } public class HeavenSkyScript : MonoBehaviour { public Volume HeavenVolume; public Volume GlobalVolume; public Volume EclipsedVolume; public Volume QuantumVolume; private void OnTriggerEnter(Collider other) { if (IsLocalPlayer(other)) { HeavenVolume.weight = 1f; if ((Object)(object)GlobalVolume != (Object)null) { GlobalVolume.weight = 0f; } if ((Object)(object)EclipsedVolume != (Object)null) { EclipsedVolume.weight = 0f; } if ((Object)(object)QuantumVolume != (Object)null) { QuantumVolume.weight = 0f; } Debug.Log((object)"Local player entered Heaven volume area. Heaven sky active."); } } private void OnTriggerExit(Collider other) { if (IsLocalPlayer(other)) { HeavenVolume.weight = 0f; if ((Object)(object)GlobalVolume != (Object)null) { GlobalVolume.weight = 1f; } if ((Object)(object)EclipsedVolume != (Object)null) { EclipsedVolume.weight = 1f; } if ((Object)(object)QuantumVolume != (Object)null) { QuantumVolume.weight = 1f; } Debug.Log((object)"Local player exited Heaven volume area. Heaven sky disabled."); } } private bool IsLocalPlayer(Collider other) { GameObject gameObject = ((Component)other).gameObject; PlayerControllerB component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { ulong networkObjectId = ((NetworkBehaviour)component).NetworkObject.NetworkObjectId; ulong networkObjectId2 = ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId; return networkObjectId == networkObjectId2; } return false; } } public class SpeedBoostArea : MonoBehaviour { public AudioClip boostAudioClip; public AudioClip deboostAudioClip; private List players = new List(); private void Update() { if (players.Count <= 0) { return; } foreach (PlayerControllerB player in players) { player.movementSpeed = 15f; } } private void OnTriggerEnter(Collider other) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB player = GetPlayer(other); if (Object.op_Implicit((Object)(object)player)) { AudioSource.PlayClipAtPoint(boostAudioClip, ((Component)other).transform.position); if (!players.Contains(player)) { players.Add(player); player.movementSpeed = 15f; } } } private void OnTriggerExit(Collider other) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB player = GetPlayer(other); if (Object.op_Implicit((Object)(object)player)) { AudioSource.PlayClipAtPoint(deboostAudioClip, ((Component)other).transform.position); if (players.Contains(player)) { players.Remove(player); player.movementSpeed = 4.6f; } } } private PlayerControllerB GetPlayer(Collider other) { GameObject gameObject = ((Component)other).gameObject; PlayerControllerB component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { return component; } return null; } } } namespace EasterIsland.src.EasterIslandScripts.Heaven.Surgery { public class LeverFlickSurgery : NetworkBehaviour { public float animationDuration = 0.4f; public float targetXRotation = 90f; private Quaternion initialRotation; private float elapsedTime = 0f; private bool isAnimating = false; public AudioSource flickSound; public AudioSource initialPrep; public AudioSource surgeryNoise; public AudioSource surgeryCompletedNoise; public SelectScreenManager screen; public Animator shrineAnimator; public Collider surgeryHitBox; public List targetPlayers = new List(); public InteractTrigger opposingTrigger; private Quaternion startRotation; private bool reverseAnimation = false; public void CreateAndPlayAnimation() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { animClientRpc(); } else { animServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void animServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1992848283u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1992848283u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animClientRpc(); } } } [ClientRpc] public void animClientRpc() { //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_00ce: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3483674412u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3483674412u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; initialRotation = ((Component)this).transform.localRotation; elapsedTime = 0f; isAnimating = true; labFlick(); } } } private void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) startRotation = ((Component)this).transform.localRotation; Debug.Log((object)$"Lever initial local rotation: {((Quaternion)(ref startRotation)).eulerAngles}"); } [ServerRpc] public void pingCoolDownServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__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(1169001567u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1169001567u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; pingCooldownClientRpc(); } } [ClientRpc] public void pingCooldownClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2487665427u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2487665427u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; opposingTrigger.currentCooldownValue = 30f; opposingTrigger.cooldownTime = 30f; } } } public async void labFlick() { opposingTrigger.currentCooldownValue = 30f; opposingTrigger.cooldownTime = 30f; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { pingCooldownClientRpc(); } else { pingCoolDownServerRpc(); } flickSound.Play(); initialPrep.Play(); await Task.Delay(2000); shrineAnimator.Play("Transform"); surgeryNoise.Play(); if (screen.selectedID == 0) { HUDManager.Instance.DisplayTip("Modification: MOUTHDOG", "Pending procedure. Please have a seat. Starting Modification Sequence in 10 seconds.", false, false, "LC_Tip1"); } else { HUDManager.Instance.DisplayTip("Modification: BABOONHAWK", "Pending procedure. Please have a seat. Starting Modification Sequence in 10 seconds.", false, false, "LC_Tip1"); } await Task.Delay(5000); HUDManager.Instance.DisplayTip("5 seconds remaining", " Align your body for optimal integration.", false, false, "LC_Tip1"); await Task.Delay(14000); if (screen.selectedID == 0) { foreach (PlayerControllerB ply2 in targetPlayers) { if (Object.op_Implicit((Object)(object)ply2) && !Object.op_Implicit((Object)(object)((Component)ply2).GetComponentInChildren()) && ((NetworkBehaviour)RoundManager.Instance).IsHost) { DogHeadMod.testAttach(ply2); } } } else { foreach (PlayerControllerB ply in targetPlayers) { if (Object.op_Implicit((Object)(object)ply) && !Object.op_Implicit((Object)(object)((Component)ply).GetComponentInChildren()) && ((NetworkBehaviour)RoundManager.Instance).IsHost) { BaboonWingMod.testAttach(ply); } } } await Task.Delay(8000); surgeryCompletedNoise.Play(); shrineAnimator.Play("Idle"); ReverseAnimationClientRpc(); } private void Update() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) if (isAnimating) { elapsedTime += Time.deltaTime; float num = Mathf.Clamp01(elapsedTime / animationDuration); if (reverseAnimation) { ((Component)this).transform.localRotation = Quaternion.Lerp(initialRotation, startRotation, num); } else { Quaternion val = Quaternion.Euler(targetXRotation, ((Quaternion)(ref startRotation)).eulerAngles.y, ((Quaternion)(ref startRotation)).eulerAngles.z); ((Component)this).transform.localRotation = Quaternion.Lerp(startRotation, val, num); } if (num >= 1f) { isAnimating = false; reverseAnimation = false; } } } [ClientRpc] public void ReverseAnimationClientRpc() { //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_00da: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(17524558u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 17524558u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!isAnimating) { initialRotation = ((Component)this).transform.localRotation; elapsedTime = 0f; reverseAnimation = true; isAnimating = true; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1992848283u, new RpcReceiveHandler(__rpc_handler_1992848283), "animServerRpc"); ((NetworkBehaviour)this).__registerRpc(3483674412u, new RpcReceiveHandler(__rpc_handler_3483674412), "animClientRpc"); ((NetworkBehaviour)this).__registerRpc(1169001567u, new RpcReceiveHandler(__rpc_handler_1169001567), "pingCoolDownServerRpc"); ((NetworkBehaviour)this).__registerRpc(2487665427u, new RpcReceiveHandler(__rpc_handler_2487665427), "pingCooldownClientRpc"); ((NetworkBehaviour)this).__registerRpc(17524558u, new RpcReceiveHandler(__rpc_handler_17524558), "ReverseAnimationClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1992848283(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; ((LeverFlickSurgery)(object)target).animServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3483674412(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; ((LeverFlickSurgery)(object)target).animClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1169001567(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((LeverFlickSurgery)(object)target).pingCoolDownServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2487665427(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; ((LeverFlickSurgery)(object)target).pingCooldownClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_17524558(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; ((LeverFlickSurgery)(object)target).ReverseAnimationClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "LeverFlickSurgery"; } } public class SelectScreenManager : NetworkBehaviour { public VideoPlayer screen; public int selectedID = 0; public VideoClip mouthDogClip; public VideoClip baboonHawkClip; private VideoClip selectedClip; public void Update() { if (!screen.isPlaying || screen.isPaused) { screen.Play(); } } [ClientRpc] public void swapClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1877833129u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1877833129u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; selectedID++; if (selectedID > 1) { selectedID = 0; } switch (selectedID) { case 0: selectedClip = mouthDogClip; break; case 1: selectedClip = baboonHawkClip; break; } screen.clip = selectedClip; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1877833129u, new RpcReceiveHandler(__rpc_handler_1877833129), "swapClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1877833129(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; ((SelectScreenManager)(object)target).swapClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SelectScreenManager"; } } public class SurgeryHitBox : NetworkBehaviour { public LeverFlickSurgery link; public ButtonPressSurgeryClear link2; private void OnTriggerEnter(Collider other) { Debug.Log((object)("SurgeryEnterCollider: " + ((Object)other).name)); PlayerControllerB validPlayer = GetValidPlayer(other); if ((Object)(object)validPlayer != (Object)null && !link.targetPlayers.Contains(validPlayer)) { link.targetPlayers.Add(validPlayer); if (Object.op_Implicit((Object)(object)link2)) { link2.targetPlayers.Add(validPlayer); } Debug.Log((object)("Player " + validPlayer.playerUsername + " entered surgery zone.")); } } private void OnTriggerExit(Collider other) { Debug.Log((object)("SurgeryExitCollider: " + ((Object)other).name)); PlayerControllerB validPlayer = GetValidPlayer(other); if ((Object)(object)validPlayer != (Object)null && link.targetPlayers.Contains(validPlayer)) { link.targetPlayers.Remove(validPlayer); if (Object.op_Implicit((Object)(object)link2)) { link2.targetPlayers.Remove(validPlayer); } Debug.Log((object)("Player " + validPlayer.playerUsername + " exited surgery zone.")); } } private PlayerControllerB GetValidPlayer(Collider other) { GameObject gameObject = ((Component)other).gameObject; PlayerControllerB component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { return component; } return null; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "SurgeryHitBox"; } } } namespace EasterIsland.src.EasterIslandScripts.Heaven.Items { public class DummyEnemyAIForNuke : EnemyAI { protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { ((EnemyAI)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "DummyEnemyAIForNuke"; } } public class HeavenTeleporterItem : GrabbableObject { public bool radarEnabled; public Animator radarBoosterAnimator; public GameObject radarDot; public AudioSource pingAudio; public AudioClip pingSFX; public AudioSource radarBoosterAudio; public AudioClip turnOnSFX; public AudioClip turnOffSFX; public AudioClip flashSFX; public string radarBoosterName; private bool setRandomBoosterName; private int timesPlayingPingAudioInOneSpot; private Vector3 pingAudioLastPosition; private float timeSincePlayingPingAudio; private int radarBoosterNameIndex = -1; private float flashCooldown; public Transform radarSpherePosition; private float chargeDuration = 5.2f; private float currentChargeTime = 0f; public string moaiShipHeavenDestination; private float teleportRange = 30f; private bool toHeaven = true; private Vector3 lastLocation = Vector3.zero; private bool toggle = true; public override void Update() { ((GrabbableObject)this).Update(); if (timeSincePlayingPingAudio > 5f) { timeSincePlayingPingAudio = 0f; timesPlayingPingAudioInOneSpot = Mathf.Max(timesPlayingPingAudioInOneSpot - 1, 0); } else { timeSincePlayingPingAudio += Time.deltaTime; } if (flashCooldown >= 0f) { flashCooldown -= Time.deltaTime; } if (radarEnabled) { currentChargeTime += Time.deltaTime; if (currentChargeTime > chargeDuration && toggle) { teleportTrigger(); currentChargeTime = 0f; toggle = false; } } else { currentChargeTime = 0f; toggle = true; } } [ClientRpc] private void teleportPlayersClientRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: 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(136665224u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 136665224u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; foreach (PlayerControllerB nearestPlayer in getNearestPlayers(teleportRange)) { ((Component)nearestPlayer).transform.position = position; } ((Component)this).transform.position = position; base.targetFloorPosition = position; } [ServerRpc] private void teleportPlayersServerRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_011b: 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_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(240404316u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 240404316u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; teleportPlayersClientRpc(position); } } private List getNearestPlayers(float dist) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; List list = new List(); PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (Vector3.Distance(((Component)val).transform.position, ((Component)this).transform.position) <= dist) { list.Add(val); } } return list; } public void teleportTrigger() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0176: 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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) if (toHeaven) { lastLocation = ((Component)this).transform.position; toHeaven = false; GameObject val = GameObject.Find(moaiShipHeavenDestination); if (Object.op_Implicit((Object)(object)val)) { Debug.Log((object)"!ATHEAVEN-> GOTO HEAVEN"); Vector3 position = GameObject.Find(moaiShipHeavenDestination).transform.position; Vector3 val2 = position; Debug.Log((object)("HEAVENTO->" + ((object)(Vector3)(ref val2)).ToString())); teleportPlayersClientRpc(position); return; } Vector3 position2 = Vector3.zero; GameObject[] array = null; array = RoundManager.Instance.insideAINodes; if (array != null) { try { position2 = array[Random.RandomRangeInt(0, array.Length)].transform.position; } catch { } } teleportPlayersClientRpc(position2); return; } GameObject val3 = GameObject.Find(moaiShipHeavenDestination); if (Object.op_Implicit((Object)(object)val3)) { Vector3 position3 = Vector3.zero; GameObject[] array2 = null; double num = new Random().NextDouble(); array2 = ((!(num < 0.5)) ? RoundManager.Instance.insideAINodes : RoundManager.Instance.outsideAINodes); if (array2 != null) { try { position3 = array2[Random.RandomRangeInt(0, array2.Length)].transform.position; } catch { } } teleportPlayersClientRpc(position3); } else { toHeaven = true; teleportPlayersClientRpc(lastLocation); } } public override void Start() { ((GrabbableObject)this).Start(); radarBoosterName = "Gateway to Heaven"; } private void OnEnable() { } private void OnDisable() { if (radarEnabled) { RemoveBoosterFromRadar(); } } public override int GetItemDataToSave() { ((GrabbableObject)this).GetItemDataToSave(); return radarBoosterNameIndex; } public override void LoadItemSaveData(int saveData) { ((GrabbableObject)this).LoadItemSaveData(saveData); radarBoosterNameIndex = saveData; } public void FlashAndSync() { Flash(); RadarBoosterFlashServerRpc(); } [ServerRpc(RequireOwnership = false)] public void RadarBoosterFlashServerRpc() { //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(4252055703u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4252055703u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RadarBoosterFlashClientRpc(); } } } [ClientRpc] public void RadarBoosterFlashClientRpc() { //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(1042443021u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1042443021u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!(flashCooldown >= 0f)) { Flash(); } } } public void Flash() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) if (radarEnabled && !(flashCooldown >= 0f)) { flashCooldown = 2.25f; radarBoosterAnimator.SetTrigger("Flash"); radarBoosterAudio.PlayOneShot(flashSFX); WalkieTalkie.TransmitOneShotAudio(radarBoosterAudio, flashSFX, 1f); StunGrenadeItem.StunExplosion(radarSpherePosition.position, false, 0.8f, 1.75f, 2f, false, (PlayerControllerB)null, (PlayerControllerB)null, 0.3f); } } public void SetRadarBoosterNameLocal(string newName) { radarBoosterName = "Gateway to Heaven"; ((Component)this).gameObject.GetComponentInChildren().headerText = radarBoosterName; StartOfRound.Instance.mapScreen.ChangeNameOfTargetTransform(((Component)this).transform, newName); } private void RemoveBoosterFromRadar() { StartOfRound.Instance.mapScreen.RemoveTargetFromRadar(((Component)this).transform); } private void AddBoosterToRadar() { if (!setRandomBoosterName) { setRandomBoosterName = true; int num = (radarBoosterNameIndex = ((radarBoosterNameIndex != -1) ? radarBoosterNameIndex : new Random(Mathf.Min(StartOfRound.Instance.randomMapSeed + (int)((NetworkBehaviour)this).NetworkObjectId, 99999999)).Next(0, StartOfRound.Instance.randomNames.Length))); radarBoosterName = "Gateway to Heaven"; ((Component)this).gameObject.GetComponentInChildren().headerText = radarBoosterName; } string text = StartOfRound.Instance.mapScreen.AddTransformAsTargetToRadar(((Component)this).transform, radarBoosterName, true); if (!string.IsNullOrEmpty(text)) { ((Component)this).gameObject.GetComponentInChildren().headerText = text; } StartOfRound.Instance.mapScreen.SyncOrderOfRadarBoostersInList(); } public void EnableRadarBooster(bool enable) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { createHeavenClientRpc(); } else { createHeavenServerRpc(); } radarBoosterAnimator.SetBool("on", enable); radarDot.SetActive(enable); if (enable) { AddBoosterToRadar(); radarBoosterAudio.Play(); radarBoosterAudio.PlayOneShot(turnOnSFX); WalkieTalkie.TransmitOneShotAudio(radarBoosterAudio, turnOnSFX, 1f); } else { RemoveBoosterFromRadar(); if (radarBoosterAudio.isPlaying) { radarBoosterAudio.Stop(); radarBoosterAudio.PlayOneShot(turnOffSFX); WalkieTalkie.TransmitOneShotAudio(radarBoosterAudio, turnOffSFX, 1f); } } radarEnabled = enable; } [ServerRpc(RequireOwnership = false)] public void createHeavenServerRpc() { //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(2728366480u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2728366480u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; createHeavenClientRpc(); } } } [ClientRpc] public void createHeavenClientRpc() { //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(3238351707u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3238351707u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!HeavenLoader.isSceneLoaded) { HeavenLoader.LoadHeavenWorld(); } } } public void PlayPingAudio() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) timesPlayingPingAudioInOneSpot += 2; timeSincePlayingPingAudio = 0f; pingAudio.PlayOneShot(pingSFX); WalkieTalkie.TransmitOneShotAudio(pingAudio, pingSFX, 1f); RoundManager.Instance.PlayAudibleNoise(((Component)pingAudio).transform.position, 12f, 0.8f, timesPlayingPingAudioInOneSpot, base.isInShipRoom && StartOfRound.Instance.hangarDoorsClosed, 1015); } public void PlayPingAudioAndSync() { PlayPingAudio(); PingRadarBoosterServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [ServerRpc(RequireOwnership = false)] public void PingRadarBoosterServerRpc(int playerWhoPlayedPing) { //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(688464159u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoPlayedPing); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 688464159u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PingRadarBoosterClientRpc(playerWhoPlayedPing); } } } [ClientRpc] public void PingRadarBoosterClientRpc(int playerWhoPlayedPing) { //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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1563162773u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoPlayedPing); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1563162773u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null) && playerWhoPlayedPing != (int)GameNetworkManager.Instance.localPlayerController.playerClientId) { PlayPingAudio(); } } } public override void EquipItem() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).EquipItem(); pingAudioLastPosition = ((Component)this).transform.position; } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); EnableRadarBooster(used); } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); base.isBeingUsed = false; EnableRadarBooster(enable: false); } public override void DiscardItem() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) if (Vector3.Distance(((Component)this).transform.position, pingAudioLastPosition) > 5f) { timesPlayingPingAudioInOneSpot = 0; } ((GrabbableObject)this).DiscardItem(); } 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(136665224u, new RpcReceiveHandler(__rpc_handler_136665224), "teleportPlayersClientRpc"); ((NetworkBehaviour)this).__registerRpc(240404316u, new RpcReceiveHandler(__rpc_handler_240404316), "teleportPlayersServerRpc"); ((NetworkBehaviour)this).__registerRpc(4252055703u, new RpcReceiveHandler(__rpc_handler_4252055703), "RadarBoosterFlashServerRpc"); ((NetworkBehaviour)this).__registerRpc(1042443021u, new RpcReceiveHandler(__rpc_handler_1042443021), "RadarBoosterFlashClientRpc"); ((NetworkBehaviour)this).__registerRpc(2728366480u, new RpcReceiveHandler(__rpc_handler_2728366480), "createHeavenServerRpc"); ((NetworkBehaviour)this).__registerRpc(3238351707u, new RpcReceiveHandler(__rpc_handler_3238351707), "createHeavenClientRpc"); ((NetworkBehaviour)this).__registerRpc(688464159u, new RpcReceiveHandler(__rpc_handler_688464159), "PingRadarBoosterServerRpc"); ((NetworkBehaviour)this).__registerRpc(1563162773u, new RpcReceiveHandler(__rpc_handler_1563162773), "PingRadarBoosterClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_136665224(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((HeavenTeleporterItem)(object)target).teleportPlayersClientRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_240404316(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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_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 { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((HeavenTeleporterItem)(object)target).teleportPlayersServerRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4252055703(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; ((HeavenTeleporterItem)(object)target).RadarBoosterFlashServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1042443021(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; ((HeavenTeleporterItem)(object)target).RadarBoosterFlashClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2728366480(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; ((HeavenTeleporterItem)(object)target).createHeavenServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3238351707(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; ((HeavenTeleporterItem)(object)target).createHeavenClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_688464159(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 playerWhoPlayedPing = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoPlayedPing); target.__rpc_exec_stage = (__RpcExecStage)1; ((HeavenTeleporterItem)(object)target).PingRadarBoosterServerRpc(playerWhoPlayedPing); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1563162773(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 playerWhoPlayedPing = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoPlayedPing); target.__rpc_exec_stage = (__RpcExecStage)1; ((HeavenTeleporterItem)(object)target).PingRadarBoosterClientRpc(playerWhoPlayedPing); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "HeavenTeleporterItem"; } } public class MoaiNukeSpawner : MonoBehaviour { public void Awake() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { spawnNuke(); } } public void spawnNuke() { //IL_001b: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) GameObject val = findNukeObj(); try { if (Object.op_Implicit((Object)(object)val)) { GameObject val2 = Object.Instantiate(val, ((Component)this).transform.position, ((Component)this).transform.rotation); val2.SetActive(true); NetworkObject component = val2.GetComponent(); ((Component)component).GetComponent().Spawn(true); NuclearBomb component2 = val2.GetComponent(); ((Component)component2).transform.position = ((Component)this).transform.position; ((GrabbableObject)component2).targetFloorPosition = ((Component)this).transform.position; ((GrabbableObject)component2).scrapValue = 0; } else { Debug.LogWarning((object)"LegendOfTheMoai: Couldn't find nuke item to spawn! Item will be missing in the heaven scene!"); } } catch (Exception ex) { Debug.LogError((object)ex); } } public GameObject findNukeObj() { List itemsList = StartOfRound.Instance.allItemsList.itemsList; foreach (Item item in itemsList) { if (Object.op_Implicit((Object)(object)item) && item.itemId == 654021 && Object.op_Implicit((Object)(object)item.spawnPrefab) && (Object)(object)item.spawnPrefab.GetComponent() != (Object)null) { return item.spawnPrefab; } } return null; } } public class NuclearBomb : GrabbableObject, IHittable { public int dangerLevel = 0; public AudioSource sound0; public AudioSource sound1; public AudioSource sound2; public AudioSource BOOMDelayed; public AudioSource BOOMImmediate; public ParticleSystem nuclearParticles; public GameObject nukeModel; public GameObject scanNode; private bool exploded = false; private bool armedSoundRinged = false; private float dropCooldown = 2f; private float lastDropTime = 0f; private bool playedNukeSound = false; public override void Start() { ((GrabbableObject)this).Start(); } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null)) { if ((double)Random.Range(0f, 1f) < 0.25) { dangerLevel++; } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { dangerResultActivateClientRpc(dangerLevel); } else { dangerResultActivateServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void dangerResultActivateServerRpc() { //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(286867344u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 286867344u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; dangerResultActivateClientRpc(dangerLevel); } } } public bool Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { dangerLevel += force; dangerResultActivateClientRpc(dangerLevel); return true; } [ClientRpc] public void dangerResultActivateClientRpc(int _dangerLevel_) { //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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2226056526u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, _dangerLevel_); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2226056526u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; switch (_dangerLevel_) { case 0: playSoundClientRpc("sound0", play: true); break; case 1: if (!armedSoundRinged) { playSoundClientRpc("sound0", play: false); playSoundClientRpc("sound1", play: true); armedSoundRinged = true; } else { playSoundClientRpc("sound0", play: false); playSoundClientRpc("sound1", play: false); playSoundClientRpc("sound2", play: true); } break; case 2: playSoundClientRpc("sound0", play: false); playSoundClientRpc("sound1", play: false); playSoundClientRpc("sound2", play: true); break; case 3: playSoundClientRpc("sound0", play: false); playSoundClientRpc("sound1", play: false); playSoundClientRpc("sound2", play: false); playSoundClientRpc("BOOMDelayed", play: true); BOOMAwait(); break; default: playSoundClientRpc("sound0", play: false); playSoundClientRpc("sound1", play: false); playSoundClientRpc("sound2", play: false); playSoundClientRpc("BOOMDelayed", play: false); playSoundClientRpc("BOOMImmediate", play: true); BOOMClientRpc(); break; } } [ClientRpc] public void playSoundClientRpc(string soundName, bool play) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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(3859168344u, val, (RpcDelivery)0); bool flag = soundName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(soundName, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref play, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3859168344u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; switch (soundName) { case "sound0": if (play) { sound0.Play(); } else { sound0.Stop(); } break; case "sound1": if (play) { sound1.Play(); } else { sound0.Stop(); } break; case "sound2": if (play) { sound2.Play(); } else { sound0.Stop(); } break; case "BOOMDelayed": if (play) { BOOMDelayed.Play(); } else { BOOMDelayed.Stop(); } break; case "BOOMImmediate": if (!playedNukeSound) { if (play) { BOOMImmediate.Play(); } else { BOOMImmediate.Stop(); } playedNukeSound = true; } break; } } public async void BOOMAwait() { await Task.Delay(5600); BOOMClientRpc(); } public async void boomasync() { if (exploded) { return; } exploded = true; nuclearParticles.Play(); Object.Destroy((Object)(object)nukeModel); Object.Destroy((Object)(object)scanNode); base.grabbable = false; base.grabbableToEnemies = false; PlayerControllerB[] players = RoundManager.Instance.playersManager.allPlayerScripts; EnemyAI[] enemies = Object.FindObjectsOfType(); NavMeshHit microHit = default(NavMeshHit); for (int i = 0; i < 24; i++) { Landmine.SpawnExplosion(((Component)this).transform.position, false, (float)(10 * i), (float)(11 * i), 20, (float)(100 - i * 2), (GameObject)null, false); await Task.Delay(200); float radius = 10 * i; Vector3 origin = ((Component)this).transform.position; Vector3 randomPos = origin + Random.insideUnitSphere * radius; randomPos.y = origin.y; for (int j = 0; j < 5 + i / 4; j++) { Vector3 microOffset = Random.insideUnitSphere * 2f; Vector3 microPos = randomPos + microOffset; microPos.y = origin.y; if (NavMesh.SamplePosition(microPos, ref microHit, 3f, -1)) { Landmine.SpawnExplosion(((NavMeshHit)(ref microHit)).position, true, 1f, 1f, 50, 0f, (GameObject)null, false); } else { Landmine.SpawnExplosion(microPos, true, 1f, 1f, 50, 0f, (GameObject)null, false); } PlayerControllerB[] array = players; foreach (PlayerControllerB player in array) { if (Vector3.Distance(((Component)this).transform.position, ((Component)player).gameObject.transform.position) < (float)(i * 5)) { player.DamagePlayer((int)(100f / Vector3.Distance(((Component)this).transform.position, ((Component)player).gameObject.transform.position)), true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } } EnemyAI[] array2 = enemies; foreach (EnemyAI enemy in array2) { if (Vector3.Distance(((Component)this).transform.position, ((Component)enemy).gameObject.transform.position) < (float)(i * 10) && ((NetworkBehaviour)RoundManager.Instance).IsHost) { enemy.HitEnemyClientRpc(3, -1, true, -1); } } microHit = default(NavMeshHit); } } await Task.Delay(8000); Object.Destroy((Object)(object)((Component)this).gameObject); } public override void OnHitGround() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).OnHitGround(); if (!(dropCooldown + lastDropTime > Time.time) && ((NetworkBehaviour)RoundManager.Instance).IsHost) { float num = Vector3.Distance(base.startFallingPosition, base.targetFloorPosition); Debug.Log((object)$"Nuke dropped from height: {num}"); float num2 = num / 3f; float num3 = num2 * 0.25f; if (Random.value < num3) { dangerLevel++; Debug.Log((object)$"Nuke danger increased to {dangerLevel} due to impact!"); dangerResultActivateClientRpc(dangerLevel); } if (num > 9f) { dangerLevel = 3; Debug.Log((object)$"Nuke danger increased to {dangerLevel} due to impact!"); dangerResultActivateClientRpc(dangerLevel); } if (num > 12f) { dangerLevel = 4; Debug.Log((object)$"Nuke danger increased to {dangerLevel} due to impact!"); dangerResultActivateClientRpc(dangerLevel); } lastDropTime = Time.time; } } [ClientRpc] public void BOOMClientRpc() { //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(2857703399u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2857703399u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; boomasync(); } } } 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 ((NetworkBehaviour)this).__registerRpc(286867344u, new RpcReceiveHandler(__rpc_handler_286867344), "dangerResultActivateServerRpc"); ((NetworkBehaviour)this).__registerRpc(2226056526u, new RpcReceiveHandler(__rpc_handler_2226056526), "dangerResultActivateClientRpc"); ((NetworkBehaviour)this).__registerRpc(3859168344u, new RpcReceiveHandler(__rpc_handler_3859168344), "playSoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(2857703399u, new RpcReceiveHandler(__rpc_handler_2857703399), "BOOMClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_286867344(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; ((NuclearBomb)(object)target).dangerResultActivateServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2226056526(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 dangerLevel_ = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref dangerLevel_); target.__rpc_exec_stage = (__RpcExecStage)1; ((NuclearBomb)(object)target).dangerResultActivateClientRpc(dangerLevel_); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3859168344(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string soundName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref soundName, false); } bool play = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref play, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((NuclearBomb)(object)target).playSoundClientRpc(soundName, play); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2857703399(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; ((NuclearBomb)(object)target).BOOMClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "NuclearBomb"; } } public class InsideBaseSpawner : MonoBehaviour { public void Awake() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { spawnBase(); } } public void spawnBase() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) GameObject heavenBase = Plugin.HeavenBase; try { if (Object.op_Implicit((Object)(object)heavenBase)) { GameObject val = Object.Instantiate(heavenBase, ((Component)this).transform.position, ((Component)this).transform.rotation); val.SetActive(true); NetworkObject component = val.GetComponent(); ((Component)component).GetComponent().Spawn(true); } else { Debug.LogError((object)"LegendOfTheMoai: Couldn't find heaven to spawn! Entire Area will be missing in the heaven scene!"); } } catch (Exception ex) { Debug.LogError((object)ex); } } } } namespace EasterIsland.src.EasterIslandScripts.Heaven.BodyMods { public class BaboonWingMod : NetworkBehaviour { public PlayerControllerB player; private Vector3 offset = new Vector3(0f, 0f, 0f); private Vector3 rotOffset = new Vector3(0f, 0f, 0f); private float cooldown = 0.5f; private float lastActuation = 0f; private float force = 2f; private InputActionPhase prevJump = (InputActionPhase)1; public AudioSource flapSound; public AudioSource[] baboonSquawks; private Random rnd = new Random(); public GameObject animContainer; public static void testAttach(PlayerControllerB ply) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(Plugin.PartHawkWings, ((Component)ply).transform.position, ((Component)ply).transform.rotation); NetworkObject component = val.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.Spawn(false); BaboonWingMod component2 = val.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.player = ply; component2.syncToClient(); } } else { Debug.LogWarning((object)"LegendOfTheMoai error: Network Object Missing from wings modification!"); } } public async void syncToClient() { await Task.Delay(1000); clientAttachClientRpc(((NetworkBehaviour)player).NetworkObject.NetworkObjectId); } [ClientRpc] public void clientAttachClientRpc(ulong playerid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_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) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2700165961u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2700165961u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { player = val3; ((Component)this).transform.SetParent(((Component)player).transform.Find("ScavengerModel/metarig/spine/spine.001")); } } } public void Update() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) Transform val = ((Component)player).gameObject.transform.Find("TurnCompass"); Transform val2 = ((Component)player).transform.Find("ScavengerModel/metarig/spine/spine.001"); if (Object.op_Implicit((Object)(object)val2)) { ((Component)this).transform.localPosition = offset; ((Component)this).transform.localRotation = Quaternion.Euler(rotOffset); } RoundManager instance = RoundManager.Instance; InputAction val3 = player.playerActions.FindAction("Jump", false); if (prevJump != val3.phase && ((NetworkBehaviour)instance.playersManager.localPlayerController).NetworkObjectId == ((NetworkBehaviour)player).NetworkObjectId && lastActuation + cooldown < Time.time) { Vector3 val4 = ((Component)player).transform.position + player.velocityLastFrame * -1f; val4.y -= 0.12f; lastActuation = Time.time; if (player.fallValue > -12f) { Landmine.SpawnExplosion(val4, false, 0f, 0f, 0, force / 3f, (GameObject)null, false); player.ResetFallGravity(); if (((NetworkBehaviour)instance).IsHost) { PlayFlapClientRpc(); } else { PlayFlapServerRpc(); } } else { if (instance.playersManager.localPlayerController.sprintMeter < 0.35f) { return; } PlayerControllerB localPlayerController = instance.playersManager.localPlayerController; localPlayerController.sprintMeter -= 0.35f; Landmine.SpawnExplosion(val4, false, 0f, 0f, 0, force, (GameObject)null, false); player.ResetFallGravity(); if (((NetworkBehaviour)instance).IsHost) { PlaySquawkClientRpc(); } else { PlaySquawkServerRpc(); } } } prevJump = val3.phase; ((Component)this).transform.position = ((Component)player).transform.position + offset; ((Component)this).transform.rotation = ((Component)player).transform.rotation; } [ServerRpc(RequireOwnership = false)] public void PlaySquawkServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(513911306u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 513911306u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlaySquawkClientRpc(); } } } [ClientRpc] public void PlaySquawkClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(274550914u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 274550914u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; baboonSquawks[rnd.Next(0, baboonSquawks.Length)].Play(); } } } [ServerRpc(RequireOwnership = false)] public void PlayFlapServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(51209501u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 51209501u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayFlapClientRpc(); } } } [ClientRpc] public void PlayFlapClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(943333518u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 943333518u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; flapSound.Play(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2700165961u, new RpcReceiveHandler(__rpc_handler_2700165961), "clientAttachClientRpc"); ((NetworkBehaviour)this).__registerRpc(513911306u, new RpcReceiveHandler(__rpc_handler_513911306), "PlaySquawkServerRpc"); ((NetworkBehaviour)this).__registerRpc(274550914u, new RpcReceiveHandler(__rpc_handler_274550914), "PlaySquawkClientRpc"); ((NetworkBehaviour)this).__registerRpc(51209501u, new RpcReceiveHandler(__rpc_handler_51209501), "PlayFlapServerRpc"); ((NetworkBehaviour)this).__registerRpc(943333518u, new RpcReceiveHandler(__rpc_handler_943333518), "PlayFlapClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2700165961(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); target.__rpc_exec_stage = (__RpcExecStage)1; ((BaboonWingMod)(object)target).clientAttachClientRpc(playerid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_513911306(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; ((BaboonWingMod)(object)target).PlaySquawkServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_274550914(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; ((BaboonWingMod)(object)target).PlaySquawkClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_51209501(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; ((BaboonWingMod)(object)target).PlayFlapServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_943333518(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; ((BaboonWingMod)(object)target).PlayFlapClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BaboonWingMod"; } } public class DogHeadMod : NetworkBehaviour { public PlayerControllerB player; private Vector3 offset = Vector3.zero; private Vector3 rotOffset = new Vector3(0f, 0f, 270f); private float cooldown = 9f; private bool coolingDown = true; private float coolTimer = 9f; private InputActionPhase prevJump = (InputActionPhase)1; public AudioSource dogGrowl; public AudioSource[] dogborks; public AudioSource dogMunch; private Random rnd = new Random(); protected float maxPlayerBiteRange = 7.5f; protected float maxEnemyBiteRange = 16f; public AnimationClip biteAnimation; public Transform bitePoint; private float thrashTime = 3.3f; private float timeThrashStarted = 0f; private float timeDashStarted = 0f; private float dashTime = 1f; private bool forceThrasAnim = false; public Transform headTransformLink; private PlayerControllerB attachedPlayer; private PlayerControllerB targetedPlayer; private EnemyAI attachedEnemy; private EnemyAI targetedEnemy; public SkinnedMeshRenderer mesh1; public MeshRenderer mesh2; public MeshRenderer mesh3; private int playerTicksDone = 0; private int monsterTicksDone = 0; private float lastTickTime = 0f; private bool chompTrigger = false; private List disabledColliders = new List(); public static void testAttach(PlayerControllerB ply) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(Plugin.PartDogHead, ((Component)ply).transform.position, ((Component)ply).transform.rotation); NetworkObject component = val.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.Spawn(false); DogHeadMod component2 = val.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.player = ply; component2.syncToClient(); } } else { Debug.LogWarning((object)"LegendOfTheMoai error: Network Object Missing from mouthdog modification!"); } } public async void syncToClient() { await Task.Delay(1000); clientAttachClientRpc(((NetworkBehaviour)player).NetworkObject.NetworkObjectId); } [ClientRpc] public void clientAttachClientRpc(ulong playerid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_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) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(423169188u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 423169188u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { player = val3; if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { ((Renderer)mesh1).enabled = false; ((Renderer)mesh2).enabled = false; ((Renderer)mesh3).enabled = false; } } } } [ServerRpc(RequireOwnership = false)] public void initiateChompServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1604841327u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1604841327u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; chompTrigger = true; } } } [ClientRpc] public void SetPlayerPositionClientRpc(ulong playerid, Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1939783607u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1939783607u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = null; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val4 in array) { if (((NetworkBehaviour)val4).NetworkObject.NetworkObjectId == playerid) { val3 = val4; } } if ((Object)(object)val3 != (Object)null) { ((Component)val3).transform.position = position; } } [ClientRpc] public void dmgPlayerClientRpc(ulong playerid, int amount) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(933586802u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); BytePacker.WriteValueBitPacked(val2, amount); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 933586802u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = null; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val4 in array) { if (((NetworkBehaviour)val4).NetworkObject.NetworkObjectId == playerid) { val3 = val4; } } if ((Object)(object)val3 != (Object)null) { val3.DamagePlayer(amount, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } } private void Update() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0325: 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_0219: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Unknown result type (might be due to invalid IL or missing references) Transform val = ((Component)player).gameObject.transform.Find("TurnCompass"); Transform val2 = ((Component)player).transform.Find("ScavengerModel/metarig/spine/spine.001/spine.002/spine.003/spine.004/HeadPoint"); ((Component)this).transform.position = ((Component)player).transform.position + offset; ((Component)this).transform.rotation = ((Component)player).transform.rotation; if (Object.op_Implicit((Object)(object)val2)) { ((Component)headTransformLink).transform.position = val2.position + offset; ((Component)headTransformLink).transform.rotation = val2.rotation * Quaternion.Euler(rotOffset); } else { ((Component)headTransformLink).transform.position = val.position + offset; ((Component)headTransformLink).transform.rotation = val.rotation * Quaternion.Euler(rotOffset); } RoundManager instance = RoundManager.Instance; InputAction val3 = player.playerActions.FindAction("Crouch", false); if (prevJump != val3.phase && !player.isPlayerDead && ((NetworkBehaviour)player).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { prevJump = val3.phase; initiateChompServerRpc(); } if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } if (chompTrigger) { chompTrigger = false; if (coolTimer < 0f) { PlayerControllerB val4 = scanForPlayerTarget(); EnemyAI val5 = scanForMonsterTarget(); if (Object.op_Implicit((Object)(object)val4)) { targetedPlayer = val4; timeDashStarted = Time.time; prevJump = val3.phase; PlayBorkClientRpc(); DisablePlayerCollidersClientRpc(); coolingDown = true; coolTimer = cooldown; return; } if (Object.op_Implicit((Object)(object)val5)) { targetedEnemy = val5; timeDashStarted = Time.time; prevJump = val3.phase; PlayBorkClientRpc(); DisablePlayerCollidersClientRpc(); coolingDown = true; coolTimer = cooldown; return; } } } prevJump = val3.phase; if ((Object)(object)targetedPlayer != (Object)null) { float num = (Time.time - timeDashStarted) / dashTime; if (num < 1f) { Vector3 position = Vector3.Lerp(((Component)player).transform.position + offset, ((Component)targetedPlayer).transform.position, num); SetPlayerPositionClientRpc(((NetworkBehaviour)player).NetworkObject.NetworkObjectId, position); return; } attachedPlayer = targetedPlayer; targetedPlayer = null; timeThrashStarted = Time.time; lastTickTime = Time.time; playerTicksDone = 0; monsterTicksDone = 0; PlayMunchClientRpc(); } else if ((Object)(object)targetedEnemy != (Object)null) { float num2 = (Time.time - timeDashStarted) / dashTime; if (num2 < 1f) { Vector3 position2 = Vector3.Lerp(((Component)player).transform.position + offset, ((Component)targetedEnemy).transform.position, num2); SetPlayerPositionClientRpc(((NetworkBehaviour)player).NetworkObject.NetworkObjectId, position2); return; } attachedEnemy = targetedEnemy; targetedEnemy = null; timeThrashStarted = Time.time; lastTickTime = Time.time; playerTicksDone = 0; monsterTicksDone = 0; PlayMunchClientRpc(); } else if ((Object)(object)attachedPlayer != (Object)null) { float num3 = Time.time - timeThrashStarted; if (num3 < thrashTime) { if (num3 < 0.1f) { PlayDogAnimationClientRpc(); } SetPlayerPositionClientRpc(((NetworkBehaviour)attachedPlayer).NetworkObject.NetworkObjectId, ((Component)headTransformLink).transform.position); float headTransformLinkRotationClientRpc = Mathf.Sin(num3 * 20f) * 20f; setHeadTransformLinkRotationClientRpc(headTransformLinkRotationClientRpc); attachedPlayer.ResetFallGravity(); player.ResetFallGravity(); float num4 = thrashTime / 5f; if (Time.time - lastTickTime >= num4 && playerTicksDone < 5) { dmgPlayerClientRpc(((NetworkBehaviour)attachedPlayer).NetworkObject.NetworkObjectId, 10); lastTickTime = Time.time; playerTicksDone++; if (player.health <= 90) { dmgPlayerClientRpc(((NetworkBehaviour)player).NetworkObject.NetworkObjectId, -10); } } } else { attachedPlayer = null; EnablePlayerCollidersClientRpc(); } } else if ((Object)(object)attachedEnemy != (Object)null) { float num5 = Time.time - timeThrashStarted; if (num5 < thrashTime) { if (num5 < 0.1f) { PlayDogAnimationClientRpc(); } SetMonsterPositionClientRpc(((NetworkBehaviour)attachedEnemy).NetworkObject.NetworkObjectId, ((Component)headTransformLink).transform.position); player.ResetFallGravity(); float headTransformLinkRotationClientRpc2 = Mathf.Sin(num5 * 20f) * 20f; setHeadTransformLinkRotationClientRpc(headTransformLinkRotationClientRpc2); float num6 = thrashTime / 5f; if (Time.time - lastTickTime >= num6 && monsterTicksDone < 5) { attachedEnemy.HitEnemy(1, player, true, -1); lastTickTime = Time.time; monsterTicksDone++; if (player.health <= 90) { dmgPlayerClientRpc(((NetworkBehaviour)player).NetworkObject.NetworkObjectId, -10); } } } else { attachedEnemy = null; EnablePlayerCollidersClientRpc(); } } else if (coolingDown && coolTimer <= 0f) { coolingDown = false; PlayGrowlClientRpc(); } else { coolTimer -= Time.deltaTime; } } [ClientRpc] private void DisablePlayerCollidersClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2578395319u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2578395319u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; disabledColliders.Clear(); Collider[] componentsInChildren = ((Component)player).GetComponentsInChildren(); foreach (Collider val3 in componentsInChildren) { if (val3.enabled) { val3.enabled = false; disabledColliders.Add(val3); } } } [ClientRpc] private void EnablePlayerCollidersClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3574043910u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3574043910u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (Collider disabledCollider in disabledColliders) { if ((Object)(object)disabledCollider != (Object)null) { disabledCollider.enabled = true; } } disabledColliders.Clear(); } [ClientRpc] public void setHeadTransformLinkRotationClientRpc(float wiggleAmount) { //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) //IL_0110: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2665398052u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref wiggleAmount, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2665398052u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((Component)headTransformLink).transform.localRotation = Quaternion.Euler(rotOffset.x, rotOffset.y + wiggleAmount, rotOffset.z); } } } public PlayerControllerB scanForPlayerTarget() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; float num = 10000f; PlayerControllerB result = null; foreach (PlayerControllerB val in allPlayerScripts) { float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)val).gameObject.transform.position); if (num2 < num && ((NetworkBehaviour)val).NetworkObject.NetworkObjectId != ((NetworkBehaviour)player).NetworkObject.NetworkObjectId) { num = num2; result = val; } } if (num < maxPlayerBiteRange) { return result; } return null; } public EnemyAI scanForMonsterTarget() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) RoundManager instance = RoundManager.Instance; EnemyAI[] array = Object.FindObjectsOfType(); float num = 10000f; EnemyAI result = null; foreach (EnemyAI val in array) { float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)val).gameObject.transform.position); if (num2 < num) { num = num2; result = val; } } if (num < maxEnemyBiteRange) { return result; } return null; } [ClientRpc] public void PlayDogAnimationClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(303755147u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 303755147u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; try { PlayTemporaryAnimation("ClimbLadder", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("CrouchDown", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("CrouchIdle", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("Sprint", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("Jump", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("JumpLand", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("ShovelHold", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("LimpWalk", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("Dance1", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("Dance2", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("Hurt1", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("WalkSideways", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("WalkTired", biteAnimation, thrashTime); } catch { } try { PlayTemporaryAnimation("Idle1", biteAnimation, thrashTime); } catch { } } public void PlayTemporaryAnimation(string stateName, AnimationClip clip, float duration) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown Animator playerBodyAnimator = player.playerBodyAnimator; AnimatorOverrideController val = new AnimatorOverrideController(playerBodyAnimator.runtimeAnimatorController); AnimationClip originalClip = val[stateName]; val[stateName] = clip; playerBodyAnimator.runtimeAnimatorController = (RuntimeAnimatorController)(object)val; playerBodyAnimator.Play(stateName, 0, 0f); ((MonoBehaviour)this).StartCoroutine(RestoreAnimationCoroutine(stateName, originalClip, val, playerBodyAnimator, duration)); } private IEnumerator RestoreAnimationCoroutine(string stateName, AnimationClip originalClip, AnimatorOverrideController overrideController, Animator playerAnimator, float duration) { yield return (object)new WaitForSeconds(duration); overrideController[stateName] = originalClip; playerAnimator.runtimeAnimatorController = (RuntimeAnimatorController)(object)overrideController; playerAnimator.Play("Idle1"); } [ServerRpc(RequireOwnership = false)] public void PlayBorkServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4199806529u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4199806529u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayBorkClientRpc(); } } } [ClientRpc] public void PlayBorkClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(883183598u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 883183598u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; dogborks[rnd.Next(0, dogborks.Length)].Play(); } } } [ServerRpc(RequireOwnership = false)] public void PlayGrowlServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3840295770u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3840295770u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayGrowlClientRpc(); } } } [ClientRpc] public void PlayGrowlClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3896955612u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3896955612u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; dogGrowl.Play(); } } } [ServerRpc(RequireOwnership = false)] public void PlayMunchServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3366310920u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3366310920u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayMunchClientRpc(); } } } [ClientRpc] public void PlayMunchClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(995142161u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 995142161u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; dogMunch.Play(); } } } [ClientRpc] public void SetMonsterPositionClientRpc(ulong enemyId, Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2243527012u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, enemyId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2243527012u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; EnemyAI[] array = Object.FindObjectsOfType(); foreach (EnemyAI val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == enemyId) { ((Component)val3).transform.position = position; break; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(423169188u, new RpcReceiveHandler(__rpc_handler_423169188), "clientAttachClientRpc"); ((NetworkBehaviour)this).__registerRpc(1604841327u, new RpcReceiveHandler(__rpc_handler_1604841327), "initiateChompServerRpc"); ((NetworkBehaviour)this).__registerRpc(1939783607u, new RpcReceiveHandler(__rpc_handler_1939783607), "SetPlayerPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(933586802u, new RpcReceiveHandler(__rpc_handler_933586802), "dmgPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2578395319u, new RpcReceiveHandler(__rpc_handler_2578395319), "DisablePlayerCollidersClientRpc"); ((NetworkBehaviour)this).__registerRpc(3574043910u, new RpcReceiveHandler(__rpc_handler_3574043910), "EnablePlayerCollidersClientRpc"); ((NetworkBehaviour)this).__registerRpc(2665398052u, new RpcReceiveHandler(__rpc_handler_2665398052), "setHeadTransformLinkRotationClientRpc"); ((NetworkBehaviour)this).__registerRpc(303755147u, new RpcReceiveHandler(__rpc_handler_303755147), "PlayDogAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(4199806529u, new RpcReceiveHandler(__rpc_handler_4199806529), "PlayBorkServerRpc"); ((NetworkBehaviour)this).__registerRpc(883183598u, new RpcReceiveHandler(__rpc_handler_883183598), "PlayBorkClientRpc"); ((NetworkBehaviour)this).__registerRpc(3840295770u, new RpcReceiveHandler(__rpc_handler_3840295770), "PlayGrowlServerRpc"); ((NetworkBehaviour)this).__registerRpc(3896955612u, new RpcReceiveHandler(__rpc_handler_3896955612), "PlayGrowlClientRpc"); ((NetworkBehaviour)this).__registerRpc(3366310920u, new RpcReceiveHandler(__rpc_handler_3366310920), "PlayMunchServerRpc"); ((NetworkBehaviour)this).__registerRpc(995142161u, new RpcReceiveHandler(__rpc_handler_995142161), "PlayMunchClientRpc"); ((NetworkBehaviour)this).__registerRpc(2243527012u, new RpcReceiveHandler(__rpc_handler_2243527012), "SetMonsterPositionClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_423169188(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); target.__rpc_exec_stage = (__RpcExecStage)1; ((DogHeadMod)(object)target).clientAttachClientRpc(playerid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1604841327(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; ((DogHeadMod)(object)target).initiateChompServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1939783607(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((DogHeadMod)(object)target).SetPlayerPositionClientRpc(playerid, position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_933586802(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); int amount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref amount); target.__rpc_exec_stage = (__RpcExecStage)1; ((DogHeadMod)(object)target).dmgPlayerClientRpc(playerid, amount); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2578395319(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; ((DogHeadMod)(object)target).DisablePlayerCollidersClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3574043910(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; ((DogHeadMod)(object)target).EnablePlayerCollidersClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2665398052(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float headTransformLinkRotationClientRpc = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref headTransformLinkRotationClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DogHeadMod)(object)target).setHeadTransformLinkRotationClientRpc(headTransformLinkRotationClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_303755147(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; ((DogHeadMod)(object)target).PlayDogAnimationClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4199806529(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; ((DogHeadMod)(object)target).PlayBorkServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_883183598(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; ((DogHeadMod)(object)target).PlayBorkClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3840295770(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; ((DogHeadMod)(object)target).PlayGrowlServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3896955612(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; ((DogHeadMod)(object)target).PlayGrowlClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3366310920(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; ((DogHeadMod)(object)target).PlayMunchServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_995142161(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; ((DogHeadMod)(object)target).PlayMunchClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2243527012(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong enemyId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref enemyId); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((DogHeadMod)(object)target).SetMonsterPositionClientRpc(enemyId, position); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DogHeadMod"; } } } namespace EasterIsland.src.EasterIslandScripts.Heaven.Apparatuses { public class AppWhiteMod : MonoBehaviour { public Color appColor; public void Start() { } public void spawnMoaiGuardian() { } } } namespace EasterIsland.src.EasterIslandScripts.Company_Easter_Egg { public class ButtonPressAnimLibrary3 : NetworkBehaviour { public Animator buttonAnimator; public Animator satelliteAnimator; private bool inEvent = false; public AudioSource flickSound; public AudioSource scanningSound; public AudioSource blastSound; public ShipCrashScript shipCrash; public ParticleSystem satelliteFire; public Text consoleText; public void Start() { } public void CreateAndPlayAnimation() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { animClientRpc(); } else { animServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void animServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2933496060u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2933496060u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animClientRpc(); } } } [ClientRpc] public void animClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2665696215u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2665696215u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; startEvent(); } } } public async void startEvent() { if (!inEvent) { inEvent = true; buttonAnimator.Play("Pressing_Anim"); flickSound.Play(); await Task.Delay(2000); scanningSound.Play(); satelliteAnimator.Play("Scanning"); consoleText.text = "Scanning For Satellite Location..."; await Task.Delay(6500); consoleText.text = "Satellite found. Sending LAND Signal at locale (LANDBRIDGE_RIGHT)"; satelliteFire.Play(); await Task.Delay(4000); blastSound.Play(); await Task.Delay(1000); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { shipCrash.awaitCrash(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2933496060u, new RpcReceiveHandler(__rpc_handler_2933496060), "animServerRpc"); ((NetworkBehaviour)this).__registerRpc(2665696215u, new RpcReceiveHandler(__rpc_handler_2665696215), "animClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2933496060(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; ((ButtonPressAnimLibrary3)(object)target).animServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2665696215(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; ((ButtonPressAnimLibrary3)(object)target).animClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ButtonPressAnimLibrary3"; } } public class CompanyFightScript : NetworkBehaviour { private int hp = 90; private int hpToSpawn = 75; public Animator wallAnimator; public bool phase1Done = false; public bool phase2Done = false; public bool phase3Done = false; public GameObject companyHitBox; public static bool hostile; private float spawnMimicTimer = 0f; private float spawnMimicDelay = 70f; private float checkAllDeadTimer = 0f; private float checkAllDeadInterval = 0.5f; private float spawnMonstersTimer = 0f; private float spawnMonstersInterval = 90f; public NavMeshSurface navmesh; public GameObject[] AINodes; public GameObject bossUI; public HealthBar healthBar; public GameObject healthBarGO; public TentacleScript tentacleLeft; public TentacleScript tentacleMiddle; public TentacleScript tentacleRight; public BombTurret rightTurret; public BombTurret leftTurret; public AudioSource awakenAudio; public AudioSource phase1Audio; public AudioSource phase2Audio; public AudioSource phase3Audio; public AudioSource deathAudio; private float tentacleInterval = 20f; private float tentacleTimer = 0f; protected (int, string[]) angryLootbug = (3, new string[2] { "hoard", "bug" }); protected (int, string[]) angryButler = (3, new string[2] { "butler", "" }); protected (int, string[]) mouthDog = (3, new string[2] { "mouth", "dog" }); protected (int, string[]) thumper = (3, new string[2] { "crawler", "" }); protected (int, string[]) giant = (5, new string[2] { "giant", "forest" }); protected (int, string[]) baboonHawk = (2, new string[2] { "bab", "hawk" }); public GameObject spawnIndicator; public GameObject endingSequenceUI; public MoaiEndingSequence endingSequence; public void Start() { Debug.Log((object)"Company Boss: Fight Script Start"); hostile = false; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { ((NetworkBehaviour)this).NetworkObject.Spawn(false); Plugin.destroyOnLoad.Add(((Component)this).gameObject); } healthBarGO.SetActive(false); endingSequenceUI.SetActive(false); } [ClientRpc] public void endFightClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(6364267u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 6364267u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; endFightAsync(); } } } public async void endFightAsync() { Debug.Log((object)"Company Boss: Ending Script Start"); endingSequenceUI.SetActive(true); wallAnimator.Play("Shatter_3"); phase3Done = true; deathAudio.Play(); Object.Destroy((Object)(object)healthBarGO); endingSequenceUI.SetActive(true); hostile = false; leftTurret.hostile = false; rightTurret.hostile = false; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { EnemyAI[] enemies = Object.FindObjectsOfType(); EnemyAI[] array = enemies; foreach (EnemyAI enemy in array) { if (Object.op_Implicit((Object)(object)((Component)enemy).gameObject)) { Object.Destroy((Object)(object)((Component)enemy).gameObject); } } } await Task.Delay(15000); endingSequence.TriggerMoaiEnding(); } public async void beginFight() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { Debug.Log((object)"Company Boss: begin fight host"); fightStartEffectsClientRpc(hp); await Task.Delay(1000); initHealthBarClientRpc(hp); await Task.Delay(1000); bossStartEffectClientRpc(); } else { Debug.Log((object)"Company Boss: begin fight serverrpc call"); beginFightServerRpc(); } } [ClientRpc] public void fightStartEffectsClientRpc(int hpInput) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2509148958u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, hpInput); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2509148958u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Company Boss: fightstarteffectsclientrpc"); healthBarGO.SetActive(true); } } } [ServerRpc(RequireOwnership = false)] public void beginFightServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3783473367u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3783473367u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Company Boss: beginfightserverrpc"); beginFight(); } } } [ClientRpc] public void bossStartEffectClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1655609625u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1655609625u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Company Boss: bossstarteffectclientrpc"); bossStart(); } } } public async void bossStart() { Debug.Log((object)"Company Boss: bossstart"); HUDManager.Instance.ShakeCamera((ScreenShakeType)3); HUDManager.Instance.ShakeCamera((ScreenShakeType)2); phase1Audio.Play(); await Task.Delay(3000); Debug.Log((object)"LegendOfTheMoai: Company Boss Fight Begin"); rightTurret.hostile = true; leftTurret.hostile = true; awakenAudio.Play(); tentacleLeft.animator.Play("Rise"); tentacleMiddle.animator.Play("Rise"); tentacleRight.animator.Play("Rise"); HUDManager.Instance.ShakeCamera((ScreenShakeType)3); HUDManager.Instance.ShakeCamera((ScreenShakeType)2); await Task.Delay(1000); HUDManager.Instance.ShakeCamera((ScreenShakeType)3); HUDManager.Instance.ShakeCamera((ScreenShakeType)2); await Task.Delay(1000); HUDManager.Instance.ShakeCamera((ScreenShakeType)3); HUDManager.Instance.ShakeCamera((ScreenShakeType)2); if (Object.op_Implicit((Object)(object)GameObject.Find("SpeakerBox"))) { Object.Destroy((Object)(object)GameObject.Find("SpeakerBox")); } } [ClientRpc] public void initHealthBarClientRpc(int hpInput) { //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) //IL_011a: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3477942526u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, hpInput); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3477942526u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Company Boss: initHealthBarClientRpc"); healthBar.healthbarColor = new Color(healthBar.healthbarColor.r, healthBar.healthbarColor.g, healthBar.healthbarColor.b, 1f); healthBarGO.SetActive(true); healthBar.SetHealth(hpInput); hostile = true; } } } public void tentacleAttack() { Debug.Log((object)"Company Boss: tentacleattack"); int randTent = Random.Range(0, 3); tentacleAttackClientRpc(randTent); } [ClientRpc] public void tentacleAttackClientRpc(int randTent) { //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) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2914112319u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, randTent); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2914112319u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Company Boss: tentacleattackclientrpc"); switch (randTent) { case 0: tentacleLeft.attackGround(); break; case 1: tentacleRight.attackGround(); break; case 2: tentacleMiddle.attackGround(); break; } } } public void Update() { if (((NetworkBehaviour)RoundManager.Instance).IsHost && hostile) { spawnMimicTimer += Time.deltaTime; if (spawnMimicTimer > spawnMimicDelay) { spawnMimicTimer = 0f; spawnMimics(); } checkAllDeadTimer += Time.deltaTime; if (checkAllDeadTimer > checkAllDeadInterval) { checkAllDead(); } tentacleTimer += Time.deltaTime; if (tentacleTimer > tentacleInterval) { tentacleTimer = 0f; tentacleAttack(); } spawnMonstersTimer += Time.deltaTime; if (spawnMonstersTimer > spawnMonstersInterval) { spawnMonstersTimer = 0f; SpawnMonstersForPhase(Math.Min(90, hp * 2)); } } } public void checkAllDead() { } [ClientRpc] public void updateCurrentHealthClientRpc(int hpEntry) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(892546290u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, hpEntry); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 892546290u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Company Boss: updatecurrenthealthclientrpc"); healthBar.SetHealth(hpEntry); } } } [ClientRpc] public void updateMaxHealthClientRpc(int hpEntry) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(874303616u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, hpEntry); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 874303616u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Company Boss: updatemaxhealthclientrpc"); healthBar.SetMaxhealth(hpEntry); } } } [ClientRpc] public void phase1DoneClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1334730460u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1334730460u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Company Boss: phase1doneclientrpc"); wallAnimator.Play("Shatter_1"); phase1Done = true; phase2Audio.Play(); } } } [ClientRpc] public void phase2DoneClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2239356085u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2239356085u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Company Boss: phase2doneclientrpc"); wallAnimator.Play("Shatter_2"); phase2Done = true; phase3Audio.Play(); } } } [ServerRpc(RequireOwnership = false)] public void takeDamageServerRpc(int force) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(217390935u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, force); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 217390935u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; takeDamage(force); } } } public async void takeDamage(int force) { Debug.Log((object)"Company Boss: takeDamage"); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if (hp <= hpToSpawn) { SpawnMonstersForPhase(hp); hpToSpawn -= 15; } hp -= force; int tempHp = hp; updateCurrentHealthClientRpc(hp); if (hp < 60 && !phase1Done) { phase1DoneClientRpc(); } if (hp < 30 && !phase2Done) { phase2DoneClientRpc(); } if (hp <= 0 && !phase3Done) { endFightClientRpc(); } await Task.Delay(800); updateMaxHealthClientRpc(tempHp); } } public void spawnMimics() { int num = (90 - hp) / 30 + 1; GameObject enemyPrefab = getEnemyPrefab("masked", ""); for (int i = 0; i < num; i++) { asyncSpawn(enemyPrefab); } } public void SpawnMonstersForPhase(int hp) { if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } int totalWeight = 3 + 3 * (90 - hp) / 15; List<(string[], int)> list = PickMonstersToSpawn(totalWeight); foreach (var item3 in list) { string[] item = item3.Item1; int item2 = item3.Item2; GameObject enemyPrefab = getEnemyPrefab(item[0], item[1]); if ((Object)(object)enemyPrefab != (Object)null) { for (int i = 0; i < item2; i++) { asyncSpawn(enemyPrefab); } } } } public async void asyncSpawn(GameObject prefab) { Debug.Log((object)"Company Boss: ASYNCSPAWN"); Vector3 position = randomAINode().transform.position; Quaternion rotation = randomAINode().transform.rotation; spawnIndicatorClientRpc(position); await Task.Delay(5000); GameObject GO = Object.Instantiate(prefab, position, rotation); GO.GetComponentInChildren().Spawn(true); EnemyAI AI = GO.GetComponent(); Debug.Log((object)AINodes); Debug.Log((object)AINodes.Length); AI.allAINodes = AINodes; RoundManager.Instance.SpawnedEnemies.Add(AI); AI.isOutside = true; placeOnNavmesh(AI); modifyAI(AI); } [ClientRpc] public void spawnIndicatorClientRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1442255181u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1442255181u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Company Boss: spawnindicatorclientrpc"); spawnIndicatorAsync(position); } } } public async void spawnIndicatorAsync(Vector3 position) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) GameObject GO = Object.Instantiate(spawnIndicator, position, Quaternion.identity); await Task.Delay(5000); Object.Destroy((Object)(object)GO); } public PlayerControllerB getRandomPlayer() { PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; List list = new List(); PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (val.isPlayerControlled) { list.Add(val); } } return list[Random.RandomRangeInt(0, list.Count)]; } public async void modifyAI(EnemyAI MAI) { if (MAI is ButlerEnemyAI) { PlayerControllerB target = getRandomPlayer(); for (int j = 0; j < 4; j++) { Debug.Log((object)"Company Boss: Brainwashing Butler"); ButlerEnemyAI ai2 = (ButlerEnemyAI)(object)((MAI is ButlerEnemyAI) ? MAI : null); ai2.PingAttention(5, 0.6f, ((Component)target).transform.position, false); await Task.Delay(1000); } } if (MAI is HoarderBugAI) { PlayerControllerB target2 = getRandomPlayer(); for (int i = 0; i < 4; i++) { Debug.Log((object)"Company Boss: Brainwashing HoarderBug"); HoarderBugAI ai = (HoarderBugAI)(object)((MAI is HoarderBugAI) ? MAI : null); ai.angryAtPlayer = target2; ai.angryTimer += 18f; await Task.Delay(1000); } } } public async void placeOnNavmesh(EnemyAI moai) { for (int i = 0; i < 20; i++) { int num; if (Object.op_Implicit((Object)(object)moai) && Object.op_Implicit((Object)(object)moai.agent)) { _ = moai.serverPosition; num = 1; } else { num = 0; } if (num != 0) { break; } await Task.Delay(250); } moai.isOutside = false; Vector3 sourcePos = ((Component)moai).gameObject.transform.position; NavMeshHit hit = default(NavMeshHit); if (NavMesh.SamplePosition(sourcePos, ref hit, 5f, -1)) { ManualLogSource logger = Plugin.Logger; Vector3 position = ((Component)moai).transform.position; logger.LogInfo((object)("EI CompanyFightScript: Transporting Monster to: " + ((object)(Vector3)(ref position)).ToString())); moai.serverPosition = ((NavMeshHit)(ref hit)).position; ((Component)moai).transform.position = ((NavMeshHit)(ref hit)).position; moai.isOutside = true; moai.agent.Warp(moai.serverPosition); moai.SyncPositionToClients(); } else { Plugin.Logger.LogWarning((object)"EI CompanyFightScript: Mosnter transport Failed to find Navmesh!"); } } public GameObject randomAINode() { return AINodes[Random.Range(0, AINodes.Length)]; } public GameObject getEnemyPrefab(string match1, string match2) { EnemyType[] array = Resources.FindObjectsOfTypeAll(); EnemyType[] array2 = array; foreach (EnemyType val in array2) { string text = val.enemyName.ToLower(); if (text.Contains(match1) && (match2.Equals("") || text.Contains(match2)) && (Object)(object)val.enemyPrefab != (Object)null && !text.Contains("bee")) { return val.enemyPrefab; } } MonoBehaviour.print((object)"retrieval failure"); return null; } public List<(string[] monsterKeys, int amount)> PickMonstersToSpawn(int totalWeight) { List<(int, string[])> source = new List<(int, string[])> { angryLootbug, angryButler, mouthDog, thumper, giant, baboonHawk }; int num = Random.Range(1, 4); List<(string[], int)> list = new List<(string[], int)>(); for (int i = 0; i < num; i++) { List<(int, string[])> list2 = source.Where<(int, string[])>(((int weight, string[] keys) m) => m.weight <= totalWeight).ToList(); if (list2.Count == 0) { break; } int totalWeightSum = list2.Sum<(int, string[])>(((int weight, string[] keys) m) => m.weight); (int weight, string[] keys) tuple = WeightedMonsterPick(list2, totalWeightSum); int item = tuple.weight; string[] item2 = tuple.keys; int num2 = totalWeight / item; if (num2 < 1) { break; } int num3 = Random.Range(1, num2 + 1); totalWeight -= item * num3; list.Add((item2, num3)); if (totalWeight <= 0) { break; } } return list; } private (int weight, string[] keys) WeightedMonsterPick(List<(int weight, string[] keys)> monsters, int totalWeightSum) { int num = Random.Range(1, totalWeightSum + 1); int num2 = 0; foreach (var monster in monsters) { num2 += monster.weight; if (num <= num2) { return monster; } } return monsters[monsters.Count - 1]; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(6364267u, new RpcReceiveHandler(__rpc_handler_6364267), "endFightClientRpc"); ((NetworkBehaviour)this).__registerRpc(2509148958u, new RpcReceiveHandler(__rpc_handler_2509148958), "fightStartEffectsClientRpc"); ((NetworkBehaviour)this).__registerRpc(3783473367u, new RpcReceiveHandler(__rpc_handler_3783473367), "beginFightServerRpc"); ((NetworkBehaviour)this).__registerRpc(1655609625u, new RpcReceiveHandler(__rpc_handler_1655609625), "bossStartEffectClientRpc"); ((NetworkBehaviour)this).__registerRpc(3477942526u, new RpcReceiveHandler(__rpc_handler_3477942526), "initHealthBarClientRpc"); ((NetworkBehaviour)this).__registerRpc(2914112319u, new RpcReceiveHandler(__rpc_handler_2914112319), "tentacleAttackClientRpc"); ((NetworkBehaviour)this).__registerRpc(892546290u, new RpcReceiveHandler(__rpc_handler_892546290), "updateCurrentHealthClientRpc"); ((NetworkBehaviour)this).__registerRpc(874303616u, new RpcReceiveHandler(__rpc_handler_874303616), "updateMaxHealthClientRpc"); ((NetworkBehaviour)this).__registerRpc(1334730460u, new RpcReceiveHandler(__rpc_handler_1334730460), "phase1DoneClientRpc"); ((NetworkBehaviour)this).__registerRpc(2239356085u, new RpcReceiveHandler(__rpc_handler_2239356085), "phase2DoneClientRpc"); ((NetworkBehaviour)this).__registerRpc(217390935u, new RpcReceiveHandler(__rpc_handler_217390935), "takeDamageServerRpc"); ((NetworkBehaviour)this).__registerRpc(1442255181u, new RpcReceiveHandler(__rpc_handler_1442255181), "spawnIndicatorClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_6364267(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; ((CompanyFightScript)(object)target).endFightClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2509148958(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 hpInput = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hpInput); target.__rpc_exec_stage = (__RpcExecStage)1; ((CompanyFightScript)(object)target).fightStartEffectsClientRpc(hpInput); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3783473367(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; ((CompanyFightScript)(object)target).beginFightServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1655609625(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; ((CompanyFightScript)(object)target).bossStartEffectClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3477942526(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 hpInput = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hpInput); target.__rpc_exec_stage = (__RpcExecStage)1; ((CompanyFightScript)(object)target).initHealthBarClientRpc(hpInput); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2914112319(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 randTent = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref randTent); target.__rpc_exec_stage = (__RpcExecStage)1; ((CompanyFightScript)(object)target).tentacleAttackClientRpc(randTent); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_892546290(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 hpEntry = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hpEntry); target.__rpc_exec_stage = (__RpcExecStage)1; ((CompanyFightScript)(object)target).updateCurrentHealthClientRpc(hpEntry); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_874303616(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 hpEntry = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hpEntry); target.__rpc_exec_stage = (__RpcExecStage)1; ((CompanyFightScript)(object)target).updateMaxHealthClientRpc(hpEntry); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1334730460(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; ((CompanyFightScript)(object)target).phase1DoneClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2239356085(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; ((CompanyFightScript)(object)target).phase2DoneClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_217390935(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 force = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref force); target.__rpc_exec_stage = (__RpcExecStage)1; ((CompanyFightScript)(object)target).takeDamageServerRpc(force); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1442255181(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((CompanyFightScript)(object)target).spawnIndicatorClientRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CompanyFightScript"; } } public class ShipCrashScript : NetworkBehaviour { public AudioSource crashAudio; public Animator shipAnimator; public ParticleSystem frontStartExplosion; public ParticleSystem surroundingStartExplosion; public ParticleSystem Explosion2; public ParticleSystem Explosion3; public ParticleSystem Explosion4; private bool crashing = false; public void Start() { if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { } } public bool getCrashing() { return crashing; } public async void awaitCrash() { await Task.Delay(5000); playCutsceneClientRpc(); } [ClientRpc] public void playCutsceneClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(389537100u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 389537100u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; cutScenePlay(); } } } public async void cutScenePlay() { crashing = true; crashAudio.Play(); shipAnimator.Play("Crash"); await Task.Delay(5300); frontStartExplosion.Play(); surroundingStartExplosion.Play(); await Task.Delay(1250); Explosion2.Play(); await Task.Delay(250); Explosion3.Play(); await Task.Delay(400); Explosion4.Play(); crashing = false; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(389537100u, new RpcReceiveHandler(__rpc_handler_389537100), "playCutsceneClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_389537100(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; ((ShipCrashScript)(object)target).playCutsceneClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ShipCrashScript"; } } public class ShipKillBox : MonoBehaviour { public ShipCrashScript crashScript; private void OnTriggerEnter(Collider other) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) if (isPlayer(other) && crashScript.getCrashing()) { GameObject gameObject = ((Component)other).gameObject; PlayerControllerB component = gameObject.GetComponent(); component.KillPlayer(new Vector3(0f, 0f, 0f), true, (CauseOfDeath)8, 0, default(Vector3), false); } } public bool isPlayer(Collider other) { GameObject gameObject = ((Component)other).gameObject; if ((Object)(object)gameObject == (Object)null) { return false; } PlayerControllerB component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { return true; } return false; } } internal class ShipTeleporter : NetworkBehaviour { public string outsideShipDestName; public string insideShipDestName; public void teleportInShip(PlayerControllerB target) { if ((Object)(object)target == (Object)null) { target = RoundManager.Instance.playersManager.localPlayerController; } Debug.Log((object)("TeleportInShip: " + (object)target)); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { teleportInShipClientRpc(((NetworkBehaviour)target).NetworkObject.NetworkObjectId); } else { teleportInShipServerRpc(((NetworkBehaviour)target).NetworkObject.NetworkObjectId); } } public void teleportOutShip(PlayerControllerB target) { if ((Object)(object)target == (Object)null) { target = RoundManager.Instance.playersManager.localPlayerController; } Debug.Log((object)("TeleportOutShip: " + (object)target)); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { teleportOutShipClientRpc(((NetworkBehaviour)target).NetworkObject.NetworkObjectId); } else { teleportOutShipServerRpc(((NetworkBehaviour)target).NetworkObject.NetworkObjectId); } } [ServerRpc(RequireOwnership = false)] public void teleportInShipServerRpc(ulong uid) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2732355407u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2732355407u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; teleportInShipClientRpc(uid); } } } [ServerRpc(RequireOwnership = false)] public void teleportOutShipServerRpc(ulong uid) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2387302371u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2387302371u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; teleportOutShipClientRpc(uid); } } } [ClientRpc] public void teleportInShipClientRpc(ulong uid) { //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) //IL_0126: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2076392987u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2076392987u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)("TeleportInShipC: " + uid)); PlayerControllerB player = getPlayer(uid); Debug.Log((object)("TeleportInShipC: " + (object)player)); ((Component)player).transform.position = GameObject.Find(insideShipDestName).transform.position; } } } [ClientRpc] public void teleportOutShipClientRpc(ulong uid) { //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) //IL_0126: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4046497553u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4046497553u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)("TeleportOutShipC: " + uid)); PlayerControllerB player = getPlayer(uid); Debug.Log((object)("TeleportOutShipC: " + (object)player)); ((Component)player).transform.position = GameObject.Find(outsideShipDestName).transform.position; } } } public PlayerControllerB getPlayer(ulong playerid) { PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB result = null; foreach (PlayerControllerB val in allPlayerScripts) { if (((NetworkBehaviour)val).NetworkObjectId == playerid) { result = val; } } return result; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2732355407u, new RpcReceiveHandler(__rpc_handler_2732355407), "teleportInShipServerRpc"); ((NetworkBehaviour)this).__registerRpc(2387302371u, new RpcReceiveHandler(__rpc_handler_2387302371), "teleportOutShipServerRpc"); ((NetworkBehaviour)this).__registerRpc(2076392987u, new RpcReceiveHandler(__rpc_handler_2076392987), "teleportInShipClientRpc"); ((NetworkBehaviour)this).__registerRpc(4046497553u, new RpcReceiveHandler(__rpc_handler_4046497553), "teleportOutShipClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2732355407(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShipTeleporter)(object)target).teleportInShipServerRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2387302371(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShipTeleporter)(object)target).teleportOutShipServerRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2076392987(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShipTeleporter)(object)target).teleportInShipClientRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4046497553(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShipTeleporter)(object)target).teleportOutShipClientRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ShipTeleporter"; } } internal class SurgExit : NetworkBehaviour { public string DestName; public void teleportOutBase(PlayerControllerB target) { if ((Object)(object)target == (Object)null) { target = RoundManager.Instance.playersManager.localPlayerController; } Debug.Log((object)("TeleportOutShip: " + (object)target)); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { teleportOutBaseClientRpc(((NetworkBehaviour)target).NetworkObject.NetworkObjectId); } else { teleportOutBaseServerRpc(((NetworkBehaviour)target).NetworkObject.NetworkObjectId); } } [ServerRpc(RequireOwnership = false)] public void teleportOutBaseServerRpc(ulong uid) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(976619152u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 976619152u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; teleportOutBaseClientRpc(uid); } } } [ClientRpc] public void teleportOutBaseClientRpc(ulong uid) { //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) //IL_0126: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(996619482u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 996619482u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)("TeleportOutShipC: " + uid)); PlayerControllerB player = getPlayer(uid); Debug.Log((object)("TeleportOutShipC: " + (object)player)); ((Component)player).transform.position = GameObject.Find(DestName).transform.position; } } } public PlayerControllerB getPlayer(ulong playerid) { PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB result = null; foreach (PlayerControllerB val in allPlayerScripts) { if (((NetworkBehaviour)val).NetworkObjectId == playerid) { result = val; } } return result; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(976619152u, new RpcReceiveHandler(__rpc_handler_976619152), "teleportOutBaseServerRpc"); ((NetworkBehaviour)this).__registerRpc(996619482u, new RpcReceiveHandler(__rpc_handler_996619482), "teleportOutBaseClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_976619152(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)1; ((SurgExit)(object)target).teleportOutBaseServerRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_996619482(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); target.__rpc_exec_stage = (__RpcExecStage)1; ((SurgExit)(object)target).teleportOutBaseClientRpc(uid); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SurgExit"; } } } namespace EasterIsland.src.EasterIslandScripts.Company_Easter_Egg.CompanyFight { public class ArenaSetup { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_LoadNewLevel <>9__2_0; public static hook_SetDoorOpen <>9__2_1; internal void b__2_0(orig_LoadNewLevel orig, RoundManager self, int randomSeed, SelectableLevel newLevel) { orig.Invoke(self, randomSeed, newLevel); CompanyFightScript.hostile = false; } internal void b__2_1(orig_SetDoorOpen orig, HangarShipDoor self) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (qualifyForArena() && (Object)(object)ArenaSetup.wall == (Object)null) { Plugin.Logger.LogDebug((object)"Legend of The Moai: Company Fight Pre Requisites Met. Setting up Arena."); GameObject wall = getWall(); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { ArenaSetup.wall = Object.Instantiate(shatteredWallPrefab); ArenaSetup.wall.transform.position = new Vector3(0.31f, 0.9f, 1013.92f); } Object.Destroy((Object)(object)wall); sendMsg(); if (Object.op_Implicit((Object)(object)GameObject.Find("LEDHangingLight (3)"))) { Object.Destroy((Object)(object)GameObject.Find("LEDHangingLight (3)")); } if (Object.op_Implicit((Object)(object)GameObject.Find("LEDHangingLight (4)"))) { Object.Destroy((Object)(object)GameObject.Find("LEDHangingLight (4)")); } if (Object.op_Implicit((Object)(object)GameObject.Find("LEDHangingLight (2)"))) { Object.Destroy((Object)(object)GameObject.Find("LEDHangingLight (2)")); } } } } public static GameObject shatteredWallPrefab; public static GameObject wall; public static void Start() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown shatteredWallPrefab = Plugin.easterislandBundle.LoadAsset("CompanyWall"); NetworkPrefabs.RegisterNetworkPrefab(shatteredWallPrefab); object obj = <>c.<>9__2_0; if (obj == null) { hook_LoadNewLevel val = delegate(orig_LoadNewLevel orig, RoundManager self, int randomSeed, SelectableLevel newLevel) { orig.Invoke(self, randomSeed, newLevel); CompanyFightScript.hostile = false; }; <>c.<>9__2_0 = val; obj = (object)val; } RoundManager.LoadNewLevel += (hook_LoadNewLevel)obj; object obj2 = <>c.<>9__2_1; if (obj2 == null) { hook_SetDoorOpen val2 = delegate(orig_SetDoorOpen orig, HangarShipDoor self) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (qualifyForArena() && (Object)(object)wall == (Object)null) { Plugin.Logger.LogDebug((object)"Legend of The Moai: Company Fight Pre Requisites Met. Setting up Arena."); GameObject val3 = getWall(); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { wall = Object.Instantiate(shatteredWallPrefab); wall.transform.position = new Vector3(0.31f, 0.9f, 1013.92f); } Object.Destroy((Object)(object)val3); sendMsg(); if (Object.op_Implicit((Object)(object)GameObject.Find("LEDHangingLight (3)"))) { Object.Destroy((Object)(object)GameObject.Find("LEDHangingLight (3)")); } if (Object.op_Implicit((Object)(object)GameObject.Find("LEDHangingLight (4)"))) { Object.Destroy((Object)(object)GameObject.Find("LEDHangingLight (4)")); } if (Object.op_Implicit((Object)(object)GameObject.Find("LEDHangingLight (2)"))) { Object.Destroy((Object)(object)GameObject.Find("LEDHangingLight (2)")); } } }; <>c.<>9__2_1 = val2; obj2 = (object)val2; } HangarShipDoor.SetDoorOpen += (hook_SetDoorOpen)obj2; } public static async void sendMsg() { await Task.Delay(5000); HUDManager.Instance.DisplayTip("WARNING", "Anomalous Weapon Detected. You are to remain an asset to the company. Ignoring such a warning risks termination.", true, false, "LC_Tip1"); } public static bool qualifyForArena() { RoundManager instance = RoundManager.Instance; if (instance.currentLevel.PlanetName.ToLower().Contains("gordion") && hasQuantumCannon() && Object.op_Implicit((Object)(object)getWall())) { return true; } return false; } public static bool hasQuantumCannon() { QuantumCannon[] array = Object.FindObjectsOfType(); if (array.Length != 0) { return true; } return false; } public static GameObject getWall() { GameObject val = GameObject.Find("CompanyPlanet"); if (Object.op_Implicit((Object)(object)val)) { return GameObject.Find("Cube.003"); } return null; } public static void StartArena() { } } public class CompanyHitbox : MonoBehaviour, IHittable { public CompanyFightScript fightScript; public void Start() { } public bool Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { if ((Object)(object)playerWhoHit == (Object)null) { return false; } if (!CompanyFightScript.hostile) { return false; } if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { fightScript.takeDamageServerRpc(force); } else { fightScript.takeDamage(force); } return true; } } public class CompanyMissile : MonoBehaviour { protected float missileSpeed = 0.2f; private float currentMissileSpeed = 0.35f; private bool hitWall = true; private float despawnTimer; private Random missileFlyRandom; private float forwardDistance; private float lastRotationDistance; protected float missileWarbleLevel = 0.73f; private static int missilesFired; private void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) missileFlyRandom = new Random((int)(((Component)this).transform.position.x + ((Component)this).transform.position.y) + missilesFired); hitWall = false; missilesFired++; } public void setMissileWarble(float val) { missileWarbleLevel = val; } public void setMissileSpeed(float val) { missileSpeed = val; } private void FixedUpdate() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) if (hitWall) { return; } if (despawnTimer < 5f) { despawnTimer += Time.deltaTime; CheckCollision(); Transform transform = ((Component)this).transform; transform.position += ((Component)this).transform.forward * missileSpeed * currentMissileSpeed; forwardDistance += missileSpeed * currentMissileSpeed; if (forwardDistance - lastRotationDistance > 2f) { lastRotationDistance = forwardDistance; Transform transform2 = ((Component)this).transform; transform2.rotation *= Quaternion.Euler(new Vector3(15f * missileWarbleLevel * (float)(missileFlyRandom.NextDouble() * 2.0 - 1.0), 7f * missileWarbleLevel * (float)(missileFlyRandom.NextDouble() * 2.0 - 1.0), 15f * missileWarbleLevel * (float)(missileFlyRandom.NextDouble() * 2.0 - 1.0))); } currentMissileSpeed += 0.05f; } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void CheckCollision() { //IL_001b: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) int mask = LayerMask.GetMask(new string[1] { "Default" }); RaycastHit val = default(RaycastHit); if (!Physics.Raycast(((Component)this).transform.position, ((Component)this).transform.forward, ref val, 0.6f * currentMissileSpeed, mask, (QueryTriggerInteraction)2)) { return; } if (((Component)((RaycastHit)(ref val)).collider).gameObject.layer == 19) { EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref val)).collider).GetComponent(); if ((Object)(object)component != (Object)null) { return; } } bool flag = false; if (((Component)((RaycastHit)(ref val)).collider).gameObject.layer == 3) { PlayerControllerB component2 = ((Component)((RaycastHit)(ref val)).collider).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null && (Object)(object)component2 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { flag = true; } } hitWall = true; Landmine.SpawnExplosion(((Component)this).transform.position - ((Component)this).transform.forward * 0.5f, true, 4f, 7f, 15, 30f, (GameObject)null, true); Object.Destroy((Object)(object)((Component)this).gameObject); } } public class CompanyNavmeshPreload : MonoBehaviour { public NavMeshSurface surface; public void Start() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) NavMesh.AddNavMeshData(surface.navMeshData); } } [ExecuteAlways] public class HealthBar : MonoBehaviour { [Header("Base Settings")] public int maxHealth = 5; public int currentHealth = 1; public Color healthbarColor; public Color backgroundColor; public RuntimeAnimatorController childAnimator; [Header("Spread")] public float maxHorizontalUnits = 10f; public float horizontalSpacing = -10f; public float verticalSpacing = 10f; public float unitWidth = 60f; public float unitHeight = 40f; public List _healthBarUnits = new List(); public bool SetMaxhealth(int health) { if (health < 1) { return false; } maxHealth = health; return SetHealth(Math.Min(maxHealth, currentHealth)); } public bool SetHealth(int health) { if (health > maxHealth || health < 0) { return false; } currentHealth = health; updateHealthBar(); return true; } public void updateHealthBar() { makeBars(); cleanBars(); redrawBars(); updateBars(); } private Vector2 getUnitPosition(int i) { //IL_0047: 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_0050: Unknown result type (might be due to invalid IL or missing references) float num = (float)i % maxHorizontalUnits; int num2 = (int)((float)i / maxHorizontalUnits); float num3 = num * (unitWidth + horizontalSpacing); float num4 = (float)(-num2) * (unitHeight + verticalSpacing) - unitHeight / 2f; return new Vector2(num3, num4); } private void makeBars() { for (int i = 0; i < maxHealth; i++) { makeBar(i); } } private void makeBar(int i) { //IL_0023: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (_healthBarUnits.Count < i + 1) { RectTransform component = ((Component)this).GetComponent(); HealthBarUnit newHealthBarUnit = HealthBarUnit.GetNewHealthBarUnit(component, healthbarColor, backgroundColor, new Vector2(unitWidth, unitHeight), getUnitPosition(i), childAnimator); _healthBarUnits.Add(newHealthBarUnit); ((Object)newHealthBarUnit).name = $"bar_{i}"; } } private void cleanBars() { if (maxHealth >= _healthBarUnits.Count) { return; } List list = new List(); for (int i = maxHealth; i < _healthBarUnits.Count; i++) { list.Add(_healthBarUnits[i]); } foreach (HealthBarUnit item in list) { _healthBarUnits.Remove(item); if (Application.isPlaying) { Object.Destroy((Object)(object)((Component)item).gameObject); } else { Object.DestroyImmediate((Object)(object)((Component)item).gameObject); } } } private void redrawBars() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //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_00c2: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < _healthBarUnits.Count; i++) { Vector2 unitPosition = getUnitPosition(i); _healthBarUnits[i].Redraw(new Vector2(unitWidth, unitHeight), unitPosition, healthbarColor, backgroundColor); } RectTransform component = ((Component)this).GetComponent(); float num = (((float)maxHealth < maxHorizontalUnits) ? ((float)maxHealth) : maxHorizontalUnits); float num2 = Mathf.Ceil((float)maxHealth / maxHorizontalUnits); component.sizeDelta = new Vector2(unitWidth * num + horizontalSpacing * (num - 1f), unitHeight * num2 + verticalSpacing * (num2 - 1f)); } private void updateBars() { for (int i = 0; i < _healthBarUnits.Count; i++) { _healthBarUnits[i].SetFilled(i < currentHealth); } } } public class HealthBarUnit : MonoBehaviour { public GameObject _bgObject; public GameObject _fillObject; public Animator _animator; public bool _isOn = true; public static HealthBarUnit GetNewHealthBarUnit(RectTransform parentRect, Color fillColor, Color backgroundColor, Vector2 size, Vector2 anchoredPosition, RuntimeAnimatorController runtimeANC) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(); val.transform.parent = ((Component)parentRect).transform; val.AddComponent(); HealthBarUnit healthBarUnit = val.AddComponent(); RectTransform component = val.GetComponent(); component.sizeDelta = size; component.pivot = new Vector2(0f, 0.5f); component.anchorMin = new Vector2(0f, 1f); component.anchorMax = new Vector2(0f, 1f); component.anchoredPosition = anchoredPosition; Mask val2 = val.AddComponent(); val2.showMaskGraphic = false; Animator val3 = val.AddComponent(); val3.runtimeAnimatorController = runtimeANC; GameObject image = getImage(val.GetComponent(), backgroundColor, "Background", size.x * 0.85f, size.y * 2f); GameObject image2 = getImage(val.GetComponent(), fillColor, "Fill", size.x * 0.75f, size.y * 2f); healthBarUnit._animator = val3; healthBarUnit._bgObject = image; healthBarUnit._fillObject = image2; return healthBarUnit; } private static GameObject getImage(RectTransform parentRect, Color color, string name, float x_mod, float y_mod) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(); val.transform.parent = ((Component)parentRect).transform; ((Object)val).name = name; Image val2 = val.AddComponent(); ((Graphic)val2).color = color; RectTransform component = val.GetComponent(); component.pivot = new Vector2(0f, 0.5f); component.anchoredPosition = Vector2.op_Implicit(new Vector3((0f - x_mod) / 2f, 0f, 0f)); component.sizeDelta = new Vector2(x_mod, y_mod); ((Transform)component).eulerAngles = new Vector3(0f, 0f, -10f); return val; } public void Redraw(Vector2 size, Vector2 anchoredPosition, Color fillColor, Color backgroundColor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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) ((Component)this).GetComponent().sizeDelta = size; ((Component)this).GetComponent().anchoredPosition = anchoredPosition; ((Transform)((Component)this).GetComponent()).localScale = Vector2.op_Implicit(new Vector2(1f, 1f)); _fillObject.GetComponent().sizeDelta = new Vector2(size.x * 0.75f, size.y * 2f); _fillObject.GetComponent().anchoredPosition = Vector2.op_Implicit(new Vector3((0f - size.x) * 0.75f / 2f, 0f, 0f)); ((Graphic)_fillObject.GetComponent()).color = fillColor; _bgObject.GetComponent().sizeDelta = new Vector2(size.x * 0.85f, size.y * 2f); _bgObject.GetComponent().anchoredPosition = Vector2.op_Implicit(new Vector3((0f - size.x) * 0.85f / 2f, 0f, 0f)); ((Graphic)_bgObject.GetComponent()).color = backgroundColor; } public void SetFilled(bool isOn) { if (_isOn != isOn) { if (!Application.isPlaying) { _fillObject.SetActive(isOn); } if (isOn) { _animator.Play("ACL_HealthBarUnit_Enter", 0); } else { _animator.Play("ACL_HealthBarUnit_Hit", 0); } _isOn = isOn; } } } public class MoaiEndingSequence : MonoBehaviour { public CanvasGroup fadeCanvas; public TextMeshProUGUI titleText; public TextMeshProUGUI endText; public AudioSource moaiSound; public float fadeSpeed; public float delayBeforeReset; public AudioSource rockHitSound; public AudioSource creditMusic; public CanvasGroup LikeGroup; private void Start() { fadeCanvas.alpha = 0f; LikeGroup.alpha = 0f; ((Behaviour)titleText).enabled = false; ((Behaviour)endText).enabled = false; } public void TriggerMoaiEnding() { ((MonoBehaviour)this).StartCoroutine(PlayEndingSequence()); } private IEnumerator PlayEndingSequence() { while (fadeCanvas.alpha < 1f) { CanvasGroup obj = fadeCanvas; obj.alpha += Time.deltaTime * fadeSpeed; yield return null; } moaiSound.Play(); ((Behaviour)titleText).enabled = true; yield return (object)new WaitForSeconds(4f); rockHitSound.Play(); ((Behaviour)endText).enabled = true; yield return (object)new WaitForSeconds(2.35f); LikeGroup.alpha = 1f; yield return (object)new WaitForSeconds(delayBeforeReset); GameNetworkManager.Instance.Disconnect(); } } public class TentacleDamageHitbox : NetworkBehaviour { public List collidedOBJS; public void Start() { collidedOBJS = new List(); } public void clear() { collidedOBJS.Clear(); } private void OnTriggerEnter(Collider other) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)other).gameObject; if (Object.op_Implicit((Object)(object)gameObject) && !collidedOBJS.Contains(gameObject)) { EnemyAI val = enemyParentWalk(gameObject); if (Object.op_Implicit((Object)(object)val)) { val.HitEnemy(8, (PlayerControllerB)null, true, -1); } PlayerControllerB val2 = playerParentWalk(gameObject); if (Object.op_Implicit((Object)(object)val2)) { val2.DamagePlayer(50, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } collidedOBJS.Add(gameObject); } } public PlayerControllerB playerParentWalk(GameObject leaf) { while ((Object)(object)leaf != (Object)null && (Object)(object)leaf.GetComponent() == (Object)null) { leaf = ((!Object.op_Implicit((Object)(object)leaf.transform.parent) || !Object.op_Implicit((Object)(object)((Component)leaf.transform.parent).gameObject)) ? null : ((Component)leaf.transform.parent).gameObject); } if (Object.op_Implicit((Object)(object)leaf) && Object.op_Implicit((Object)(object)leaf.GetComponent())) { return leaf.GetComponent(); } return null; } public EnemyAI enemyParentWalk(GameObject leaf) { while ((Object)(object)leaf != (Object)null && (Object)(object)leaf.GetComponent() == (Object)null) { leaf = ((!Object.op_Implicit((Object)(object)leaf.transform.parent) || !Object.op_Implicit((Object)(object)((Component)leaf.transform.parent).gameObject)) ? null : ((Component)leaf.transform.parent).gameObject); } if (Object.op_Implicit((Object)(object)leaf) && Object.op_Implicit((Object)(object)leaf.GetComponent())) { return leaf.GetComponent(); } return null; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "TentacleDamageHitbox"; } } public class TentacleScript : MonoBehaviour { public Animator animator; public AudioSource attackWarning; public AudioSource slamSound; public GameObject hitIndicator; public TentacleDamageHitbox hitbox1; public TentacleDamageHitbox hitbox2; public TentacleDamageHitbox hitbox3; public MeshRenderer hitboxRenderer; public void Start() { hitIndicator.SetActive(false); } public async void attackGround() { attackWarning.Play(); hitbox1.clear(); hitbox2.clear(); hitbox3.clear(); await ShowAndFlashHitbox(1.5f, 0.2f); animator.Play("Slam"); await Task.Delay(2200); slamSound.Play(); HUDManager.Instance.ShakeCamera((ScreenShakeType)3); hitIndicator.SetActive(true); ((Renderer)hitboxRenderer).enabled = true; await Task.Delay(30); hitIndicator.SetActive(false); ((Renderer)hitboxRenderer).enabled = false; } private async Task ShowAndFlashHitbox(float warningDuration, float flashInterval) { hitIndicator.SetActive(true); ((Renderer)hitboxRenderer).enabled = true; float elapsed = 0f; bool visible = true; for (; elapsed < warningDuration; elapsed += flashInterval) { await Task.Delay((int)(flashInterval * 1000f)); visible = !visible; ((Renderer)hitboxRenderer).enabled = visible; } hitIndicator.SetActive(false); ((Renderer)hitboxRenderer).enabled = false; } } public class TurretSpawner : MonoBehaviour { public void Start() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { awaitSpawn(); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } public async void awaitSpawn() { await Task.Delay(6000); ((Component)this).GetComponent().Spawn(false); } } } namespace EasterIsland.src.EasterIslandScripts.Technical { public class DualPortalSpawner : MonoBehaviour { public void Start() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) ((Component)this).gameObject.transform.localScale = new Vector3(1f, 1f, 1f); ((Component)this).transform.localScale = new Vector3(1f, 1f, 1f); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { GameObject val = Object.Instantiate(Plugin.DualPortal, ((Component)this).transform); NetworkObject component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.Spawn(false); } else { Debug.LogError((object)"Failed to spawn DualPortal: NetworkObject component is missing!"); } } } } public class ConditionalObjectArea : MonoBehaviour { public GameObject[] hostObjects; protected List playersInside; private void Start() { playersInside = new List(); for (int i = 0; i < hostObjects.Length; i++) { hostObjects[i].SetActive(false); } } private void OnTriggerEnter(Collider other) { PlayerControllerB player = getPlayer(other); if (!((Object)(object)player != (Object)null)) { return; } for (int i = 0; i < hostObjects.Length; i++) { hostObjects[i].SetActive(true); if (!playersInside.Contains(player)) { playersInside.Add(player); } } } private void OnTriggerExit(Collider other) { PlayerControllerB player = getPlayer(other); if (!((Object)(object)player != (Object)null)) { return; } if (playersInside.Contains(player)) { playersInside.Remove(player); } if (playersInside.Count == 0) { for (int i = 0; i < hostObjects.Length; i++) { hostObjects[i].SetActive(false); } } } public PlayerControllerB getPlayer(Collider other) { GameObject gameObject = ((Component)other).gameObject; if ((Object)(object)gameObject == (Object)null) { return null; } PlayerControllerB component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { return component; } return null; } } public class CUSTOM_ClipboardItem : GrabbableObject { public bool truckManual; private bool parentedToTruck; public int currentPage = 1; public Animator clipboardAnimator; public AudioClip[] turnPageSFX; public AudioSource thisAudio; public override void Update() { ((GrabbableObject)this).Update(); if (!parentedToTruck && StartOfRound.Instance.inShipPhase) { parentedToTruck = true; } } public override void PocketItem() { if (((NetworkBehaviour)this).IsOwner && (Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.equippedUsableItemQE = false; base.isBeingUsed = false; } ((GrabbableObject)this).PocketItem(); } public override void ItemInteractLeftRight(bool right) { int num = currentPage; ((GrabbableObject)this).RequireCooldown(); if (right) { currentPage = Mathf.Clamp(currentPage + 1, 1, 4); } else { currentPage = Mathf.Clamp(currentPage - 1, 1, 4); } if (currentPage != num) { RoundManager.PlayRandomClip(thisAudio, turnPageSFX, true, 1f, 0, 1000); } clipboardAnimator.SetInteger("page", currentPage); } public override void DiscardItem() { if ((Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.equippedUsableItemQE = false; } base.isBeingUsed = false; ((GrabbableObject)this).DiscardItem(); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); base.playerHeldBy.equippedUsableItemQE = true; if (((NetworkBehaviour)this).IsOwner) { HUDManager.Instance.DisplayTip("To read the manual:", "Press Z to inspect closely. Press Q and E to flip the pages.", false, true, "LCTip_UseManual"); } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "CUSTOM_ClipboardItem"; } } public class InverseConditionalArea : MonoBehaviour { public GameObject[] hostObjects; public Light[] linkedLights; protected List playersInside; private void Start() { playersInside = new List(); } private void OnTriggerEnter(Collider other) { PlayerControllerB player = getPlayer(other); if (!((Object)(object)player != (Object)null)) { return; } for (int i = 0; i < hostObjects.Length; i++) { hostObjects[i].SetActive(true); if (!playersInside.Contains(player)) { playersInside.Add(player); } } if (playersInside.Count > 0) { for (int j = 0; j < hostObjects.Length; j++) { hostObjects[j].SetActive(false); } for (int k = 0; k < linkedLights.Length; k++) { ((Behaviour)linkedLights[k]).enabled = false; } } } private void OnTriggerExit(Collider other) { PlayerControllerB player = getPlayer(other); if (!((Object)(object)player != (Object)null)) { return; } if (playersInside.Contains(player)) { playersInside.Remove(player); } if (playersInside.Count == 0) { for (int i = 0; i < hostObjects.Length; i++) { hostObjects[i].SetActive(true); } for (int j = 0; j < linkedLights.Length; j++) { ((Behaviour)linkedLights[j]).enabled = true; } } } public PlayerControllerB getPlayer(Collider other) { GameObject gameObject = ((Component)other).gameObject; if ((Object)(object)gameObject == (Object)null) { return null; } PlayerControllerB component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null && ((NetworkBehaviour)component).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { return component; } return null; } } internal class JetPackFix { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_ActivateJetpack <>9__2_0; public static hook_CalculatePlanetTime <>9__2_1; internal void b__2_0(orig_ActivateJetpack orig, JetpackItem self) { orig.Invoke(self); Debug.Log((object)"LegendOfTheMoai: ActivateJetpack"); try { PlayerControllerB playerHeldBy = ((GrabbableObject)self).playerHeldBy; Debug.Log((object)playerHeldBy); if (Object.op_Implicit((Object)(object)playerHeldBy)) { Collider buggyCollider = getBuggyCollider(playerHeldBy); if (Object.op_Implicit((Object)(object)buggyCollider)) { buggyCollider.enabled = false; Debug.Log((object)buggyCollider); if (!playersAdjusted.Contains(playerHeldBy)) { playersAdjusted.Add(playerHeldBy); } } } GrabbableObject[] itemSlots = playerHeldBy.ItemSlots; GrabbableObject[] array = itemSlots; foreach (GrabbableObject val in array) { if (!((Object)(object)val != (Object)null)) { continue; } string text = ((Object)val).name.ToLower(); if (text.Contains("belt") && text.Contains("bag") && text.Contains("item")) { Transform val2 = ((Component)val).gameObject.transform.Find("InteractTrigger"); if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2).gameObject.SetActive(false); beltBags.Add(((Component)val2).gameObject); } } } } catch (Exception ex) { Debug.LogError((object)ex); } } internal float b__2_1(orig_CalculatePlanetTime orig, TimeOfDay self, SelectableLevel level) { try { if (playersAdjusted.Count > 0) { for (int i = 0; i < playersAdjusted.Count; i++) { PlayerControllerB val = playersAdjusted[i]; if (!val.jetpackControls && Object.op_Implicit((Object)(object)((Component)val).gameObject)) { Collider buggyCollider = getBuggyCollider(val); if (Object.op_Implicit((Object)(object)buggyCollider)) { buggyCollider.enabled = true; playersAdjusted.Remove(val); } } if (!Object.op_Implicit((Object)(object)val)) { playersAdjusted.RemoveAt(i); } } } if (beltBags.Count > 0) { for (int j = 0; j < beltBags.Count; j++) { GameObject val2 = beltBags[j]; if (!Object.op_Implicit((Object)(object)val2)) { beltBags.RemoveAt(j); } if (Object.op_Implicit((Object)(object)val2)) { Transform val3 = val2.gameObject.transform.Find("InteractTrigger"); if (Object.op_Implicit((Object)(object)val3)) { ((Component)val3).gameObject.SetActive(true); beltBags.Add(((Component)val3).gameObject); } } } } } catch (Exception ex) { Debug.LogError((object)ex); } return orig.Invoke(self, level); } } public static List playersAdjusted = new List(); public static List beltBags = new List(); public static void setupFix() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_003a: 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) //IL_0045: Expected O, but got Unknown object obj = <>c.<>9__2_0; if (obj == null) { hook_ActivateJetpack val = delegate(orig_ActivateJetpack orig, JetpackItem self) { orig.Invoke(self); Debug.Log((object)"LegendOfTheMoai: ActivateJetpack"); try { PlayerControllerB playerHeldBy = ((GrabbableObject)self).playerHeldBy; Debug.Log((object)playerHeldBy); if (Object.op_Implicit((Object)(object)playerHeldBy)) { Collider buggyCollider2 = getBuggyCollider(playerHeldBy); if (Object.op_Implicit((Object)(object)buggyCollider2)) { buggyCollider2.enabled = false; Debug.Log((object)buggyCollider2); if (!playersAdjusted.Contains(playerHeldBy)) { playersAdjusted.Add(playerHeldBy); } } } GrabbableObject[] itemSlots = playerHeldBy.ItemSlots; GrabbableObject[] array = itemSlots; foreach (GrabbableObject val6 in array) { if ((Object)(object)val6 != (Object)null) { string text = ((Object)val6).name.ToLower(); if (text.Contains("belt") && text.Contains("bag") && text.Contains("item")) { Transform val7 = ((Component)val6).gameObject.transform.Find("InteractTrigger"); if (Object.op_Implicit((Object)(object)val7)) { ((Component)val7).gameObject.SetActive(false); beltBags.Add(((Component)val7).gameObject); } } } } } catch (Exception ex2) { Debug.LogError((object)ex2); } }; <>c.<>9__2_0 = val; obj = (object)val; } JetpackItem.ActivateJetpack += (hook_ActivateJetpack)obj; object obj2 = <>c.<>9__2_1; if (obj2 == null) { hook_CalculatePlanetTime val2 = delegate(orig_CalculatePlanetTime orig, TimeOfDay self, SelectableLevel level) { try { if (playersAdjusted.Count > 0) { for (int i = 0; i < playersAdjusted.Count; i++) { PlayerControllerB val3 = playersAdjusted[i]; if (!val3.jetpackControls && Object.op_Implicit((Object)(object)((Component)val3).gameObject)) { Collider buggyCollider = getBuggyCollider(val3); if (Object.op_Implicit((Object)(object)buggyCollider)) { buggyCollider.enabled = true; playersAdjusted.Remove(val3); } } if (!Object.op_Implicit((Object)(object)val3)) { playersAdjusted.RemoveAt(i); } } } if (beltBags.Count > 0) { for (int j = 0; j < beltBags.Count; j++) { GameObject val4 = beltBags[j]; if (!Object.op_Implicit((Object)(object)val4)) { beltBags.RemoveAt(j); } if (Object.op_Implicit((Object)(object)val4)) { Transform val5 = val4.gameObject.transform.Find("InteractTrigger"); if (Object.op_Implicit((Object)(object)val5)) { ((Component)val5).gameObject.SetActive(true); beltBags.Add(((Component)val5).gameObject); } } } } } catch (Exception ex) { Debug.LogError((object)ex); } return orig.Invoke(self, level); }; <>c.<>9__2_1 = val2; obj2 = (object)val2; } TimeOfDay.CalculatePlanetTime += (hook_CalculatePlanetTime)obj2; } public static Collider getBuggyCollider(PlayerControllerB player) { if (!Object.op_Implicit((Object)(object)((Component)player).gameObject)) { return null; } Transform val = ((Component)player).gameObject.transform.Find("Misc"); if (Object.op_Implicit((Object)(object)val)) { Transform val2 = ((Component)val).transform.Find("Cube"); if (Object.op_Implicit((Object)(object)val2)) { return ((Component)val2).GetComponent(); } } return null; } } internal class StaticDebug : MonoBehaviour { } public static class WeatherRegistryCompatibility { public static void ForceClearWeather(SelectableLevel level) { Type type = Type.GetType("WeatherRegistry.WeatherManager, WeatherRegistry"); if (type == null) { Debug.LogWarning((object)"LegendOfTheMoai: WeatherManager type not found."); return; } object obj = type.GetField("CurrentWeathers", BindingFlags.Static | BindingFlags.Public)?.GetValue(null); if (obj == null) { Debug.LogWarning((object)"LegendOfTheMoai: CurrentWeathers instance not found."); return; } if (!(obj.GetType().GetProperty("Entries", BindingFlags.Instance | BindingFlags.Public)?.GetValue(obj) is IDictionary dictionary)) { Debug.LogWarning((object)"LegendOfTheMoai: Entries property not found or not a dictionary."); return; } if (dictionary.Contains(level)) { dictionary[level] = -1; } else { dictionary.Add(level, -1); } Debug.Log((object)"LegendOfTheMoai: Forced WeatherRegistry.CurrentWeathers entry to None."); StartOfRound.Instance.SetMapScreenInfoToCurrentLevel(); } } [HarmonyPatch(typeof(StartOfRound))] public static class WeatherRegScreenPath { [HarmonyPatch("SetMapScreenInfoToCurrentLevel")] [HarmonyPostfix] [HarmonyPriority(200)] internal static void GameMethodPatch(ref TextMeshProUGUI ___screenLevelDescription, ref SelectableLevel ___currentLevel, StartOfRound __instance) { Type type = Type.GetType("WeatherRegistry.WeatherManager, WeatherRegistry"); if (type != null && ___currentLevel.PlanetName.ToLower().Contains("easter") && ___currentLevel.PlanetName.ToLower().Contains("island")) { lazyOverride(___currentLevel); } } public static async void lazyOverride(SelectableLevel currentLevel) { await Task.Delay(500); if (EIWeatherManager.assignedWeather.ToLower().Contains("night")) { Debug.Log((object)"LegendOfTheMoai: Screen Display Override to NIGHTFALL (Weather Registry Compatibility)"); Regex multiNewLine = new Regex("\\n{2,}"); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("ORBITING: " + currentLevel.PlanetName + "\n"); stringBuilder.Append("WEATHER: NightFall \n"); stringBuilder.Append(multiNewLine.Replace(currentLevel.LevelDescription, "\n") ?? ""); ((TMP_Text)StartOfRound.Instance.screenLevelDescription).SetText(stringBuilder.ToString(), true); } if (EIWeatherManager.assignedWeather.ToLower().Contains("quantum")) { Debug.Log((object)"LegendOfTheMoai: Screen Display Override to QUANTUM STORM (Weather Registry Compatibility)"); Regex multiNewLine2 = new Regex("\\n{2,}"); StringBuilder stringBuilder2 = new StringBuilder(); stringBuilder2.Append("ORBITING: " + currentLevel.PlanetName + "\n"); stringBuilder2.Append("WEATHER: Quantum Storm \n"); stringBuilder2.Append(multiNewLine2.Replace(currentLevel.LevelDescription, "\n") ?? ""); ((TMP_Text)StartOfRound.Instance.screenLevelDescription).SetText(stringBuilder2.ToString(), true); } } } internal class Weight_Adjuster { private static int[] itemIds = new int[6] { 23529, 23526, 843982, 234618, 234699, 654021 }; private static float[] percents = new float[6] { 0.04f, 0.04f, 0.025f, 0.025f, 0.025f, 0.025f }; public static int totalRarity = 0; public static int newRarity = 0; public static List currentIds = new List(); public static float getItemRaritySum(SelectableLevel level) { List spawnableScrap = level.spawnableScrap; totalRarity = 0; for (int i = 0; i < spawnableScrap.Count; i++) { SpawnableItemWithRarity val = spawnableScrap[i]; Item spawnableItem = val.spawnableItem; if (!itemIds.Contains(spawnableItem.itemId)) { totalRarity += val.rarity; } } return totalRarity; } public static void adjustRarities(SelectableLevel level) { currentIds.Clear(); float itemRaritySum = getItemRaritySum(level); List spawnableScrap = level.spawnableScrap; for (int i = 0; i < spawnableScrap.Count; i++) { SpawnableItemWithRarity val = spawnableScrap[i]; Item spawnableItem = val.spawnableItem; if (itemIds.Contains(spawnableItem.itemId) && currentIds.Contains(spawnableItem.itemId)) { val.rarity = 0; } if (itemIds.Contains(spawnableItem.itemId) && !currentIds.Contains(spawnableItem.itemId)) { val.rarity = (int)(itemRaritySum * percents[Array.IndexOf(itemIds, spawnableItem.itemId)]); currentIds.Add(spawnableItem.itemId); } } } } } namespace EasterIsland.src.EasterIslandScripts.Technical.Dynamic_Loading { public class HeavenLoader { public static string sceneName = "none"; public static AssetBundle heavenBundle; public static Scene loadedScene; public static bool isSceneLoaded = false; public static void LoadHeavenAssets() { try { } catch (Exception ex) { Debug.LogError((object)("LegendOfTheMoai Heaven Loading Error: " + ex)); } } public static void LoadHeavenWorld() { try { if (isSceneLoaded) { return; } isSceneLoaded = true; if ((Object)(object)heavenBundle == (Object)null) { Debug.LogError((object)"Legend of The Moai ERROR: Could not load heaven asset bundle!"); isSceneLoaded = false; return; } sceneName = heavenBundle.GetAllScenePaths()[0]; AsyncOperation val = SceneManager.LoadSceneAsync(sceneName, (LoadSceneMode)1); val.completed += delegate { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) loadedScene = SceneManager.GetSceneByPath(sceneName); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { NetworkObject[] array = Object.FindObjectsOfType(); foreach (NetworkObject val2 in array) { if ((Object)(object)val2 != (Object)null && !val2.IsSpawned) { val2.Spawn(false); } } } Debug.Log((object)("Legend of The Moai: Heaven scene loaded: " + sceneName)); }; } catch (Exception ex) { Debug.LogError((object)ex); } } public static void UnloadHeavenWorld() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) try { if (((Scene)(ref loadedScene)).IsValid() && ((Scene)(ref loadedScene)).isLoaded) { SceneManager.UnloadSceneAsync(loadedScene).completed += delegate { isSceneLoaded = false; }; } else { isSceneLoaded = false; Debug.LogWarning((object)"Legend of The Moai: No valid heaven scene loaded to unload."); } } catch (Exception ex) { Debug.LogError((object)ex); } } } public class MatBundleCrossRef : MonoBehaviour { public enum AssetBundleSource { eastermoonlevel, easterheavennetobjs, easterislandheavenscene, eastermoonnetobjs } private MeshRenderer renderToPullInto; public string targetMaterialName; private static AssetBundle easterMoonLevelBundle; public AssetBundleSource targetBundle; private bool lazyMoonLevelPulling = false; public void Start() { renderToPullInto = ((Component)this).GetComponent(); switch (targetBundle) { case AssetBundleSource.eastermoonlevel: { if (!Object.op_Implicit((Object)(object)easterMoonLevelBundle)) { lazyPullEasterMoonLevelBundle(); break; } Material val3 = easterMoonLevelBundle.LoadAsset(targetMaterialName); if (Object.op_Implicit((Object)(object)val3)) { InjectMaterial(val3); } else { Debug.LogWarning((object)$"Material '{targetMaterialName}' not found in {targetBundle}."); } break; } case AssetBundleSource.easterislandheavenscene: if (Object.op_Implicit((Object)(object)HeavenLoader.heavenBundle)) { Material val4 = HeavenLoader.heavenBundle.LoadAsset(targetMaterialName); if (Object.op_Implicit((Object)(object)val4)) { InjectMaterial(val4); } else { Debug.LogWarning((object)$"Material '{targetMaterialName}' not found in {targetBundle}."); } } else { Debug.LogWarning((object)$"Material '{targetMaterialName}' not found in {targetBundle}."); } break; case AssetBundleSource.easterheavennetobjs: if (Object.op_Implicit((Object)(object)Plugin.heavenNetBundle)) { Material val2 = Plugin.heavenNetBundle.LoadAsset(targetMaterialName); if (Object.op_Implicit((Object)(object)val2)) { InjectMaterial(val2); } else { Debug.LogWarning((object)$"Material '{targetMaterialName}' not found in {targetBundle}."); } } else { Debug.LogWarning((object)$"Material '{targetMaterialName}' not found in {targetBundle}."); } break; case AssetBundleSource.eastermoonnetobjs: if (Object.op_Implicit((Object)(object)Plugin.easterislandBundle)) { Material val = Plugin.easterislandBundle.LoadAsset(targetMaterialName); if (Object.op_Implicit((Object)(object)val)) { InjectMaterial(val); } else { Debug.LogWarning((object)$"Material '{targetMaterialName}' not found in {targetBundle}."); } } else { Debug.LogWarning((object)$"Material '{targetMaterialName}' not found in {targetBundle}."); } break; } } public void InjectMaterial(Material newMat) { if (!((Object)(object)renderToPullInto == (Object)null) && !((Object)(object)newMat == (Object)null)) { ((Renderer)renderToPullInto).sharedMaterials = (Material[])(object)new Material[1] { newMat }; } } public async void lazyPullEasterMoonLevelBundle() { while (lazyMoonLevelPulling) { await Task.Delay(500); } if (Object.op_Implicit((Object)(object)easterMoonLevelBundle)) { Material mat2 = easterMoonLevelBundle.LoadAsset(targetMaterialName); if (Object.op_Implicit((Object)(object)mat2)) { InjectMaterial(mat2); } return; } lazyMoonLevelPulling = true; while (!Object.op_Implicit((Object)(object)easterMoonLevelBundle)) { foreach (AssetBundle bundle in AssetBundle.GetAllLoadedAssetBundles()) { if (!((Object)bundle).name.Contains("eastermoonlevel")) { continue; } Material mat = bundle.LoadAsset(targetMaterialName); try { if (Object.op_Implicit((Object)(object)mat)) { easterMoonLevelBundle = bundle; InjectMaterial(mat); } } catch (Exception) { continue; } break; } await Task.Delay(500); } lazyMoonLevelPulling = false; } } } namespace EasterIsland.src.EasterIslandScripts.Environmental { internal class CaveTeleporter2 : MonoBehaviour { public string dest; public AudioSource stage1; public AudioSource stage2; public AudioSource stage3; public AudioSource teleportSound; private float charge; private int cycle = 0; private bool charging = false; protected float teleportDist = 10f; public void Start() { } private void Update() { //IL_00bb: 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) if (charging) { charge += 25f * Time.deltaTime; } if ((Object)(object)stage1 == (Object)null || (Object)(object)stage2 == (Object)null || (Object)(object)stage3 == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } GameObject val = GameObject.Find(dest); soundLogic(charge); if (charge > 100f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { teleportPlayers(val.transform.position); } else { teleportPlayers(val.transform.position); } playSound(3); charge = 0f; } if (cycle < 20) { cycle++; return; } cycle = 0; charging = getNearestPlayers().Count > 0; } private void soundLogic(float c) { if (c < 25f && !stage1.isPlaying) { playSound(0); } else if (c < 50f && !stage2.isPlaying) { playSound(1); } else if (c < 75f && !stage3.isPlaying) { playSound(2); } } private void playSound(int id) { switch (id) { case 0: stage1.Play(); stage2.Stop(); stage3.Stop(); break; case 1: stage2.Play(); stage1.Stop(); stage3.Stop(); break; case 2: stage3.Play(); stage1.Stop(); stage2.Stop(); break; case 3: teleportSound.Play(); stage1.Stop(); stage2.Stop(); stage3.Stop(); break; } } private void teleportPlayers(Vector3 position) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) foreach (PlayerControllerB nearestPlayer in getNearestPlayers()) { ((Component)nearestPlayer).transform.position = position; } } private List getNearestPlayers() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; List list = new List(); PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (Vector3.Distance(((Component)val).transform.position, ((Component)this).transform.position) <= teleportDist) { list.Add(val); } } return list; } } internal class CaveItemInit : NetworkBehaviour { public NetworkObject netObj; public void Start() { netObj.Spawn(true); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "CaveItemInit"; } } internal class CaveTeleporter3 : NetworkBehaviour { public GameObject destination; public string rawDestination; public AudioSource stage1; public AudioSource stage2; public AudioSource stage3; public AudioSource teleportSound; public AudioSource destinationTeleportSound; private float charge; private bool charging = false; public List chargingPlayers; public float invincibilityPeriod; public float chargeRate; public string preTeleTitle; public string preTeleMsg; public void Start() { if (((NetworkBehaviour)RoundManager.Instance).IsHost && Object.op_Implicit((Object)(object)((Component)this).GetComponent()) && !((Component)this).GetComponent().IsSpawned) { ((Component)this).GetComponent().Spawn(true); } chargingPlayers = new List(); } public void OnTriggerEnter(Collider other) { if (isLocalPlayer(other) && ((preTeleMsg != null && preTeleMsg != "") || (preTeleTitle != null && preTeleTitle != ""))) { HUDManager.Instance.DisplayTip(preTeleTitle, preTeleMsg, false, false, "LC_Tip1"); } PlayerControllerB player = getPlayer(other); if ((Object)(object)player != (Object)null && !chargingPlayers.Contains(player)) { chargingPlayers.Add(player); } } public void OnTriggerExit(Collider other) { PlayerControllerB player = getPlayer(other); if ((Object)(object)player != (Object)null && chargingPlayers.Contains(player)) { chargingPlayers.Remove(player); } } public PlayerControllerB getPlayer(Collider other) { GameObject gameObject = ((Component)other).gameObject; if ((Object)(object)gameObject == (Object)null) { return null; } PlayerControllerB component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { return component; } return null; } private void Update() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } if (chargingPlayers.Count > 0) { charging = true; } else { charging = false; } if (charging) { charge += chargeRate * Time.deltaTime; } soundLogic(charge); Vector3 zero = Vector3.zero; zero = ((rawDestination == null || !(rawDestination != "")) ? destination.transform.position : GameObject.Find(rawDestination).transform.position); if (charge > 100f) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { teleportPlayersClientRpc(zero); } else { teleportPlayersServerRpc(zero); } playSoundClientRpc(3); charge = 0f; } } public bool isLocalPlayer(Collider other) { GameObject gameObject = ((Component)other).gameObject; if ((Object)(object)gameObject == (Object)null) { return false; } PlayerControllerB component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { ulong networkObjectId = ((NetworkBehaviour)component).NetworkObject.NetworkObjectId; ulong networkObjectId2 = ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId; if (networkObjectId == networkObjectId2) { return true; } } return false; } private void soundLogic(float c) { if (c < 25f && !stage1.isPlaying) { playSoundClientRpc(0); } else if (c < 50f && !stage2.isPlaying) { playSoundClientRpc(1); } else if (c < 75f && !stage3.isPlaying) { playSoundClientRpc(2); } } [ClientRpc] private void playSoundClientRpc(int id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2989797936u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, id); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2989797936u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; switch (id) { case 0: stage1.Play(); stage2.Stop(); stage3.Stop(); break; case 1: stage2.Play(); stage1.Stop(); stage3.Stop(); break; case 2: stage3.Play(); stage1.Stop(); stage2.Stop(); break; case 3: if ((Object)(object)teleportSound != (Object)null) { teleportSound.Play(); } if ((Object)(object)destinationTeleportSound != (Object)null) { destinationTeleportSound.Play(); } stage1.Stop(); stage2.Stop(); stage3.Stop(); break; } } [ClientRpc] private void teleportPlayersClientRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1023984681u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1023984681u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (PlayerControllerB chargingPlayer in chargingPlayers) { ((Component)chargingPlayer).transform.position = position; if (invincibilityPeriod > 0f) { tempHealth(chargingPlayer); } } } private async void tempHealth(PlayerControllerB player) { int tempHealth = player.health; player.health = 1000; await Task.Delay((int)(1000f * invincibilityPeriod)); player.health = tempHealth; } [ServerRpc] private void teleportPlayersServerRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_011b: 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_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)base.__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(1609200844u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1609200844u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; teleportPlayersClientRpc(position); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2989797936u, new RpcReceiveHandler(__rpc_handler_2989797936), "playSoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(1023984681u, new RpcReceiveHandler(__rpc_handler_1023984681), "teleportPlayersClientRpc"); ((NetworkBehaviour)this).__registerRpc(1609200844u, new RpcReceiveHandler(__rpc_handler_1609200844), "teleportPlayersServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2989797936(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 id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((CaveTeleporter3)(object)target).playSoundClientRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1023984681(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((CaveTeleporter3)(object)target).teleportPlayersClientRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1609200844(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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_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 { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((CaveTeleporter3)(object)target).teleportPlayersServerRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CaveTeleporter3"; } } internal class CaveTeleporter : NetworkBehaviour { public GameObject destination; public JudgementScript judge; public AudioSource stage1; public AudioSource stage2; public AudioSource stage3; public AudioSource teleportSound; public AudioSource destinationTeleportSound; private float charge; private int cycle = 0; private bool charging = false; public void Start() { if (!((Component)this).GetComponent().IsSpawned) { ((Component)this).GetComponent().Spawn(true); } } private void Update() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) if (charging) { charge += 700f * Time.deltaTime; } soundLogic(charge); if (charge > 100f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { teleportPlayersClientRpc(destination.transform.position); } else { teleportPlayersServerRpc(destination.transform.position); } playSoundClientRpc(3); charge = 0f; } if (cycle < 20) { cycle++; return; } cycle = 0; charging = getNearestPlayers(15f).Count > 0; } private void soundLogic(float c) { if (c < 25f && !stage1.isPlaying) { playSoundClientRpc(0); } else if (c < 50f && !stage2.isPlaying) { playSoundClientRpc(1); } else if (c < 75f && !stage3.isPlaying) { playSoundClientRpc(2); } } [ClientRpc] private void playSoundClientRpc(int id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2006927597u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, id); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2006927597u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; switch (id) { case 0: stage1.Play(); stage2.Stop(); stage3.Stop(); break; case 1: stage2.Play(); stage1.Stop(); stage3.Stop(); break; case 2: stage3.Play(); stage1.Stop(); stage2.Stop(); break; case 3: teleportSound.Play(); destinationTeleportSound.Play(); stage1.Stop(); stage2.Stop(); stage3.Stop(); break; } } } [ClientRpc] private void teleportPlayersClientRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1978419117u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1978419117u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (PlayerControllerB nearestPlayer in getNearestPlayers(40f)) { ((Component)nearestPlayer).transform.position = position; judge.beginCutscene(); } } [ServerRpc] private void teleportPlayersServerRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_011b: 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_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)base.__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(2732153691u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2732153691u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; teleportPlayersClientRpc(position); } } private List getNearestPlayers(float dist) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; List list = new List(); PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (Vector3.Distance(((Component)val).transform.position, ((Component)this).transform.position) <= dist) { list.Add(val); } } return list; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2006927597u, new RpcReceiveHandler(__rpc_handler_2006927597), "playSoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(1978419117u, new RpcReceiveHandler(__rpc_handler_1978419117), "teleportPlayersClientRpc"); ((NetworkBehaviour)this).__registerRpc(2732153691u, new RpcReceiveHandler(__rpc_handler_2732153691), "teleportPlayersServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2006927597(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 id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((CaveTeleporter)(object)target).playSoundClientRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1978419117(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((CaveTeleporter)(object)target).teleportPlayersClientRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2732153691(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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_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 { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((CaveTeleporter)(object)target).teleportPlayersServerRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CaveTeleporter"; } } internal class JudgementScript : NetworkBehaviour { public Transform platformOriginPoint; public Transform destination; public bool hasGeneratedCave = false; public GameObject goodEyes; public GameObject badEyes; public GameObject whiteEyes; public Animator judgeAnimator; public NetworkObject netObjSelf; private bool isWorthy = false; private bool isJudging = false; private bool judged = false; protected bool inCutscene = false; public AudioSource abstractMusic; public void Start() { if (!netObjSelf.IsSpawned && ((NetworkBehaviour)RoundManager.Instance).IsHost) { netObjSelf.Spawn(false); } } public void Update() { if (judged) { if (isWorthy && !goodEyes.activeInHierarchy) { goodEyes.SetActive(true); badEyes.SetActive(false); whiteEyes.SetActive(false); } else if (!badEyes.activeInHierarchy) { badEyes.SetActive(true); goodEyes.SetActive(false); whiteEyes.SetActive(false); } } if (isJudging) { goodEyes.SetActive(false); goodEyes.SetActive(false); whiteEyes.SetActive(true); } } public async void beginCutscene() { if (inCutscene) { return; } if (!hasGeneratedCave && ((NetworkBehaviour)RoundManager.Instance).IsHost) { GameObject caveGO = GameObject.Find("EI_CaveGenerator"); CaveGenerator caveGen = caveGO.GetComponent(); caveGen.generateCave(caveGO.transform.position); hasGeneratedCave = true; } else { hasGeneratedCave = true; } inCutscene = true; updateSquadWorthiness(); abstractMusic.Play(); judgeAnimator.Play("Idle"); await Task.Delay(15000); isJudging = true; judgeAnimator.Play("Look"); await Task.Delay(7000); updateSquadWorthiness(); isJudging = false; judged = true; await Task.Delay(8000); if (isWorthy) { GameObject startingCaveGO = GameObject.Find("StartingCaveTeleportLocation"); if (Object.op_Implicit((Object)(object)startingCaveGO)) { ((Component)destination).transform.position = startingCaveGO.transform.position; } teleportPlayersClientRpc(destination.position); } else { Landmine.SpawnExplosion(platformOriginPoint.position, true, 50f, 50f, 100, 150f, (GameObject)null, true); } judgeAnimator.Play("Idle"); inCutscene = false; isJudging = false; judged = false; } public void updateSquadWorthiness() { //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: 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_020a: Unknown result type (might be due to invalid IL or missing references) bool flag = false; bool flag2 = false; List nearestPlayers = getNearestPlayers(); foreach (PlayerControllerB item in nearestPlayers) { Plugin.Logger.LogMessage((object)("Checking if " + ((Object)item).name + " is worthy...")); GrabbableObject[] itemSlots = item.ItemSlots; GrabbableObject[] array = itemSlots; foreach (GrabbableObject val in array) { Plugin.Logger.LogMessage((object)val); if (!((Object)(object)val != (Object)null) || !((Object)(object)val.itemProperties != (Object)null) || val.itemProperties.itemName == null) { continue; } string text = val.itemProperties.itemName.ToLower(); Plugin.Logger.LogMessage((object)(":: " + text)); if (text.Contains("gold") && text.Contains("head")) { Plugin.Logger.LogMessage((object)"Has Gold Head. Checking if Quantum."); if ((Object)(object)((Component)val).gameObject.transform.Find("QuantumItem(Clone)") != (Object)null) { flag = true; } } } } GoldenHeadScript[] array2 = Object.FindObjectsOfType(); GoldenHeadScript[] array3 = array2; foreach (GoldenHeadScript goldenHeadScript in array3) { if ((Object)(object)((Component)goldenHeadScript).gameObject.transform.Find("QuantumItem(Clone)") != (Object)null && Vector3.Distance(((Component)goldenHeadScript).gameObject.transform.position, ((Component)this).transform.position) <= 70f) { flag = true; } } TechRadarItem[] array4 = Object.FindObjectsOfType(); TechRadarItem[] array5 = array4; foreach (TechRadarItem techRadarItem in array5) { if (Vector3.Distance(((Component)techRadarItem).gameObject.transform.position, ((Component)this).transform.position) <= 70f) { flag2 = true; } } if (flag2 && flag) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { setWorthyClientRpc(); } else { setWorthyServerRpc(); } } } [ClientRpc] public void setWorthyClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1240708236u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1240708236u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; isWorthy = true; } } } [ServerRpc(RequireOwnership = false)] public void setWorthyServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2683837954u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2683837954u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; setWorthyClientRpc(); } } } [ClientRpc] private void teleportPlayersClientRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(186851126u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 186851126u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (PlayerControllerB nearestPlayer in getNearestPlayers()) { ((Component)nearestPlayer).transform.position = position; } } [ServerRpc] private void teleportPlayersServerRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_011b: 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_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)base.__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(1565700795u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1565700795u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; teleportPlayersClientRpc(position); } } private List getNearestPlayers() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; List list = new List(); PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (Vector3.Distance(((Component)val).transform.position, ((Component)this).transform.position) <= 70f) { list.Add(val); } } return list; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1240708236u, new RpcReceiveHandler(__rpc_handler_1240708236), "setWorthyClientRpc"); ((NetworkBehaviour)this).__registerRpc(2683837954u, new RpcReceiveHandler(__rpc_handler_2683837954), "setWorthyServerRpc"); ((NetworkBehaviour)this).__registerRpc(186851126u, new RpcReceiveHandler(__rpc_handler_186851126), "teleportPlayersClientRpc"); ((NetworkBehaviour)this).__registerRpc(1565700795u, new RpcReceiveHandler(__rpc_handler_1565700795), "teleportPlayersServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1240708236(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; ((JudgementScript)(object)target).setWorthyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2683837954(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; ((JudgementScript)(object)target).setWorthyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_186851126(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((JudgementScript)(object)target).teleportPlayersClientRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1565700795(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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_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 { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((JudgementScript)(object)target).teleportPlayersServerRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "JudgementScript"; } } } namespace EasterIsland.src.EasterIslandScripts.Cave_Easter_Egg { public class ArtifactPedestal : NetworkBehaviour { private bool activated = false; public GameObject artifactPlaceholder; public void Start() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { artifactPlaceholder.SetActive(false); } } public void interact(PlayerControllerB ply) { if (yoinkItem(ply)) { Debug.Log((object)"Inserting Artifact Into Pedestal"); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { setActivatedClientRpc(); } else { setActivatedServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void setActivatedServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3475159998u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3475159998u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; setActivatedClientRpc(); } } } [ClientRpc] public void setActivatedClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3666093159u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3666093159u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; activated = true; artifactPlaceholder.SetActive(true); } } } public bool yoinkItem(PlayerControllerB player) { GrabbableObject[] itemSlots = player.ItemSlots; GrabbableObject val = null; GrabbableObject[] array = itemSlots; foreach (GrabbableObject val2 in array) { if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)((Component)val2).gameObject) && (((Object)((Component)val2).gameObject).name.ToLower().Contains("techradar") || ((Object)val2).name.ToLower().Contains("techradar"))) { if (!Object.op_Implicit((Object)(object)val)) { val = val2; } else if (!val2.isPocketed) { val = val2; } } } if (Object.op_Implicit((Object)(object)val)) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { takeItemClientRpc(((NetworkBehaviour)player).NetworkObjectId, ((NetworkBehaviour)val).NetworkObjectId); } else { takeItemServerRpc(((NetworkBehaviour)player).NetworkObjectId, ((NetworkBehaviour)val).NetworkObjectId); } return true; } return false; } [ServerRpc(RequireOwnership = false)] public void takeItemServerRpc(ulong playerid, ulong itemid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2127222723u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); BytePacker.WriteValueBitPacked(val2, itemid); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2127222723u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; takeItemClientRpc(playerid, itemid); } } } [ClientRpc] public void takeItemClientRpc(ulong playerid, ulong itemid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1047766773u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); BytePacker.WriteValueBitPacked(val2, itemid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1047766773u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB player = getPlayer(playerid); if (!Object.op_Implicit((Object)(object)player)) { Debug.LogError((object)"Radar Pedestal: Could not find target player for item removal! Cancelling item removal."); return; } GrabbableObject[] itemSlots = player.ItemSlots; for (int i = 0; i < itemSlots.Length; i++) { GrabbableObject val3 = itemSlots[i]; if (Object.op_Implicit((Object)(object)val3) && Object.op_Implicit((Object)(object)((Component)val3).gameObject) && ((NetworkBehaviour)val3).NetworkObjectId == itemid) { if (!val3.isPocketed) { Debug.Log((object)"Radar Pedestal: Despawned Held Object (Radar)"); player.DespawnHeldObject(); } else { Debug.Log((object)"Radar Pedestal: Despawned Object in Slot (Radar)"); player.DestroyItemInSlotAndSync(i); ((Behaviour)HUDManager.Instance.itemSlotIcons[i]).enabled = false; } return; } } Debug.LogError((object)"Radar Pedestal: Could not find target item for removal (player was found)! Cancelling item removal."); } public PlayerControllerB getPlayer(ulong playerid) { PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB result = null; foreach (PlayerControllerB val in allPlayerScripts) { if (((NetworkBehaviour)val).NetworkObjectId == playerid) { result = val; } } return result; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3475159998u, new RpcReceiveHandler(__rpc_handler_3475159998), "setActivatedServerRpc"); ((NetworkBehaviour)this).__registerRpc(3666093159u, new RpcReceiveHandler(__rpc_handler_3666093159), "setActivatedClientRpc"); ((NetworkBehaviour)this).__registerRpc(2127222723u, new RpcReceiveHandler(__rpc_handler_2127222723), "takeItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(1047766773u, new RpcReceiveHandler(__rpc_handler_1047766773), "takeItemClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3475159998(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; ((ArtifactPedestal)(object)target).setActivatedServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3666093159(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; ((ArtifactPedestal)(object)target).setActivatedClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2127222723(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); ulong itemid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref itemid); target.__rpc_exec_stage = (__RpcExecStage)1; ((ArtifactPedestal)(object)target).takeItemServerRpc(playerid, itemid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1047766773(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); ulong itemid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref itemid); target.__rpc_exec_stage = (__RpcExecStage)1; ((ArtifactPedestal)(object)target).takeItemClientRpc(playerid, itemid); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ArtifactPedestal"; } } public class CannonConstructor : NetworkBehaviour { private int itemIDMatch = 34873823; public Transform quantumCannonSpawnPoint; public NetworkObject netObjSelf; public GameObject goldRef; public GameObject artifactRef; public GameObject phase0; public GameObject phase1; public GameObject phase2; public GameObject phase3; public GameObject burst; public GameObject cut; public GameObject explosion; private float tUpdate = 0f; protected bool inCutscene = false; public void Start() { Debug.Log((object)"CAVE INIT"); if (((NetworkBehaviour)RoundManager.Instance).IsHost && !netObjSelf.IsSpawned) { Debug.Log((object)"IsServer=>spawning object for client"); netObjSelf.Spawn(false); } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { setPhase0ClientRpc(active: false); setPhase1ClientRpc(active: false); setPhase2ClientRpc(active: false); setPhase3ClientRpc(active: false); setBurstClientRpc(active: false); setExplosionClientRpc(active: false); setCutClientRpc(active: false); } } public void Update() { if (!inCutscene && Time.time > tUpdate + 3f) { setPhase0ClientRpc(active: false); setPhase1ClientRpc(active: false); setPhase2ClientRpc(active: false); setPhase3ClientRpc(active: false); setBurstClientRpc(active: false); setExplosionClientRpc(active: false); setCutClientRpc(active: false); tUpdate = Time.time; } } public void startCutscene() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if (goldRef.activeInHierarchy && artifactRef.activeInHierarchy) { beginCutscene(); } } else { startCutsceneServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void startCutsceneServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1061314056u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1061314056u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (goldRef.activeInHierarchy && artifactRef.activeInHierarchy) { beginCutscene(); } } } [ClientRpc] public void setCutsceneClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4057905845u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4057905845u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; inCutscene = value; } } } public async void beginCutscene() { if (!inCutscene) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { setCutsceneClientRpc(value: true); } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { await Task.Delay(1000); setPhase0ClientRpc(active: true); await Task.Delay(4000); setPhase1ClientRpc(active: true); await Task.Delay(1000); setPhase2ClientRpc(active: true); await Task.Delay(1000); setPhase3ClientRpc(active: true); await Task.Delay(1000); setBurstClientRpc(active: true); await Task.Delay(3700); setBurstClientRpc(active: false); setPhase0ClientRpc(active: false); setCutClientRpc(active: true); setGoldRefClientRpc(active: false); setArtifactRefClientRpc(active: false); await Task.Delay(550); setExplosionClientRpc(active: true); GameObject projectile = Object.Instantiate(Plugin.PlasmaCannonPrefab, quantumCannonSpawnPoint.position, Plugin.PlasmaCannonPrefab.transform.rotation); projectile.SetActive(true); projectile.GetComponent().Spawn(false); await Task.Delay(1000); setPhase3ClientRpc(active: false); await Task.Delay(1000); setPhase2ClientRpc(active: false); await Task.Delay(1000); setPhase1ClientRpc(active: false); await Task.Delay(4000); setExplosionClientRpc(active: false); setCutClientRpc(active: false); } } } [ClientRpc] public void setArtifactRefClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(436598943u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 436598943u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; artifactRef.SetActive(active); } } } [ClientRpc] public void setGoldRefClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3942631924u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3942631924u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; goldRef.SetActive(active); } } } [ClientRpc] public void setPhase0ClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(985842046u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 985842046u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; phase0.SetActive(active); } } } [ClientRpc] public void setPhase1ClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2063089838u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2063089838u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; phase1.SetActive(active); } } } [ClientRpc] public void setPhase2ClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1206775222u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1206775222u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; phase2.SetActive(active); } } } [ClientRpc] public void setPhase3ClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(88159844u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 88159844u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; phase3.SetActive(active); } } } [ClientRpc] public void setBurstClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4231261486u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4231261486u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; burst.SetActive(active); } } } [ClientRpc] public void setCutClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1855576057u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1855576057u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; cut.SetActive(active); } } } [ClientRpc] public void setExplosionClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3995479860u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3995479860u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; explosion.SetActive(active); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1061314056u, new RpcReceiveHandler(__rpc_handler_1061314056), "startCutsceneServerRpc"); ((NetworkBehaviour)this).__registerRpc(4057905845u, new RpcReceiveHandler(__rpc_handler_4057905845), "setCutsceneClientRpc"); ((NetworkBehaviour)this).__registerRpc(436598943u, new RpcReceiveHandler(__rpc_handler_436598943), "setArtifactRefClientRpc"); ((NetworkBehaviour)this).__registerRpc(3942631924u, new RpcReceiveHandler(__rpc_handler_3942631924), "setGoldRefClientRpc"); ((NetworkBehaviour)this).__registerRpc(985842046u, new RpcReceiveHandler(__rpc_handler_985842046), "setPhase0ClientRpc"); ((NetworkBehaviour)this).__registerRpc(2063089838u, new RpcReceiveHandler(__rpc_handler_2063089838), "setPhase1ClientRpc"); ((NetworkBehaviour)this).__registerRpc(1206775222u, new RpcReceiveHandler(__rpc_handler_1206775222), "setPhase2ClientRpc"); ((NetworkBehaviour)this).__registerRpc(88159844u, new RpcReceiveHandler(__rpc_handler_88159844), "setPhase3ClientRpc"); ((NetworkBehaviour)this).__registerRpc(4231261486u, new RpcReceiveHandler(__rpc_handler_4231261486), "setBurstClientRpc"); ((NetworkBehaviour)this).__registerRpc(1855576057u, new RpcReceiveHandler(__rpc_handler_1855576057), "setCutClientRpc"); ((NetworkBehaviour)this).__registerRpc(3995479860u, new RpcReceiveHandler(__rpc_handler_3995479860), "setExplosionClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1061314056(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; ((CannonConstructor)(object)target).startCutsceneServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4057905845(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 cutsceneClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref cutsceneClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CannonConstructor)(object)target).setCutsceneClientRpc(cutsceneClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_436598943(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 artifactRefClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref artifactRefClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CannonConstructor)(object)target).setArtifactRefClientRpc(artifactRefClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3942631924(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 goldRefClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref goldRefClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CannonConstructor)(object)target).setGoldRefClientRpc(goldRefClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_985842046(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 phase0ClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref phase0ClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CannonConstructor)(object)target).setPhase0ClientRpc(phase0ClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2063089838(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 phase1ClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref phase1ClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CannonConstructor)(object)target).setPhase1ClientRpc(phase1ClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1206775222(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 phase2ClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref phase2ClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CannonConstructor)(object)target).setPhase2ClientRpc(phase2ClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_88159844(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 phase3ClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref phase3ClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CannonConstructor)(object)target).setPhase3ClientRpc(phase3ClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4231261486(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 burstClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref burstClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CannonConstructor)(object)target).setBurstClientRpc(burstClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1855576057(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 cutClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref cutClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CannonConstructor)(object)target).setCutClientRpc(cutClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3995479860(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 explosionClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref explosionClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CannonConstructor)(object)target).setExplosionClientRpc(explosionClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CannonConstructor"; } } public class CaveEnvironment : MonoBehaviour { public Light maindirectionalLight; public Light sunLight; public Light moonLight; public Light eclipsedLight; private Collider triggerZone; private bool playerWasInside = false; private PlayerControllerB localPlayer; private void Start() { triggerZone = ((Component)this).GetComponent(); if ((Object)(object)triggerZone == (Object)null || !triggerZone.isTrigger) { Debug.LogError((object)"CaveEnvironment: This script requires a trigger collider on the same GameObject."); ((Behaviour)this).enabled = false; return; } localPlayer = StartOfRound.Instance?.localPlayerController; if ((Object)(object)localPlayer == (Object)null) { Debug.LogWarning((object)"CaveEnvironment: Local player not found at Start."); } ((MonoBehaviour)this).StartCoroutine(CheckPlayerBounds()); } private IEnumerator CheckPlayerBounds() { while (true) { if ((Object)(object)localPlayer != (Object)null) { Bounds bounds = triggerZone.bounds; bool isInside = ((Bounds)(ref bounds)).Contains(((Component)localPlayer).transform.position); if (isInside && !playerWasInside) { playerWasInside = true; HandleEnter(); } else if (!isInside && playerWasInside) { playerWasInside = false; HandleExit(); } } else { localPlayer = StartOfRound.Instance?.localPlayerController; } yield return (object)new WaitForSeconds(0.1f); } } private void HandleEnter() { ((Behaviour)maindirectionalLight).enabled = false; ((Behaviour)sunLight).enabled = false; ((Behaviour)moonLight).enabled = false; if (Object.op_Implicit((Object)(object)eclipsedLight)) { ((Behaviour)eclipsedLight).enabled = false; } Debug.Log((object)"Player entered the cave. Lights disabled."); } private void HandleExit() { ((Behaviour)maindirectionalLight).enabled = true; ((Behaviour)sunLight).enabled = true; ((Behaviour)moonLight).enabled = true; if (Object.op_Implicit((Object)(object)eclipsedLight)) { ((Behaviour)eclipsedLight).enabled = true; } Debug.Log((object)"Player exited the cave. Lights enabled."); } } internal class ElementalLabSpawnTest : MonoBehaviour { public GameObject prefab; public void Start() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) Object.Instantiate(prefab, ((Component)this).transform.position, ((Component)this).transform.rotation); } } public class GoldMoaiPedestal : NetworkBehaviour { private bool activated = false; public GameObject goldMoaiPlaceholder; public void Start() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { goldMoaiPlaceholder.SetActive(false); } } public void interact(PlayerControllerB ply) { if (yoinkItem(ply)) { Debug.Log((object)"Inserting Gold Moai Into Pedestal"); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { setActivatedClientRpc(); } else { setActivedServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void setActivedServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2586186097u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2586186097u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; setActivatedClientRpc(); } } } [ClientRpc] public void setActivatedClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1461011165u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1461011165u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; activated = true; goldMoaiPlaceholder.SetActive(true); } } } public bool yoinkItem(PlayerControllerB player) { GrabbableObject[] itemSlots = player.ItemSlots; GrabbableObject val = null; GrabbableObject[] array = itemSlots; foreach (GrabbableObject val2 in array) { if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)((Component)val2).gameObject) && (((Object)((Component)val2).gameObject).name.ToLower().Contains("golden") || ((Object)val2).name.ToLower().Contains("golden")) && (Object)(object)((Component)val2).gameObject.transform.Find("QuantumItem(Clone)") != (Object)null) { if (!Object.op_Implicit((Object)(object)val)) { val = val2; } else if (!val2.isPocketed) { val = val2; } } } if (Object.op_Implicit((Object)(object)val)) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { takeItemClientRpc(((NetworkBehaviour)player).NetworkObjectId, ((NetworkBehaviour)val).NetworkObjectId); } else { takeItemServerRpc(((NetworkBehaviour)player).NetworkObjectId, ((NetworkBehaviour)val).NetworkObjectId); } return true; } return false; } [ServerRpc(RequireOwnership = false)] public void takeItemServerRpc(ulong playerid, ulong itemid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(392829348u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); BytePacker.WriteValueBitPacked(val2, itemid); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 392829348u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; takeItemClientRpc(playerid, itemid); } } } [ClientRpc] public void takeItemClientRpc(ulong playerid, ulong itemid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(177618683u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); BytePacker.WriteValueBitPacked(val2, itemid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 177618683u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB player = getPlayer(playerid); if (!Object.op_Implicit((Object)(object)player)) { Debug.LogError((object)"Gold Pedestal: Could not find target player for item removal! Cancelling item removal."); return; } GrabbableObject[] itemSlots = player.ItemSlots; for (int i = 0; i < itemSlots.Length; i++) { GrabbableObject val3 = itemSlots[i]; if (Object.op_Implicit((Object)(object)val3) && Object.op_Implicit((Object)(object)((Component)val3).gameObject) && ((NetworkBehaviour)val3).NetworkObjectId == itemid) { if (!val3.isPocketed) { Debug.Log((object)"Gold Pedestal: Despawned Held Object (Gold Moai)"); player.DespawnHeldObject(); } else { Debug.Log((object)"Gold Pedestal: Despawned Object in Slot (Gold Moai)"); player.DestroyItemInSlotAndSync(i); ((Behaviour)HUDManager.Instance.itemSlotIcons[i]).enabled = false; } return; } } Debug.LogError((object)"Gold Pedestal: Could not find target item for removal (player was found)! Cancelling item removal."); } public PlayerControllerB getPlayer(ulong playerid) { PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB result = null; foreach (PlayerControllerB val in allPlayerScripts) { if (((NetworkBehaviour)val).NetworkObjectId == playerid) { result = val; } } return result; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2586186097u, new RpcReceiveHandler(__rpc_handler_2586186097), "setActivedServerRpc"); ((NetworkBehaviour)this).__registerRpc(1461011165u, new RpcReceiveHandler(__rpc_handler_1461011165), "setActivatedClientRpc"); ((NetworkBehaviour)this).__registerRpc(392829348u, new RpcReceiveHandler(__rpc_handler_392829348), "takeItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(177618683u, new RpcReceiveHandler(__rpc_handler_177618683), "takeItemClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2586186097(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; ((GoldMoaiPedestal)(object)target).setActivedServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1461011165(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; ((GoldMoaiPedestal)(object)target).setActivatedClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_392829348(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); ulong itemid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref itemid); target.__rpc_exec_stage = (__RpcExecStage)1; ((GoldMoaiPedestal)(object)target).takeItemServerRpc(playerid, itemid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_177618683(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); ulong itemid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref itemid); target.__rpc_exec_stage = (__RpcExecStage)1; ((GoldMoaiPedestal)(object)target).takeItemClientRpc(playerid, itemid); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "GoldMoaiPedestal"; } } public class LavaTrigger : MonoBehaviour { private void OnTriggerEnter(Collider other) { //IL_002b: 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_003c: Unknown result type (might be due to invalid IL or missing references) if (isPlayer(other)) { GameObject gameObject = ((Component)other).gameObject; PlayerControllerB component = gameObject.GetComponent(); component.KillPlayer(new Vector3(0f, 20f, 0f), true, (CauseOfDeath)13, 0, default(Vector3), false); Debug.Log((object)"Player entered the cave. Light disabled."); } } public bool isPlayer(Collider other) { GameObject gameObject = ((Component)other).gameObject; if ((Object)(object)gameObject == (Object)null) { return false; } PlayerControllerB component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { return true; } return false; } } public class LeverFlickAnim : NetworkBehaviour { public GameObject goldRef; public GameObject artifactRef; public float animationDuration = 0.4f; public float targetXRotation = 90f; private Quaternion initialRotation; private float elapsedTime = 0f; private bool isAnimating = false; public void CreateAndPlayAnimation() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { animClientRpc(); } else { animServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void animServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3992499149u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3992499149u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animClientRpc(); } } } [ClientRpc] public void animClientRpc() { //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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3650974629u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3650974629u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (goldRef.activeInHierarchy && artifactRef.activeInHierarchy) { initialRotation = ((Component)this).transform.localRotation; elapsedTime = 0f; isAnimating = true; } } } private void Update() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_0084: Unknown result type (might be due to invalid IL or missing references) if (isAnimating) { elapsedTime += Time.deltaTime; float num = Mathf.Clamp01(elapsedTime / animationDuration); float num2 = Mathf.Lerp(((Quaternion)(ref initialRotation)).eulerAngles.x, targetXRotation, num); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(num2, ((Quaternion)(ref initialRotation)).eulerAngles.y, ((Quaternion)(ref initialRotation)).eulerAngles.z); ((Component)this).transform.localRotation = Quaternion.Euler(val); if (num >= 1f) { isAnimating = false; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3992499149u, new RpcReceiveHandler(__rpc_handler_3992499149), "animServerRpc"); ((NetworkBehaviour)this).__registerRpc(3650974629u, new RpcReceiveHandler(__rpc_handler_3650974629), "animClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3992499149(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; ((LeverFlickAnim)(object)target).animServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3650974629(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; ((LeverFlickAnim)(object)target).animClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "LeverFlickAnim"; } } public class LeverFlickAnim2 : NetworkBehaviour { public float animationDuration = 0.4f; public float targetXRotation = 90f; private Quaternion initialRotation; private float elapsedTime = 0f; private bool isAnimating = false; public AudioSource flickSound; public AudioSource powerUpAttempt; public AudioSource powerDown; public void CreateAndPlayAnimation() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { animClientRpc(); } else { animServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void animServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(469676703u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 469676703u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animClientRpc(); } } } [ClientRpc] public void animClientRpc() { //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_00ce: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1136076771u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1136076771u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; initialRotation = ((Component)this).transform.localRotation; elapsedTime = 0f; isAnimating = true; labFlick(); } } } public async void labFlick() { flickSound.Play(); await Task.Delay(3000); powerUpAttempt.Play(); HUDManager.Instance.DisplayTip("Processing...", "Attempting to restart generator VOLC-2000K", false, false, "LC_Tip1"); await Task.Delay(8000); powerDown.Play(); await Task.Delay(2000); HUDManager.Instance.DisplayTip("ERROR", "Generator Restart Failure. Lab Condition: IRREPARABLE. Please follow protocol 42 elsewhere for quantum entanglement.", true, false, "LC_Tip1"); } private void Update() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_0084: Unknown result type (might be due to invalid IL or missing references) if (isAnimating) { elapsedTime += Time.deltaTime; float num = Mathf.Clamp01(elapsedTime / animationDuration); float num2 = Mathf.Lerp(((Quaternion)(ref initialRotation)).eulerAngles.x, targetXRotation, num); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(num2, ((Quaternion)(ref initialRotation)).eulerAngles.y, ((Quaternion)(ref initialRotation)).eulerAngles.z); ((Component)this).transform.localRotation = Quaternion.Euler(val); if (num >= 1f) { isAnimating = false; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(469676703u, new RpcReceiveHandler(__rpc_handler_469676703), "animServerRpc"); ((NetworkBehaviour)this).__registerRpc(1136076771u, new RpcReceiveHandler(__rpc_handler_1136076771), "animClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_469676703(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; ((LeverFlickAnim2)(object)target).animServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1136076771(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; ((LeverFlickAnim2)(object)target).animClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "LeverFlickAnim2"; } } internal class LabSpawnCannonConstructor : MonoBehaviour { public Transform location; public void Start() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost) { Debug.Log((object)"Host Cannon Constructor Init"); GameObject val = Object.Instantiate(Plugin.CannonConstructor, location); NetworkObject component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.Spawn(false); Debug.Log((object)$"Spawned CannonConstructor at {location.position}"); } else { Debug.LogError((object)"Failed to spawn CannonConstructor: NetworkObject component is missing!"); } } else { Debug.Log((object)"Client detected, skipping CannonConstructor instantiation."); } } } internal class StartSpawnFlashLight : MonoBehaviour { public Transform location1; public Transform location2; private GameObject instFlash1; private GameObject instFlash2; public GameObject findPrefab() { List itemsList = StartOfRound.Instance.allItemsList.itemsList; foreach (Item item in itemsList) { if (item.itemName.ToLower().Contains("pro") && item.itemName.ToLower().Contains("light") && item.itemName.ToLower().Contains("flash")) { return item.spawnPrefab; } } return null; } public void Start() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost) { GameObject val = findPrefab(); GameObject val2 = Object.Instantiate(val, location1.position, location2.rotation); GameObject val3 = Object.Instantiate(val, location2.position, location2.rotation); NetworkObject component = val2.GetComponent(); NetworkObject component2 = val3.GetComponent(); if ((Object)(object)component != (Object)null) { component.Spawn(false); Debug.Log((object)"CAVE: Spawned flash1"); } if ((Object)(object)component2 != (Object)null) { component2.Spawn(false); Debug.Log((object)"CAVE: Spawned flash2"); } instFlash1 = val2; instFlash2 = val3; } else { Debug.Log((object)"Client detected, skipping CannonConstructor instantiation."); } } } public class QuantumCannon : GrabbableObject { public GameObject projectilePrefab; public Transform core; public Transform firePoint; public float chargeTime = 2.75f; public float projectileForce = 50f; public AudioSource chargeSound; public AudioSource fireSound; public AudioSource flickSound; private bool inRecallMode = false; public GameObject recallLight; public AudioSource recallOn; public AudioSource recallOff; private int recallCycle = 0; public GameObject rotationLever; public GameObject phase1; public GameObject phase2; public GameObject phase3; private int quoteloop = 0; public AudioSource q1; public AudioSource q2; public AudioSource q3; public AudioSource q4; public AudioSource q5; private float quoteProb = 0.25f; private bool isCharging = false; private float chargeTimer = 0f; private bool isRotating = false; private Quaternion targetRotation; private float rotationDuration = 0.5f; private float rotationTimer = 0f; public override void Start() { ((GrabbableObject)this).Start(); base.insertedBattery.charge = 1f; phase1.SetActive(false); phase2.SetActive(false); phase3.SetActive(false); } public override void ItemActivate(bool used, bool buttonDown = true) { if (buttonDown) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { setChargingClientRpc(val: true); } else { setChargingServerRpc(val: true); } } else if (((NetworkBehaviour)RoundManager.Instance).IsHost) { setChargingClientRpc(val: false); } else { setChargingServerRpc(val: false); } } public override void ItemInteractLeftRight(bool right) { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { toggleRecallClientRpc(inRecallMode); } else { toggleRecallServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void toggleRecallServerRpc() { //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(3095340559u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3095340559u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; toggleRecallClientRpc(inRecallMode); } } } [ClientRpc] public void toggleRecallClientRpc(bool currentRecall) { //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(2212974160u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref currentRecall, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2212974160u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; inRecallMode = !currentRecall; if (inRecallMode) { recallOn.Play(); } else { recallOff.Play(); } } } public override void Update() { ((GrabbableObject)this).Update(); if (inRecallMode) { recallCycle++; if (recallCycle > 60) { recallCycle = 0; } if (recallCycle > 30 && !recallLight.activeInHierarchy) { recallLight.SetActive(true); } else if (recallLight.activeInHierarchy) { recallLight.SetActive(false); } } if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } if (isCharging) { chargeTimer += Time.deltaTime; UpdatePhasesClientRpc(chargeTimer, chargeTime); if (chargeTimer >= chargeTime) { FireProjectile(); hardResetClientRpc(); } } if (isRotating) { RotateArmClientRpc(); } } [ServerRpc(RequireOwnership = false)] public void setChargingServerRpc(bool val) { //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 val2 = default(ServerRpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendServerRpc(2323426593u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref val, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val3, 2323426593u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; setChargingClientRpc(val); } } } [ClientRpc] public void setChargingClientRpc(bool val) { //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 val2 = default(ClientRpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendClientRpc(253458672u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref val, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val3, 253458672u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (val) { StartCharging(); } else { CancelCharging(); } } } private void StartCharging() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) Quaternion localRotation = rotationLever.transform.localRotation; rotationLever.transform.localRotation = new Quaternion(0f, localRotation.y, localRotation.z, localRotation.w); if (base.insertedBattery.charge <= 0.15f) { Debug.LogWarning((object)"No battery charge available!"); } else if (!isCharging) { isCharging = true; chargeTimer = 0f; if (Object.op_Implicit((Object)(object)chargeSound)) { chargeSound.Play(); } } } private void CancelCharging() { if (isCharging) { ResetCharge(); } } [ClientRpc] public void hardResetClientRpc() { //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(4106573981u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4106573981u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ResetCharge(); } } } private void ResetCharge() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) isCharging = false; chargeTimer = 0f; chargeSound.Stop(); phase1.SetActive(false); phase2.SetActive(false); phase3.SetActive(false); Quaternion localRotation = rotationLever.transform.localRotation; rotationLever.transform.localRotation = new Quaternion(0f, localRotation.y, localRotation.z, localRotation.w); if (rotationLever.transform.localRotation.x < -45f) { flickSound.Play(); } } [ClientRpc] public void quoteClientRpc(int delay) { //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(2934735390u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, delay); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2934735390u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; quote(delay); } } } public async void quote(int delay) { await Task.Delay(delay); switch (quoteloop) { case 0: q1.Play(); break; case 1: q2.Play(); break; case 2: q3.Play(); break; case 3: q4.Play(); break; case 4: q5.Play(); break; } quoteloop++; if (quoteloop >= 5) { quoteloop = 0; } } [ClientRpc] private void UpdatePhasesClientRpc(float chargeTimerInj, float chargeTimeInj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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(1755749436u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref chargeTimerInj, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref chargeTimeInj, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1755749436u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (chargeTimerInj >= chargeTimeInj * 0.22f && chargeTimerInj < chargeTimeInj * 0.44f) { phase1.SetActive(true); phase2.SetActive(false); phase3.SetActive(false); } else if (chargeTimerInj >= chargeTimeInj * 0.6f && chargeTimerInj < chargeTimeInj) { phase1.SetActive(true); phase2.SetActive(true); phase3.SetActive(false); } else { phase1.SetActive(true); phase2.SetActive(true); phase3.SetActive(true); } } } private void FireProjectile() { //IL_0059: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } if (!Object.op_Implicit((Object)(object)firePoint) || !Object.op_Implicit((Object)(object)Plugin.CannonBall)) { Debug.LogError((object)"FirePoint or ProjectilePrefab is not assigned!"); return; } sharedFireLogicClientRpc(); Vector3 val = firePoint.position - core.position; Vector3 normalized = ((Vector3)(ref val)).normalized; Quaternion val2 = Quaternion.LookRotation(normalized); GameObject val3 = Object.Instantiate(Plugin.CannonBall, firePoint.position, val2); val3.SetActive(true); val3.GetComponent().Spawn(false); val3.GetComponent().owner = ((Object)this).GetInstanceID(); if (!CompanyFightScript.hostile) { if (Random.Range(0f, 1f) < quoteProb) { quoteClientRpc(Random.RandomRangeInt(2000, 15000)); quoteProb = 0.25f; } else { quoteProb += 0.1f; } } } [ClientRpc] public void sharedFireLogicClientRpc() { //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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_014d: 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(1172823000u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1172823000u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; targetRotation = Quaternion.Euler(-90f, rotationLever.transform.localRotation.y, rotationLever.transform.localRotation.z); isRotating = true; rotationTimer = 0f; if (Object.op_Implicit((Object)(object)fireSound)) { fireSound.Play(); } Battery insertedBattery = base.insertedBattery; insertedBattery.charge -= 0.2f; Landmine.SpawnExplosion(firePoint.position, false, 0f, 0f, 0, 17f, (GameObject)null, false); Debug.Log((object)"Fired projectile!"); phase1.SetActive(false); phase2.SetActive(false); phase3.SetActive(false); } } [ClientRpc] private void RotateArmClientRpc() { //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_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(510310612u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 510310612u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; rotationTimer += Time.deltaTime; float num = Mathf.Clamp01(rotationTimer / rotationDuration); rotationLever.transform.localRotation = Quaternion.Slerp(rotationLever.transform.localRotation, targetRotation, num); if (num >= 1f) { isRotating = false; } } } 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 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3095340559u, new RpcReceiveHandler(__rpc_handler_3095340559), "toggleRecallServerRpc"); ((NetworkBehaviour)this).__registerRpc(2212974160u, new RpcReceiveHandler(__rpc_handler_2212974160), "toggleRecallClientRpc"); ((NetworkBehaviour)this).__registerRpc(2323426593u, new RpcReceiveHandler(__rpc_handler_2323426593), "setChargingServerRpc"); ((NetworkBehaviour)this).__registerRpc(253458672u, new RpcReceiveHandler(__rpc_handler_253458672), "setChargingClientRpc"); ((NetworkBehaviour)this).__registerRpc(4106573981u, new RpcReceiveHandler(__rpc_handler_4106573981), "hardResetClientRpc"); ((NetworkBehaviour)this).__registerRpc(2934735390u, new RpcReceiveHandler(__rpc_handler_2934735390), "quoteClientRpc"); ((NetworkBehaviour)this).__registerRpc(1755749436u, new RpcReceiveHandler(__rpc_handler_1755749436), "UpdatePhasesClientRpc"); ((NetworkBehaviour)this).__registerRpc(1172823000u, new RpcReceiveHandler(__rpc_handler_1172823000), "sharedFireLogicClientRpc"); ((NetworkBehaviour)this).__registerRpc(510310612u, new RpcReceiveHandler(__rpc_handler_510310612), "RotateArmClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3095340559(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; ((QuantumCannon)(object)target).toggleRecallServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2212974160(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 currentRecall = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref currentRecall, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumCannon)(object)target).toggleRecallClientRpc(currentRecall); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2323426593(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 chargingServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref chargingServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumCannon)(object)target).setChargingServerRpc(chargingServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_253458672(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 chargingClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref chargingClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumCannon)(object)target).setChargingClientRpc(chargingClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4106573981(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; ((QuantumCannon)(object)target).hardResetClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2934735390(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 delay = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref delay); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumCannon)(object)target).quoteClientRpc(delay); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1755749436(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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float chargeTimerInj = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref chargeTimerInj, default(ForPrimitives)); float chargeTimeInj = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref chargeTimeInj, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((QuantumCannon)(object)target).UpdatePhasesClientRpc(chargeTimerInj, chargeTimeInj); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1172823000(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; ((QuantumCannon)(object)target).sharedFireLogicClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_510310612(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; ((QuantumCannon)(object)target).RotateArmClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "QuantumCannon"; } } internal class ServerOnlyInitializationScript : NetworkBehaviour { public GrabbableObject item; public NetworkObject netObjSelf; public void Start() { if (!((NetworkBehaviour)this).IsServer && !netObjSelf.IsSpawned) { Object.Destroy((Object)(object)((Component)this).gameObject); } else if (((NetworkBehaviour)RoundManager.Instance).IsHost && !((NetworkBehaviour)item).NetworkObject.IsSpawned) { ((NetworkBehaviour)item).NetworkObject.Spawn(false); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "ServerOnlyInitializationScript"; } } } namespace EasterIsland.src.EasterIslandScripts.Cave_Easter_Egg.NetObj_Spawners { public class CaveAINode : MonoBehaviour { } public class CaveSpawnNode : MonoBehaviour { } public class CaveTrapNode : MonoBehaviour { } } namespace EasterIsland.src.EasterIslandScripts.BookLogic { internal class GenericInitScript : MonoBehaviour { public GrabbableObject item; public void Start() { if (((NetworkBehaviour)RoundManager.Instance).IsHost && !((NetworkBehaviour)item).NetworkObject.IsSpawned) { ((NetworkBehaviour)item).NetworkObject.Spawn(false); Object.Destroy((Object)(object)this); ScanNodeProperties componentInChildren = ((Component)item).gameObject.GetComponentInChildren(); componentInChildren.subText = "Value: " + componentInChildren.scrapValue + " gum gum"; } else { ScanNodeProperties componentInChildren2 = ((Component)item).gameObject.GetComponentInChildren(); componentInChildren2.subText = "Value: " + componentInChildren2.scrapValue + " gum gum"; } } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace EasterIsland.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }