Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Tartarus v1.5.2
BepInEx/plugins/com.github.Teaisnt.Tartarus.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
#define DEBUG using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalLevelLoader; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; using WeatherRegistry; using com.github.Teaisnt.Tartarus.NetcodePatcher; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("com.github.Teaisnt.Tartarus")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.3.0.0")] [assembly: AssemblyInformationalVersion("1.3.0")] [assembly: AssemblyProduct("com.github.Teaisnt.Tartarus")] [assembly: AssemblyTitle("Tartarus")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.3.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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace Tartarus { public class Block2FloodTrapController : MonoBehaviour { [SerializeField] private List<AudioSource> faceAudioSources; [SerializeField] private AudioSource doorAudioSource; [SerializeField] private Animator m_Animator; [SerializeField] private Transform purpleIdolDetectBox; [SerializeField] private AudioClip doorCloseSound; [SerializeField] private AudioClip doorOpenSound; [SerializeField] private AudioClip tentaclesShiftSound; private bool foundIdol = false; private PurpleIdol purpleIdol; private Vector3 purpleIdolSpawnPosition; private bool startedFloodTrap = false; private float timeSinceAlive = 0f; private void Start() { CheckForIdol(); } private void CheckForIdol() { ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { }, 1f, delegate { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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) int num = 64; Collider[] array = Physics.OverlapBox(purpleIdolDetectBox.position, purpleIdolDetectBox.localScale, Quaternion.identity, num); if (array.Length != 0) { Collider[] array2 = array; PurpleIdol purpleIdol = default(PurpleIdol); foreach (Collider val in array2) { if (((Component)val).TryGetComponent<PurpleIdol>(ref purpleIdol)) { this.purpleIdol = purpleIdol; purpleIdolSpawnPosition = ((Component)this.purpleIdol).transform.position; break; } } } if ((Object)(object)this.purpleIdol == (Object)null) { CheckForIdol(); } })); } private void Update() { //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) timeSinceAlive += Time.deltaTime; if ((Object)(object)purpleIdol != (Object)null && ((Component)purpleIdol).transform.position != purpleIdolSpawnPosition && !startedFloodTrap && timeSinceAlive > 2f) { startedFloodTrap = true; FloodStart(); } } private void FloodStart() { m_Animator.SetTrigger("FloodStart"); doorAudioSource.PlayOneShot(doorCloseSound); doorAudioSource.PlayOneShot(tentaclesShiftSound); foreach (AudioSource faceAudioSource in faceAudioSources) { ((MonoBehaviour)this).StartCoroutine(FadeSource(faceAudioSource, fadeIn: true)); } } private void FloodStop() { doorAudioSource.PlayOneShot(doorOpenSound); doorAudioSource.PlayOneShot(tentaclesShiftSound); foreach (AudioSource faceAudioSource in faceAudioSources) { ((MonoBehaviour)this).StartCoroutine(FadeSource(faceAudioSource, fadeIn: false)); } } private IEnumerator FadeSource(AudioSource audioSource, bool fadeIn) { float timeElapsed = 0f; while (timeElapsed < 0.25f) { if (!fadeIn) { audioSource.volume = Mathf.Lerp(0.3f, 0f, timeElapsed / 0.25f); } else { audioSource.volume = Mathf.Lerp(0f, 0.3f, timeElapsed / 0.25f); } timeElapsed += Time.deltaTime; yield return null; } if (fadeIn) { audioSource.volume = 0.3f; } else { audioSource.volume = 0f; } } } public class Block2TentacleController : NetworkBehaviour { [SerializeField] private AudioSource audioSource; [SerializeField] private AudioClip tentacleAttack; [SerializeField] private AudioClip tentacleSearch; private bool exploring = false; private bool canKill = false; public bool collidedWithPlayer = false; [SerializeField] private Animator animator; [SerializeField] private Transform grabPosition; private void Start() { } private void Update() { } private void OnTriggerEnter(Collider other) { if (((Component)other).CompareTag("Player") && !collidedWithPlayer && !exploring) { Explore(); } } private void OnTriggerStay(Collider other) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (canKill && ((Component)other).CompareTag("Player")) { exploring = false; canKill = false; CheckAnimationGrabPlayerServerRpc(new NetworkBehaviourReference((NetworkBehaviour)(object)((Component)other).GetComponent<PlayerControllerB>())); } } public void Explore() { exploring = true; ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { animator.SetTrigger("Explore"); audioSource.PlayOneShot(tentacleSearch); }, 0.5f, delegate { canKill = true; })); }, 4f, delegate { if (exploring) { exploring = false; } })); } [ServerRpc(RequireOwnership = false)] public void CheckAnimationGrabPlayerServerRpc(NetworkBehaviourReference playerRef) { //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_00f8: 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(1235459733u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkBehaviourReference>(ref playerRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1235459733u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!collidedWithPlayer) { collidedWithPlayer = true; ConfirmAnimationGrabPlayerClientRpc(playerRef); } } } [ClientRpc] public void ConfirmAnimationGrabPlayerClientRpc(NetworkBehaviourReference playerRef) { //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_00eb: 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(30454083u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkBehaviourReference>(ref playerRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 30454083u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; collidedWithPlayer = true; ((MonoBehaviour)this).StartCoroutine(AnimationGrabPlayer(playerRef)); } } } private IEnumerator AnimationGrabPlayer(NetworkBehaviourReference playerRef) { //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) PlayerControllerB playerDying = default(PlayerControllerB); ((NetworkBehaviourReference)(ref playerRef)).TryGet<PlayerControllerB>(ref playerDying, (NetworkManager)null); animator.SetBool("grabbingPlayer", true); audioSource.PlayOneShot(tentacleAttack); grabPosition.position = ((Component)playerDying).transform.position; yield return (object)new WaitForSeconds(0.05f); if (((NetworkBehaviour)playerDying).IsOwner) { playerDying.KillPlayer(Vector3.zero, true, (CauseOfDeath)0, 0, default(Vector3), false); } float startTime = Time.timeSinceLevelLoad; yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)playerDying.deadBody != (Object)null || Time.timeSinceLevelLoad - startTime > 4f)); if ((Object)(object)playerDying.deadBody != (Object)null) { playerDying.deadBody.attachedTo = grabPosition; playerDying.deadBody.attachedLimb = playerDying.deadBody.bodyParts[6]; playerDying.deadBody.matchPositionExactly = true; } else { Debug.Log((object)"Player body was not spawned in time for animation."); } animator.SetBool("grabbingPlayer", false); yield return (object)new WaitForSeconds(5f); if ((Object)(object)playerDying.deadBody != (Object)null) { playerDying.deadBody.attachedTo = null; playerDying.deadBody.attachedLimb = null; playerDying.deadBody.matchPositionExactly = false; ((Component)playerDying.deadBody).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 //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1235459733u, new RpcReceiveHandler(__rpc_handler_1235459733), "CheckAnimationGrabPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(30454083u, new RpcReceiveHandler(__rpc_handler_30454083), "ConfirmAnimationGrabPlayerClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1235459733(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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference playerRef = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkBehaviourReference>(ref playerRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Block2TentacleController)(object)target).CheckAnimationGrabPlayerServerRpc(playerRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_30454083(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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference playerRef = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkBehaviourReference>(ref playerRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Block2TentacleController)(object)target).ConfirmAnimationGrabPlayerClientRpc(playerRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Block2TentacleController"; } } public class BreakableObject : NetworkBehaviour, IHittable { [SerializeField] private List<GameObject> possibleDropsBlock1; [SerializeField] private List<GameObject> possibleDropsBlock2; [SerializeField] private List<GameObject> possibleDropsBlock3; [SerializeField] private List<GameObject> possibleDropsBlock4; [SerializeField] private List<GameObject> possibleDropsBlock5; [SerializeField] private List<GameObject> possibleDropsBlock6; [SerializeField] private GameObject worldTarot; [Range(0f, 100f)] [SerializeField] private int spawnChance; private Animator animator; private AudioSource audioSource; [SerializeField] private AudioClip breakSound; private void Start() { animator = ((Component)this).GetComponent<Animator>(); audioSource = ((Component)this).GetComponent<AudioSource>(); } bool IHittable.Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit, bool playHitSFX, int hitID = -1) { int currTartarusFloor = TartarusInteriorController.Instance.currTartarusFloor; OnHitServerRpc(currTartarusFloor); return true; } [ServerRpc(RequireOwnership = false)] private void OnHitServerRpc(int currBlock) { //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_0203: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_019b: 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.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(914033119u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, currBlock); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 914033119u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; List<GameObject> list = new List<GameObject>(); switch (currBlock) { case 0: list = possibleDropsBlock1; break; case 1: list = possibleDropsBlock2; break; case 2: list = possibleDropsBlock3; break; case 3: list = possibleDropsBlock4; break; case 4: list = possibleDropsBlock5; break; case 5: list = possibleDropsBlock6; break; } int num = Random.Range(0, 101); if (num <= Plugin.TarotSpawnChance.Value) { int num2 = Random.Range(0, 101); if (num <= Plugin.WorldTarotSpawnChance.Value) { GameObject val3 = Object.Instantiate<GameObject>(worldTarot, ((Component)((Component)this).GetComponentInChildren<Light>()).transform.position, ((Component)this).transform.rotation); if ((Object)(object)val3 != (Object)null) { val3.GetComponent<NetworkObject>().Spawn(false); val3.GetComponent<TarotCard>().tarotRarity = 20; } } else { int index = Random.Range(0, list.Count); GameObject val4 = Object.Instantiate<GameObject>(list[index], ((Component)((Component)this).GetComponentInChildren<Light>()).transform.position, ((Component)this).transform.rotation); if ((Object)(object)val4 != (Object)null) { val4.GetComponent<NetworkObject>().Spawn(false); val4.GetComponent<TarotCard>().tarotRarity = currBlock; } } } OnHitClientRpc(); } [ClientRpc] private void OnHitClientRpc() { //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(1847422185u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1847422185u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.SetTrigger("Break"); audioSource.PlayOneShot(breakSound); } } } 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(914033119u, new RpcReceiveHandler(__rpc_handler_914033119), "OnHitServerRpc"); ((NetworkBehaviour)this).__registerRpc(1847422185u, new RpcReceiveHandler(__rpc_handler_1847422185), "OnHitClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_914033119(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 currBlock = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref currBlock); target.__rpc_exec_stage = (__RpcExecStage)1; ((BreakableObject)(object)target).OnHitServerRpc(currBlock); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1847422185(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; ((BreakableObject)(object)target).OnHitClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BreakableObject"; } } public class EnterAnimationController : NetworkBehaviour { public Animator animator; private AudioSource audioSource; private void Start() { audioSource = ((Component)this).GetComponent<AudioSource>(); if (Plugin.TartarusMoonEntryAnimation.Value && Plugin.moonEntryPlayCount < Plugin.TartarusMoonEntryAnimationPlayCount.Value) { ((ExtendedEvent)DungeonManager.GlobalDungeonEvents.onSpawnedScrapObjects).AddListener((Action)PlayAnimation); } } private void PlayAnimation() { ((ExtendedEvent)DungeonManager.GlobalDungeonEvents.onSpawnedScrapObjects).RemoveListener((Action)PlayAnimation); Plugin.moonEntryPlayCount++; PlayAnimationServerRpc(); } [ServerRpc] private void PlayAnimationServerRpc() { //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(941152539u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 941152539u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayAnimationClientRpc(); } } [ClientRpc] private void PlayAnimationClientRpc() { //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(4060555263u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4060555263u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.SetTrigger("playAnimation"); audioSource.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 ((NetworkBehaviour)this).__registerRpc(941152539u, new RpcReceiveHandler(__rpc_handler_941152539), "PlayAnimationServerRpc"); ((NetworkBehaviour)this).__registerRpc(4060555263u, new RpcReceiveHandler(__rpc_handler_4060555263), "PlayAnimationClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_941152539(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; ((EnterAnimationController)(object)target).PlayAnimationServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4060555263(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; ((EnterAnimationController)(object)target).PlayAnimationClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "EnterAnimationController"; } } public static class Extensions { public static void SetLayer(this GameObject obj, LayerMask layerMask, bool children) { //IL_0002: 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) obj.layer = LayerMask.op_Implicit(layerMask); if (children && obj.transform.childCount > 0) { Transform[] componentsInChildren = obj.GetComponentsInChildren<Transform>(); Transform[] array = componentsInChildren; foreach (Transform val in array) { ((Component)val).gameObject.layer = LayerMask.op_Implicit(layerMask); } } } public static void SetLayer(this GameObject obj, string layerName, bool children) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_0054: Unknown result type (might be due to invalid IL or missing references) LayerMask val = LayerMask.op_Implicit(LayerMask.NameToLayer(layerName)); obj.layer = LayerMask.op_Implicit(val); if (children && obj.transform.childCount > 0) { Transform[] componentsInChildren = obj.GetComponentsInChildren<Transform>(); Transform[] array = componentsInChildren; foreach (Transform val2 in array) { ((Component)val2).gameObject.layer = LayerMask.op_Implicit(val); } } } public static Transform GetClosest(this Transform _transform, params Component[] array) { //IL_0017: 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) Transform result = null; float num = float.PositiveInfinity; foreach (Component val in array) { float num2 = Vector3.Distance(_transform.position, val.transform.position); if (num2 < num) { num = num2; result = val.transform; } } return result; } public static void SetColliderEnabled(this GameObject obj, bool enable, bool children) { obj.GetComponent<Collider>().enabled = enable; if (children) { Collider[] componentsInChildren = obj.GetComponentsInChildren<Collider>(); Collider[] array = componentsInChildren; foreach (Collider val in array) { val.enabled = enable; } } } public static void SetTag(this GameObject obj, string newTag, bool children) { obj.tag = newTag; if (children) { Transform[] componentsInChildren = obj.GetComponentsInChildren<Transform>(); Transform[] array = componentsInChildren; foreach (Transform val in array) { ((Component)val).gameObject.tag = newTag; } } } public static void AddComponent<T>(this GameObject obj, bool children) where T : Component { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown obj.AddComponent<T>(); if (!children) { return; } foreach (Transform item in obj.transform) { Transform val = item; ((Component)val).gameObject.AddComponent<T>(); } } public static T GetVariableFromString<T>(this Component comp, string varName) { return (T)((object)comp).GetType().GetField(varName).GetValue(comp); } public static void MoveTowards(this Transform trans, Vector3 target, float maxDistanceDelta) { //IL_0003: 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_000a: Unknown result type (might be due to invalid IL or missing references) trans.position = Vector3.MoveTowards(trans.position, target, maxDistanceDelta); } public static Vector3 GetCenter(this GameObject obj) { //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_0037: 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_004f: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) List<float> list = new List<float>(); List<float> list2 = new List<float>(); List<float> list3 = new List<float>(); Renderer[] componentsInChildren = obj.GetComponentsInChildren<Renderer>(); Renderer[] array = componentsInChildren; foreach (Renderer val in array) { Bounds bounds = val.bounds; list.Add(((Bounds)(ref bounds)).center.x); bounds = val.bounds; list2.Add(((Bounds)(ref bounds)).center.y); bounds = val.bounds; list3.Add(((Bounds)(ref bounds)).center.z); } float num = (Mathf.Max(list.ToArray()) + Mathf.Min(list.ToArray())) / 2f; float num2 = (Mathf.Max(list2.ToArray()) + Mathf.Min(list2.ToArray())) / 2f; float num3 = (Mathf.Max(list3.ToArray()) + Mathf.Min(list3.ToArray())) / 2f; return new Vector3(num, num2, num3); } public static Vector3 GetBottom(this GameObject obj) { //IL_0009: 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_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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_0056: 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_006c: 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) MeshFilter[] componentsInChildren = obj.GetComponentsInChildren<MeshFilter>(); Vector3 center = obj.GetCenter(); Vector3 val = componentsInChildren[0].mesh.vertices[0]; MeshFilter[] array = componentsInChildren; foreach (MeshFilter val2 in array) { Mesh mesh = val2.mesh; Vector3[] vertices = mesh.vertices; foreach (Vector3 val3 in vertices) { if (val3.y < val.y) { val = val3; } } } center.y = val.y; return center; } public static Vector3 GetCenterNew(this GameObject obj) { //IL_0003: 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_0026: Expected O, but got Unknown //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_005b: 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_0093: Unknown result type (might be due to invalid IL or missing references) Bounds val = default(Bounds); bool flag = true; foreach (Transform item in obj.transform) { Transform val2 = item; if (Object.op_Implicit((Object)(object)((Component)val2).GetComponent<MeshRenderer>())) { if (flag) { flag = false; val = ((Renderer)((Component)val2).GetComponent<MeshRenderer>()).bounds; } else { ((Bounds)(ref val)).Encapsulate(((Renderer)((Component)val2).GetComponent<MeshRenderer>()).bounds); } } } return ((Bounds)(ref val)).center; } public static Transform[] GetAllChildren(this Transform trans) { return ((Component)trans).GetComponentsInChildren<Transform>(); } public static void SetAlpha(this Image image, float alpha) { //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_0011: Unknown result type (might be due to invalid IL or missing references) Color color = ((Graphic)image).color; color.a = alpha; ((Graphic)image).color = color; } public static void SetAlpha(this Material mat, float alpha) { //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_0011: Unknown result type (might be due to invalid IL or missing references) Color color = mat.color; color.a = alpha; mat.color = color; } public static void SetX(this Transform trans, float newX, bool relative) { //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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) Vector3 position = trans.position; position.x = (relative ? (position.x + newX) : newX); trans.position = position; } public static void SetY(this Transform trans, float newY, bool relative) { //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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) Vector3 position = trans.position; position.y = (relative ? (position.y + newY) : newY); trans.position = position; } public static void SetZ(this Transform trans, float newZ, bool relative) { //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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) Vector3 position = trans.position; position.z = (relative ? (position.z + newZ) : newZ); trans.position = position; } public static bool IsSimilar(this Material mat, Material other) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //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) //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) Texture2D val = (Texture2D)mat.mainTexture; Texture2D val2 = (Texture2D)other.mainTexture; if ((Object)(object)mat.mainTexture == (Object)null && (Object)(object)other.mainTexture == (Object)null) { return mat.color == other.color; } return mat.color == other.color && (Object)(object)val == (Object)(object)val2; } } public class Ext { public static void LoadSceneOffline(string sceneName) { SceneManager.LoadScene(sceneName); } public static Scene GetActiveScene() { //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_0009: Unknown result type (might be due to invalid IL or missing references) return SceneManager.GetActiveScene(); } public static int CryptoRandomInt(int min, int max) { return RandomNumberGenerator.GetInt32(min, max); } public static float CryptoRandomFloat(float min, float max) { RandomNumberGenerator randomNumberGenerator = RandomNumberGenerator.Create(); byte[] array = new byte[4]; randomNumberGenerator.GetBytes(array); float num = BitConverter.ToSingle(array, 0); return num * (max - min) + min; } public static IEnumerator WaitAndDo(Action firstAction, float time, Action secondAction) { firstAction(); yield return (object)new WaitForSeconds(time); secondAction(); } public static IEnumerator WaitAndDo(Func<bool> condition, Action action) { while (condition()) { yield return null; } action(); } } public class MathExt { public static float Wrap(float value, float min, float max) { if (value % 1f == 0f) { while (value > max || value < min) { if (value > max) { value += min - max - 1f; } else if (value < min) { value += max - min + 1f; } } return value; } float num = value + 1f; while (value != num) { num = value; if (value < min) { value = max - (min - value); } else if (value > max) { value = min + (value - max); } } return value; } public static int Wrap(int value, int min, int max) { if (value % 1 == 0) { while (value > max || value < min) { if (value > max) { value += min - max - 1; } else if (value < min) { value += max - min + 1; } } return value; } int num = value + 1; while (value != num) { num = value; if (value < min) { value = max - (min - value); } else if (value > max) { value = min + (value - max); } } return value; } public static bool Chance(float chance) { return chance > Random.Range(0f, 1f); } public static bool CryptoChance(float chance) { return chance > Ext.CryptoRandomFloat(0f, 1f); } public static T Choose<T>(params T[] array) { int num = array.Length; return array[Random.Range(0, num)]; } public static T Choose<T>(List<T> list) { return Choose(list.ToArray()); } public static T CryptoChoose<T>(params T[] array) { int max = array.Length; return array[Ext.CryptoRandomInt(0, max)]; } public static T CryptoChoose<T>(List<T> list) { return CryptoChoose(list.ToArray()); } } public class FunnyDoor : NetworkBehaviour { private Animator animator; private AudioSource audioSource; public int inTriggerCount = 0; private bool isOpen = false; public AudioClip doorOpenSound; public AudioClip doorCloseSound; public bool inverseOpenAndClose; private void Start() { animator = ((Component)this).GetComponent<Animator>(); audioSource = ((Component)this).GetComponent<AudioSource>(); } [ServerRpc(RequireOwnership = false)] private void OpenDoorServerRpc() { //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(2690358738u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2690358738u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; OpenDoorClientRpc(); } } } [ClientRpc] private void OpenDoorClientRpc() { //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(1347848462u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1347848462u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.SetTrigger("Open"); audioSource.PlayOneShot(doorOpenSound); } } } [ServerRpc(RequireOwnership = false)] private void CloseDoorServerRpc() { //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(4005796717u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4005796717u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CloseDoorClientRpc(); } } } [ClientRpc] private void CloseDoorClientRpc() { //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(3045237554u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3045237554u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.SetTrigger("Close"); audioSource.PlayOneShot(doorCloseSound); } } } private void OnTriggerEnter(Collider other) { if (((Component)other).CompareTag("Player") || ((Component)other).CompareTag("Enemy")) { UpdateCount(1); } } private void OnTriggerExit(Collider other) { if (((Component)other).CompareTag("Player") || ((Component)other).CompareTag("Enemy")) { UpdateCount(-1); } } private void UpdateCount(int update) { inTriggerCount += update; if (inTriggerCount == 1 && !isOpen) { if (inverseOpenAndClose) { CloseDoorServerRpc(); } else { OpenDoorServerRpc(); } isOpen = true; } else if (inTriggerCount == 0 && isOpen) { if (inverseOpenAndClose) { OpenDoorServerRpc(); } else { CloseDoorServerRpc(); } isOpen = false; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2690358738u, new RpcReceiveHandler(__rpc_handler_2690358738), "OpenDoorServerRpc"); ((NetworkBehaviour)this).__registerRpc(1347848462u, new RpcReceiveHandler(__rpc_handler_1347848462), "OpenDoorClientRpc"); ((NetworkBehaviour)this).__registerRpc(4005796717u, new RpcReceiveHandler(__rpc_handler_4005796717), "CloseDoorServerRpc"); ((NetworkBehaviour)this).__registerRpc(3045237554u, new RpcReceiveHandler(__rpc_handler_3045237554), "CloseDoorClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2690358738(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; ((FunnyDoor)(object)target).OpenDoorServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1347848462(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; ((FunnyDoor)(object)target).OpenDoorClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4005796717(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; ((FunnyDoor)(object)target).CloseDoorServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3045237554(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; ((FunnyDoor)(object)target).CloseDoorClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FunnyDoor"; } } public class InteractAnimator : NetworkBehaviour { private Animator animator; private AudioSource audioSource; private bool isOpen = false; public AudioClip doorOpenSound; public AudioClip doorCloseSound; private void Start() { animator = ((Component)this).GetComponent<Animator>(); audioSource = ((Component)this).GetComponent<AudioSource>(); } public void ToggleDoor() { ToggleDoorServerRpc(); } [ServerRpc(RequireOwnership = false)] private void ToggleDoorServerRpc() { //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(1958622022u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1958622022u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ToggleDoorClientRpc(); } } } [ClientRpc] private void ToggleDoorClientRpc() { //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(1815429160u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1815429160u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; isOpen = !isOpen; animator.SetBool("Opened", isOpen); if (isOpen && (Object)(object)doorOpenSound != (Object)null) { audioSource.PlayOneShot(doorOpenSound); } else if (!isOpen && (Object)(object)doorOpenSound != (Object)null) { audioSource.PlayOneShot(doorCloseSound); } } } [ServerRpc(RequireOwnership = false)] private void OpenDoorServerRpc() { //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(1712824035u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1712824035u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; OpenDoorClientRpc(); } } } [ClientRpc] private void OpenDoorClientRpc() { //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(4254024752u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4254024752u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.SetBool("Opened", true); if ((Object)(object)doorOpenSound != (Object)null) { audioSource.PlayOneShot(doorOpenSound); } } } [ServerRpc(RequireOwnership = false)] private void CloseDoorServerRpc() { //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(466233496u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 466233496u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CloseDoorClientRpc(); } } } [ClientRpc] private void CloseDoorClientRpc() { //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(3101562087u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3101562087u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.SetBool("Opened", false); if ((Object)(object)doorCloseSound != (Object)null) { audioSource.PlayOneShot(doorCloseSound); } } } 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 ((NetworkBehaviour)this).__registerRpc(1958622022u, new RpcReceiveHandler(__rpc_handler_1958622022), "ToggleDoorServerRpc"); ((NetworkBehaviour)this).__registerRpc(1815429160u, new RpcReceiveHandler(__rpc_handler_1815429160), "ToggleDoorClientRpc"); ((NetworkBehaviour)this).__registerRpc(1712824035u, new RpcReceiveHandler(__rpc_handler_1712824035), "OpenDoorServerRpc"); ((NetworkBehaviour)this).__registerRpc(4254024752u, new RpcReceiveHandler(__rpc_handler_4254024752), "OpenDoorClientRpc"); ((NetworkBehaviour)this).__registerRpc(466233496u, new RpcReceiveHandler(__rpc_handler_466233496), "CloseDoorServerRpc"); ((NetworkBehaviour)this).__registerRpc(3101562087u, new RpcReceiveHandler(__rpc_handler_3101562087), "CloseDoorClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1958622022(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; ((InteractAnimator)(object)target).ToggleDoorServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1815429160(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; ((InteractAnimator)(object)target).ToggleDoorClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1712824035(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; ((InteractAnimator)(object)target).OpenDoorServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4254024752(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; ((InteractAnimator)(object)target).OpenDoorClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_466233496(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; ((InteractAnimator)(object)target).CloseDoorServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3101562087(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; ((InteractAnimator)(object)target).CloseDoorClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "InteractAnimator"; } } public class MoveBackAndForth : MonoBehaviour { [SerializeField] private Vector3 frequency; [SerializeField] private Vector3 magnitude; [SerializeField] private Vector3 offset; private void Update() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Sin(Time.time * frequency.x + offset.x) * magnitude.x; float num2 = Mathf.Sin(Time.time * frequency.y + offset.y) * magnitude.y; float num3 = Mathf.Sin(Time.time * frequency.z + offset.z) * magnitude.z; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(num, num2, num3); ((Component)this).transform.Translate(val * Time.deltaTime); } } public class MovingHall : NetworkBehaviour { public enum State { Rotating, Moving } [Header("State")] public State stateType; [SerializeField] private Animator animator; private AudioSource audioSource; public int inTriggerCount = 0; private bool isOpen = false; public AudioClip rotateInSound; public AudioClip rotateOutSound; private void Start() { animator = ((Component)this).GetComponent<Animator>(); audioSource = ((Component)this).GetComponent<AudioSource>(); ChooseRandomStateServerRpc(); } [ServerRpc(RequireOwnership = false)] private void ChooseRandomStateServerRpc() { //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(2715313328u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2715313328u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (Random.Range(0, 2) == 0) { ChooseMovingStateClientRpc(); } else { ChooseRotatingStateClientRpc(); } } } [ClientRpc] private void ChooseMovingStateClientRpc() { //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(279694926u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 279694926u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; stateType = State.Moving; animator.SetTrigger("MoveIn"); } } } [ClientRpc] private void ChooseRotatingStateClientRpc() { //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(1643055937u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1643055937u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; stateType = State.Rotating; animator.SetTrigger("RotateIn"); } } } [ServerRpc(RequireOwnership = false)] private void MoveHallInServerRpc() { //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(1697866694u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1697866694u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MoveHallInClientRpc(); } } } [ClientRpc] private void MoveHallInClientRpc() { //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(452736862u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 452736862u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.SetTrigger("MoveIn"); audioSource.PlayOneShot(rotateInSound); isOpen = false; } } } [ServerRpc(RequireOwnership = false)] private void MoveHallOutServerRpc() { //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(839009823u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 839009823u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MoveHallOutClientRpc(); } } } [ClientRpc] private void MoveHallOutClientRpc() { //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(756128656u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 756128656u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.SetTrigger("MoveOut"); audioSource.PlayOneShot(rotateOutSound); isOpen = true; } } } [ServerRpc(RequireOwnership = false)] private void RotateHallInServerRpc() { //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(2592273077u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2592273077u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RotateHallInClientRpc(); } } } [ClientRpc] private void RotateHallInClientRpc() { //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(374958616u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 374958616u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.SetTrigger("RotateIn"); audioSource.PlayOneShot(rotateInSound); isOpen = false; } } } [ServerRpc(RequireOwnership = false)] private void RotateHallOutServerRpc() { //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(2217170805u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2217170805u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RotateHallOutClientRpc(); } } } [ClientRpc] private void RotateHallOutClientRpc() { //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(1236911777u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1236911777u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.SetTrigger("RotateOut"); audioSource.PlayOneShot(rotateOutSound); isOpen = true; } } } private void OnTriggerEnter(Collider other) { if (((Component)other).CompareTag("Player") || ((Component)other).CompareTag("Enemy")) { UpdateCount(1); } } private void OnTriggerExit(Collider other) { if (((Component)other).CompareTag("Player") || ((Component)other).CompareTag("Enemy")) { UpdateCount(-1); } } private void UpdateCount(int update) { inTriggerCount += update; if (inTriggerCount == 1 && !isOpen) { TriggerOut(); } else if (inTriggerCount == 0 && isOpen) { TriggerIn(); } } private void TriggerOut() { if (stateType == State.Rotating) { RotateHallOutServerRpc(); } else { MoveHallOutServerRpc(); } } private void TriggerIn() { if (stateType == State.Rotating) { RotateHallInServerRpc(); } else { MoveHallInServerRpc(); } } 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(2715313328u, new RpcReceiveHandler(__rpc_handler_2715313328), "ChooseRandomStateServerRpc"); ((NetworkBehaviour)this).__registerRpc(279694926u, new RpcReceiveHandler(__rpc_handler_279694926), "ChooseMovingStateClientRpc"); ((NetworkBehaviour)this).__registerRpc(1643055937u, new RpcReceiveHandler(__rpc_handler_1643055937), "ChooseRotatingStateClientRpc"); ((NetworkBehaviour)this).__registerRpc(1697866694u, new RpcReceiveHandler(__rpc_handler_1697866694), "MoveHallInServerRpc"); ((NetworkBehaviour)this).__registerRpc(452736862u, new RpcReceiveHandler(__rpc_handler_452736862), "MoveHallInClientRpc"); ((NetworkBehaviour)this).__registerRpc(839009823u, new RpcReceiveHandler(__rpc_handler_839009823), "MoveHallOutServerRpc"); ((NetworkBehaviour)this).__registerRpc(756128656u, new RpcReceiveHandler(__rpc_handler_756128656), "MoveHallOutClientRpc"); ((NetworkBehaviour)this).__registerRpc(2592273077u, new RpcReceiveHandler(__rpc_handler_2592273077), "RotateHallInServerRpc"); ((NetworkBehaviour)this).__registerRpc(374958616u, new RpcReceiveHandler(__rpc_handler_374958616), "RotateHallInClientRpc"); ((NetworkBehaviour)this).__registerRpc(2217170805u, new RpcReceiveHandler(__rpc_handler_2217170805), "RotateHallOutServerRpc"); ((NetworkBehaviour)this).__registerRpc(1236911777u, new RpcReceiveHandler(__rpc_handler_1236911777), "RotateHallOutClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2715313328(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; ((MovingHall)(object)target).ChooseRandomStateServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_279694926(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; ((MovingHall)(object)target).ChooseMovingStateClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1643055937(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; ((MovingHall)(object)target).ChooseRotatingStateClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1697866694(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; ((MovingHall)(object)target).MoveHallInServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_452736862(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; ((MovingHall)(object)target).MoveHallInClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_839009823(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; ((MovingHall)(object)target).MoveHallOutServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_756128656(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; ((MovingHall)(object)target).MoveHallOutClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2592273077(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; ((MovingHall)(object)target).RotateHallInServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_374958616(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; ((MovingHall)(object)target).RotateHallInClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2217170805(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; ((MovingHall)(object)target).RotateHallOutServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1236911777(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; ((MovingHall)(object)target).RotateHallOutClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "MovingHall"; } } internal class NormalShadowAI : Enemy