#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 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(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())); } } 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(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(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(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)(() => (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(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(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 possibleDropsBlock1; [SerializeField] private List possibleDropsBlock2; [SerializeField] private List possibleDropsBlock3; [SerializeField] private List possibleDropsBlock4; [SerializeField] private List possibleDropsBlock5; [SerializeField] private List 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(); audioSource = ((Component)this).GetComponent(); } 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 list = new List(); 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(worldTarot, ((Component)((Component)this).GetComponentInChildren()).transform.position, ((Component)this).transform.rotation); if ((Object)(object)val3 != (Object)null) { val3.GetComponent().Spawn(false); val3.GetComponent().tarotRarity = 20; } } else { int index = Random.Range(0, list.Count); GameObject val4 = Object.Instantiate(list[index], ((Component)((Component)this).GetComponentInChildren()).transform.position, ((Component)this).transform.rotation); if ((Object)(object)val4 != (Object)null) { val4.GetComponent().Spawn(false); val4.GetComponent().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(); 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[] 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[] 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().enabled = enable; if (children) { Collider[] componentsInChildren = obj.GetComponentsInChildren(); 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[] array = componentsInChildren; foreach (Transform val in array) { ((Component)val).gameObject.tag = newTag; } } } public static void AddComponent(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(); if (!children) { return; } foreach (Transform item in obj.transform) { Transform val = item; ((Component)val).gameObject.AddComponent(); } } public static T GetVariableFromString(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 list = new List(); List list2 = new List(); List list3 = new List(); Renderer[] componentsInChildren = obj.GetComponentsInChildren(); 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(); 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())) { if (flag) { flag = false; val = ((Renderer)((Component)val2).GetComponent()).bounds; } else { ((Bounds)(ref val)).Encapsulate(((Renderer)((Component)val2).GetComponent()).bounds); } } } return ((Bounds)(ref val)).center; } public static Transform[] GetAllChildren(this Transform trans) { return ((Component)trans).GetComponentsInChildren(); } 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 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(params T[] array) { int num = array.Length; return array[Random.Range(0, num)]; } public static T Choose(List list) { return Choose(list.ToArray()); } public static T CryptoChoose(params T[] array) { int max = array.Length; return array[Ext.CryptoRandomInt(0, max)]; } public static T CryptoChoose(List 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(); audioSource = ((Component)this).GetComponent(); } [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(); audioSource = ((Component)this).GetComponent(); } 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(); audioSource = ((Component)this).GetComponent(); 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 : EnemyAI { public enum State { Wander, Attack, Chase, Alert } [SerializeField] private List possibleDrops; public List audioClips = new List(); public Transform turnCompass = null; public Transform attackArea = null; public ParticleSystem deathParticles; public float wanderMoveSpeed; public float chaseMoveSpeed; private float timeSinceNewRandPos; private float timeSinceAttacking; private float timeSinceAlerted; private Vector3 StalkPos; private Random enemyRandom = null; private bool isDeadAnimationDone; [Header("State")] public State stateType; [Conditional("DEBUG")] private void LogIfDebugBuild(string text) { } public override void Start() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); LogIfDebugBuild("Example Enemy Spawned"); base.creatureAnimator.SetTrigger("startWalk"); timeSinceNewRandPos = 0f; timeSinceAlerted = 0f; enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex); isDeadAnimationDone = false; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); } public override void Update() { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead) { if (!isDeadAnimationDone) { LogIfDebugBuild("Stopping enemy voice with janky code."); isDeadAnimationDone = true; StopSfxClientRpc(); PlaySoundClientRpc(3); } return; } timeSinceAttacking += Time.deltaTime; timeSinceNewRandPos += Time.deltaTime; timeSinceAlerted += Time.deltaTime; if ((Object)(object)base.targetPlayer != (Object)null && (stateType == State.Chase || stateType == State.Attack)) { turnCompass.LookAt(((Component)base.targetPlayer.gameplayCamera).transform.position); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(new Vector3(0f, turnCompass.eulerAngles.y, 0f)), 4f * Time.deltaTime); } } public override void DoAIInterval() { //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } switch (stateType) { case State.Wander: base.agent.angularSpeed = 50f; base.agent.speed = Plugin.ShadowWanderSpeed.Value; if (FoundClosestPlayerInRange(25f, 1f)) { LogIfDebugBuild("Start Target Player"); ((EnemyAI)this).StopSearch(base.currentSearch, true); DoAnimationClientRpc("alert"); PlaySoundClientRpc(0); ChangeSfxClipClientRpc(6); timeSinceAlerted = 0f; ChangeStateClientRpc(State.Alert); } break; case State.Alert: base.agent.angularSpeed = 0f; base.agent.speed = 0f; if (timeSinceAlerted > 1f) { ChangeStateClientRpc(State.Chase); } break; case State.Chase: base.agent.angularSpeed = 50f; base.agent.speed = Plugin.ShadowChaseSpeed.Value; if (!TargetClosestPlayerInAnyCase() || (Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) > 25f && !((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer).transform.position, 45f, 60, -1f, (Transform)null)) || Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) > 50f) { LogIfDebugBuild("Stop Target Player"); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ChangeStateClientRpc(State.Wander); ChangeSfxClipClientRpc(5); DoAnimationClientRpc("wander"); } else { ChasingPlayer(); } break; case State.Attack: base.agent.angularSpeed = 5f; base.agent.speed = 1f; break; default: LogIfDebugBuild("This Behavior State doesn't exist!"); break; } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void StopSfxClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2714114704u, val, (RpcDelivery)1); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2714114704u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureVoice.Stop(); } } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void ChangeSfxClipClientRpc(int clipNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1279912407u, val, (RpcDelivery)1); BytePacker.WriteValueBitPacked(val2, clipNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1279912407u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureSFX.clip = audioClips[clipNum]; base.creatureSFX.Play(); } } } private bool FoundClosestPlayerInRange(float range, float senseRange) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).TargetClosestPlayer(1.5f, true, 70f, false, false, true); return (Object)(object)base.targetPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < range; } private bool TargetClosestPlayerInAnyCase() { //IL_001f: 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) base.mostOptimalDistance = 2000f; base.targetPlayer = null; for (int i = 0; i < StartOfRound.Instance.connectedPlayersAmount + 1; i++) { base.tempDist = Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position); if (base.tempDist < base.mostOptimalDistance) { base.mostOptimalDistance = base.tempDist; base.targetPlayer = StartOfRound.Instance.allPlayerScripts[i]; } } if ((Object)(object)base.targetPlayer == (Object)null) { return false; } return true; } private void ChasingPlayer() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)base.targetPlayer == (Object)null) && ((NetworkBehaviour)this).IsOwner) { if (enemyRandom.Next(0, 1) == 0 && timeSinceAttacking > 1f && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < 4f) { ((MonoBehaviour)this).StartCoroutine(SwingAttack()); } else { StalkPos = ((Component)base.targetPlayer).transform.position - ((Component)this).transform.forward * 2f; } ((EnemyAI)this).SetDestinationToPosition(StalkPos, false); } } private IEnumerator SwingAttack() { timeSinceAttacking = 0f; ChangeStateClientRpc(State.Attack); PlaySoundClientRpc(1); yield return (object)new WaitForSeconds(0.5f); if (!base.isEnemyDead) { DoAnimationClientRpc("startAttack"); yield return (object)new WaitForSeconds(0.3f); SwingAttackHitServerRpc(); if (stateType == State.Attack) { ChangeStateClientRpc(State.Chase); } } } public override void OnCollideWithPlayer(Collider other) { } public override void HitEnemy(int force = 1, PlayerControllerB? playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (base.isEnemyDead) { return; } base.enemyHP -= force; PlaySoundClientRpc(2); if (!((NetworkBehaviour)this).IsOwner) { return; } if (base.enemyHP <= 0 && !base.isEnemyDead) { DeathServerRpc(); ((MonoBehaviour)this).StopCoroutine(SwingAttack()); if (base.searchCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.searchCoroutine); } ((EnemyAI)this).KillEnemyOnOwnerClient(false); } else { ((MonoBehaviour)this).StartCoroutine(TakeDamage()); } } public override void KillEnemy(bool destroy = false) { Plugin.Log.LogError((object)"HAAH FUCK YOU!!"); ((EnemyAI)this).KillEnemy(destroy); } [ServerRpc] public void DeathServerRpc() { //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_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3079537280u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3079537280u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; int index = Random.Range(0, possibleDrops.Count); GameObject val3 = Object.Instantiate(possibleDrops[index], ((Component)turnCompass).transform.position, ((Component)this).transform.rotation); if ((Object)(object)val3 != (Object)null) { val3.GetComponent().Spawn(false); val3.GetComponent().tarotRarity = 4; } DeathClientRpc(); } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void DeathClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1994894814u, val, (RpcDelivery)1); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1994894814u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(DeathCoroutine()); } } } public IEnumerator DeathCoroutine() { base.creatureVoice.PlayOneShot(audioClips[3]); base.creatureSFX.Stop(); deathParticles.Play(); List materialList = new List(); float duration = 0f; SkinnedMeshRenderer[] skinnedMeshRenderers = base.skinnedMeshRenderers; foreach (SkinnedMeshRenderer renderer in skinnedMeshRenderers) { Material[] materials = ((Renderer)renderer).materials; foreach (Material material in materials) { materialList.Add(material); } } while (duration < 1f) { foreach (Material material2 in materialList) { material2.SetFloat("_DissolveAmount", duration); } duration += Time.deltaTime / 3f; yield return null; } foreach (Material material3 in materialList) { material3.SetFloat("_DissolveAmount", 1f); } } private IEnumerator TakeDamage() { DoAnimationClientRpc("takeDamage"); yield return (object)new WaitForSeconds(1f); if (base.currentBehaviourStateIndex == 0) { DoAnimationClientRpc("stopChase"); } else { DoAnimationClientRpc("alert"); } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void DoAnimationClientRpc(string animationName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(712613286u, val, (RpcDelivery)1); bool flag = animationName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(animationName, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 712613286u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LogIfDebugBuild("Animation: " + animationName); base.creatureAnimator.SetTrigger(animationName); } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void PlaySoundClientRpc(int index) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(998251388u, val, (RpcDelivery)1); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 998251388u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureVoice.PlayOneShot(audioClips[index]); } } } [ClientRpc] public void ChangeStateClientRpc(State state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3647296370u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForEnums)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3647296370u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stateType = state; } } } [ServerRpc] public void SwingAttackHitServerRpc() { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3727584352u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3727584352u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DamagePlayerClientRpc(); } } [ClientRpc] public void DamagePlayerClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2490172600u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2490172600u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; int num = 8; Collider[] array = Physics.OverlapBox(attackArea.position, attackArea.lossyScale, Quaternion.identity, num, (QueryTriggerInteraction)1); if (array.Length == 0) { return; } if (((NetworkBehaviour)this).IsServer) { PlaySoundClientRpc(4); } Collider[] array2 = array; foreach (Collider val3 in array2) { if (!((Object)(object)((Component)val3).GetComponent() != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { ((Component)val3).GetComponent().DamagePlayer(Plugin.ShadowSlashDamage.Value, true, true, (CauseOfDeath)6, 0, false, default(Vector3)); } } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2714114704u, new RpcReceiveHandler(__rpc_handler_2714114704), "StopSfxClientRpc"); ((NetworkBehaviour)this).__registerRpc(1279912407u, new RpcReceiveHandler(__rpc_handler_1279912407), "ChangeSfxClipClientRpc"); ((NetworkBehaviour)this).__registerRpc(3079537280u, new RpcReceiveHandler(__rpc_handler_3079537280), "DeathServerRpc"); ((NetworkBehaviour)this).__registerRpc(1994894814u, new RpcReceiveHandler(__rpc_handler_1994894814), "DeathClientRpc"); ((NetworkBehaviour)this).__registerRpc(712613286u, new RpcReceiveHandler(__rpc_handler_712613286), "DoAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(998251388u, new RpcReceiveHandler(__rpc_handler_998251388), "PlaySoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(3647296370u, new RpcReceiveHandler(__rpc_handler_3647296370), "ChangeStateClientRpc"); ((NetworkBehaviour)this).__registerRpc(3727584352u, new RpcReceiveHandler(__rpc_handler_3727584352), "SwingAttackHitServerRpc"); ((NetworkBehaviour)this).__registerRpc(2490172600u, new RpcReceiveHandler(__rpc_handler_2490172600), "DamagePlayerClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_2714114704(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; ((NormalShadowAI)(object)target).StopSfxClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1279912407(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 clipNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((NormalShadowAI)(object)target).ChangeSfxClipClientRpc(clipNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3079537280(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; ((NormalShadowAI)(object)target).DeathServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1994894814(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; ((NormalShadowAI)(object)target).DeathClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_712613286(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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string animationName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationName, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((NormalShadowAI)(object)target).DoAnimationClientRpc(animationName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_998251388(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 index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); target.__rpc_exec_stage = (__RpcExecStage)1; ((NormalShadowAI)(object)target).PlaySoundClientRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3647296370(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { State state = default(State); ((FastBufferReader)(ref reader)).ReadValueSafe(ref state, default(ForEnums)); target.__rpc_exec_stage = (__RpcExecStage)1; ((NormalShadowAI)(object)target).ChangeStateClientRpc(state); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3727584352(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; ((NormalShadowAI)(object)target).SwingAttackHitServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2490172600(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; ((NormalShadowAI)(object)target).DamagePlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "NormalShadowAI"; } } public class NormalTeleport : MonoBehaviour { [SerializeField] private Transform telePoint; public void Teleport() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) GameNetworkManager.Instance.localPlayerController.TeleportPlayer(telePoint.position, false, 0f, false, true); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.github.Teaisnt.Tartarus", "Tartarus", "1.3.0")] public class Plugin : BaseUnityPlugin { [HarmonyPatch(typeof(HangarShipDoor))] internal class HangarShipDoorPatch : NetworkBehaviour { [HarmonyPatch(typeof(HangarShipDoor), "SetDoorOpen")] [HarmonyPostfix] public static void OpenDoorPatch(HangarShipDoor __instance) { if ((Object)(object)TartarusInteriorController.Instance != (Object)null) { TartarusInteriorNetworkController.Instance.SetScrapToChestsServerRpc(); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "HangarShipDoorPatch"; } } internal static int moonEntryPlayCount = 0; internal static int velvetRoomEntryPlayCount = 0; public const string ModGUID = "Tartarus"; internal static readonly Harmony Harmony = new Harmony("Tartarus"); public const string Id = "com.github.Teaisnt.Tartarus"; internal static ConfigEntry TartarusMoonEntryAnimation { get; private set; } internal static ConfigEntry TartarusMoonEntryAnimationPlayCount { get; private set; } internal static ConfigEntry VelvetRoomEntryAnimation { get; private set; } internal static ConfigEntry VelvetRoomScrapValueMultiplier { get; private set; } internal static ConfigEntry VelvetRoomLightBrightness { get; private set; } internal static ConfigEntry TarotSpawnChance { get; private set; } internal static ConfigEntry WorldTarotSpawnChance { get; private set; } internal static ConfigEntry ReaperGunDamage { get; private set; } internal static ConfigEntry ReaperBashDamage { get; private set; } internal static ConfigEntry ReaperMaxBullets { get; private set; } internal static ConfigEntry ReaperWanderSpeed { get; private set; } internal static ConfigEntry ReaperStalkingSpeed { get; private set; } internal static ConfigEntry ReaperRewardValue { get; private set; } internal static ConfigEntry ShadowSlashDamage { get; private set; } internal static ConfigEntry ShadowWanderSpeed { get; private set; } internal static ConfigEntry ShadowChaseSpeed { get; private set; } internal static ConfigEntry WealthHandWanderSpeed { get; private set; } internal static ConfigEntry WealthHandFleeSpeed { get; private set; } internal static ConfigEntry WealthHandRewardRarity { get; private set; } internal static ConfigEntry MusicMaxVolume { get; private set; } internal static ConfigEntry MusicEnabled { get; private set; } internal static ManualLogSource Log { get; private set; } = null; public static string Name => "Tartarus"; public static string Version => "1.3.0"; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; Log.LogDebug((object)"Thank you for trying out Tartarus! I sincerely hope you enjoy the mod :) -Teaisnt"); BindConfigs(); Harmony.PatchAll(); NetcodePatch(); } private void BindConfigs() { //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Expected O, but got Unknown TartarusMoonEntryAnimation = ((BaseUnityPlugin)this).Config.Bind("Animations", "Enable Tartarus Moon Entry Animation", true, "Toggles whether or not the animation for landing on Tartarus plays."); TartarusMoonEntryAnimationPlayCount = ((BaseUnityPlugin)this).Config.Bind("Animations", "Times Tartarus Moon Entry Animation plays per session", 1, "Configure how many times animation for landing on Tartarus can play consecutively per session. (Only works if animation is Enabled)"); VelvetRoomEntryAnimation = ((BaseUnityPlugin)this).Config.Bind("Animations", "Enable velvet room Entry Animation", true, "Toggles whether or not the animation for entering the Velvet Room plays."); VelvetRoomScrapValueMultiplier = ((BaseUnityPlugin)this).Config.Bind("Velvet Room", "Velvet room scrap value multiplier", 1f, "Configure how much to multiply the value of scrap traded in the Velvet Room (1.0 is default, 0.5 would be half value, and 2.0 would be double)"); VelvetRoomLightBrightness = ((BaseUnityPlugin)this).Config.Bind("Velvet Room", "Velvet room light brightness", 45f, "Controls how bright the massive light in the Velvet Room is"); TarotSpawnChance = ((BaseUnityPlugin)this).Config.Bind("Tarot Cards", "Tarot card spawn chance", 30, new ConfigDescription("Configure the spawn chance in % of a Tarot Card from breaking a Breakable Object. (0% - 100%", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); WorldTarotSpawnChance = ((BaseUnityPlugin)this).Config.Bind("Tarot Cards", "World tarot card spawn chance", 1, new ConfigDescription("Configure the spawn chance in % of a Tarot Card from the 6th block being the World tarot. (0% - 100%", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); ReaperGunDamage = ((BaseUnityPlugin)this).Config.Bind("The Reaper Options", "The Reaper gun damage", 3, "Configure the amount of damage dealt by each shot from The Reaper"); ReaperBashDamage = ((BaseUnityPlugin)this).Config.Bind("The Reaper Options", "The Reapers bash damage", 25, "Configure the amount of damage dealt by the bash attack from The Reaper"); ReaperMaxBullets = ((BaseUnityPlugin)this).Config.Bind("The Reaper Options", "The reaper bullet count", 6, "Configure the amount of bullets The Reaper can have when fully reloaded (WARNING: Animation/sound effect is designed to work around having 6 bullets, experiment with caution)"); ReaperWanderSpeed = ((BaseUnityPlugin)this).Config.Bind("The Reaper Options", "The Reaper wander speed", 3, "Configure how fast The Reaper moves while wandering."); ReaperStalkingSpeed = ((BaseUnityPlugin)this).Config.Bind("The Reaper Options", "The Reaper stalk speed", 5, "Configure how fast The Reaper moves while stalking players."); ReaperRewardValue = ((BaseUnityPlugin)this).Config.Bind("The Reaper Options", "Reaper reward value", 500, "Configure the value of the reward for killing The Reaper."); ShadowSlashDamage = ((BaseUnityPlugin)this).Config.Bind("Normal Shadow Options", "Normal Shadow slash damage", 5, "Configure the amount of damage dealt by the slash attack from Normal Shadows"); ShadowWanderSpeed = ((BaseUnityPlugin)this).Config.Bind("Normal Shadow Options", "Normal Shadow wander speed", 3, "Configure how fast Normal Shadows move when wandering."); ShadowChaseSpeed = ((BaseUnityPlugin)this).Config.Bind("Normal Shadow Options", "Normal Shadow chase speed", 7, "Configure how fast Normal Shadows move when chasing players."); WealthHandWanderSpeed = ((BaseUnityPlugin)this).Config.Bind("Wealth Hand Options", "Wealth Hand wander speed", 2, "Configure how fast Wealth Hands move when wandering."); WealthHandFleeSpeed = ((BaseUnityPlugin)this).Config.Bind("Wealth Hand Options", "Wealth Hand flee speed", 9, "Configure how fast Wealth Hands move when fleeing."); WealthHandRewardRarity = ((BaseUnityPlugin)this).Config.Bind("Wealth Hand Options", "Wealth Hand reward rarity", 10, "Configure how expensive the tarots Wealth Hands drop are when exchanged."); MusicEnabled = ((BaseUnityPlugin)this).Config.Bind("Music", "Enable music", true, "Configure whether music plays in the interior of Tartarus."); MusicMaxVolume = ((BaseUnityPlugin)this).Config.Bind("Music", "Max volume of songs", 0.15f, new ConfigDescription("Configure how loud each song will be when playing at max volume. Not recommended to set that high but if you want to lose your ears then go for it.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); } private void NetcodePatch() { try { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } catch { Log.LogError((object)"NetcodePatcher Failed! This Is Very Bad."); } } } public class PurpleIdol : GrabbableObject { private bool activated = false; [SerializeField] private Animator animator; [SerializeField] private AudioClip pickupSound; [SerializeField] private AudioSource pickupSource; public override void Start() { ((GrabbableObject)this).Start(); } public override void Update() { ((GrabbableObject)this).Update(); if (base.hasBeenHeld && !activated) { activated = true; pickupSource.PlayOneShot(pickupSound); animator.SetTrigger("Activate"); } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "PurpleIdol"; } } internal class ReaperEnemyAI : EnemyAI { public enum State { SearchingForPlayer, StickingInFrontOfPlayer, SwingAttackInProgress, GunAttackInProgress } public GrabbableObject reaperEyePrefab; public List audioClips = new List(); public Transform turnCompass = null; public Transform attackArea = null; public Transform leftGunAttackPoint; public Transform rightGunAttackPoint; public ParticleSystem leftGunFlare; public ParticleSystem rightGunFlare; public ParticleSystem deathParticles; public ParticleSystem redAuraParticles; public LayerMask bulletLayerMask; public TrailRenderer bulletLeft; public TrailRenderer bulletRight; public float bullets = 6f; public float searchMoveSpeed; public float stalkMoveSpeed; public float timeBeforeShooting; public float timeBeforePlayingShootSound; public float timeBetweenShots; public float bulletAimOffsetY; public float bulletAimCrouchOffsetY; public float swingDistance; private float timeSinceHittingLocalPlayer; private float timeSinceNewRandPos; private float timeSinceShooting; private float timeSinceSwinging; private float timeSinceAttacking; private Vector3 positionRandomness; private Vector3 StalkPos; private Random enemyRandom = null; private bool isDeadAnimationDone; [Header("State")] public State stateType; [Conditional("DEBUG")] private void LogIfDebugBuild(string text) { } public override void Start() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); LogIfDebugBuild("Example Enemy Spawned"); timeSinceHittingLocalPlayer = 0f; base.creatureAnimator.SetTrigger("startWalk"); timeSinceNewRandPos = 0f; positionRandomness = new Vector3(0f, 0f, 0f); enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex); isDeadAnimationDone = false; base.currentBehaviourStateIndex = 0; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); bullets = Plugin.ReaperMaxBullets.Value; } public override void Update() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead) { if (!isDeadAnimationDone) { LogIfDebugBuild("Stopping enemy voice with janky code."); isDeadAnimationDone = true; base.creatureVoice.Stop(); base.creatureVoice.PlayOneShot(base.dieSFX); } return; } timeSinceAttacking += Time.deltaTime; timeSinceShooting += Time.deltaTime; timeSinceSwinging += Time.deltaTime; timeSinceHittingLocalPlayer += Time.deltaTime; timeSinceNewRandPos += Time.deltaTime; if ((Object)(object)base.targetPlayer != (Object)null && (stateType == State.StickingInFrontOfPlayer || stateType == State.SwingAttackInProgress || stateType == State.GunAttackInProgress)) { turnCompass.LookAt(((Component)base.targetPlayer.gameplayCamera).transform.position); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(new Vector3(0f, turnCompass.eulerAngles.y, 0f)), 4f * Time.deltaTime); } if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } if (timeSinceShooting > 5f && timeSinceAttacking > 2f && stateType == State.StickingInFrontOfPlayer) { bullets = Plugin.ReaperMaxBullets.Value; } } public override void DoAIInterval() { //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } switch (stateType) { case State.SearchingForPlayer: base.agent.speed = Plugin.ReaperWanderSpeed.Value; if (FoundClosestPlayerInRange(25f, 7f)) { ((EnemyAI)this).StopSearch(base.currentSearch, true); ChangeStateClientRpc(State.StickingInFrontOfPlayer); DoAnimationClientRpc("startWalk"); } break; case State.StickingInFrontOfPlayer: base.agent.speed = Plugin.ReaperStalkingSpeed.Value; if (!TargetClosestPlayerInAnyCase() || (Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) > 20f && !((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer).transform.position, 45f, 60, -1f, (Transform)null))) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ChangeStateClientRpc(State.SearchingForPlayer); DoAnimationClientRpc("startWalk"); } else if (Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < swingDistance) { ((MonoBehaviour)this).StartCoroutine(SwingAttack()); ChangeStateClientRpc(State.SwingAttackInProgress); } else { StickingInFrontOfPlayer(); } break; case State.GunAttackInProgress: base.agent.speed = 1f; break; case State.SwingAttackInProgress: base.agent.speed = 0f; break; default: LogIfDebugBuild("This Behavior State doesn't exist!"); break; } } private bool FoundClosestPlayerInRange(float range, float senseRange) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).TargetClosestPlayer(1.5f, true, 70f, false, false, true); if ((Object)(object)base.targetPlayer == (Object)null) { ((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f, false, false, true); range = senseRange; } return (Object)(object)base.targetPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < range; } private bool TargetClosestPlayerInAnyCase() { //IL_001f: 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) base.mostOptimalDistance = 2000f; base.targetPlayer = null; for (int i = 0; i < StartOfRound.Instance.connectedPlayersAmount + 1; i++) { base.tempDist = Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position); if (base.tempDist < base.mostOptimalDistance) { base.mostOptimalDistance = base.tempDist; base.targetPlayer = StartOfRound.Instance.allPlayerScripts[i]; } } if ((Object)(object)base.targetPlayer == (Object)null) { return false; } return true; } private void StickingInFrontOfPlayer() { //IL_009a: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)base.targetPlayer == (Object)null) && ((NetworkBehaviour)this).IsOwner) { if (enemyRandom.Next(0, 3) == 0 && timeSinceShooting > 3f && timeSinceAttacking > 1f && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) > 10f) { ((MonoBehaviour)this).StartCoroutine(GunAttack()); } else { StalkPos = ((Component)base.targetPlayer).transform.position - ((Component)this).transform.forward * 3f; } ((EnemyAI)this).SetDestinationToPosition(StalkPos, false); } } private IEnumerator SwingAttack() { timeSinceAttacking = 0f; timeSinceSwinging = 0f; StalkPos = ((Component)base.targetPlayer).transform.position - ((Component)this).transform.forward * 1f; ((EnemyAI)this).SetDestinationToPosition(StalkPos, false); yield return (object)new WaitForSeconds(0.5f); if (base.isEnemyDead) { yield break; } DoAnimationClientRpc("startSwing"); PlaySoundClientRpc(1); yield return (object)new WaitForSeconds(1f); if (!base.isEnemyDead) { SwingAttackHitServerRpc(); if (stateType == State.SwingAttackInProgress) { ChangeStateClientRpc(State.StickingInFrontOfPlayer); } } } private IEnumerator GunAttack() { timeSinceAttacking = 0f; timeSinceShooting = 0f; ChangeStateClientRpc(State.GunAttackInProgress); DoAnimationClientRpc("startShoot"); yield return (object)new WaitForSeconds(timeBeforePlayingShootSound); PlaySoundClientRpc(0); yield return (object)new WaitForSeconds(timeBeforeShooting); ShootAttackHitServerRpc(); } public override void HitEnemy(int force = 1, PlayerControllerB? playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (base.isEnemyDead) { return; } base.enemyHP -= force; PlaySoundClientRpc(2); if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead) { DeathServerRpc(); ((MonoBehaviour)this).StopCoroutine(GunAttack()); ((MonoBehaviour)this).StopCoroutine(SwingAttack()); if (base.searchCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.searchCoroutine); } ((EnemyAI)this).KillEnemyOnOwnerClient(false); } else if (stateType == State.SearchingForPlayer || stateType == State.StickingInFrontOfPlayer) { DoAnimationClientRpc("takeDamage"); } } [ServerRpc] public void DeathServerRpc() { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1737436176u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1737436176u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DeathClientRpc(); } } [ClientRpc] public void SpawnItemClientRpc(int scrapValueSpawned, NetworkObjectReference objectSpawned) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(384698229u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, scrapValueSpawned); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref objectSpawned, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 384698229u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); ((NetworkObjectReference)(ref objectSpawned)).TryGet(ref val3, (NetworkManager)null); ((Component)val3).GetComponent().SetScrapValue(scrapValueSpawned); RoundManager instance = RoundManager.Instance; instance.totalScrapValueInLevel += (float)scrapValueSpawned; } } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void DeathClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(378781640u, val, (RpcDelivery)1); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 378781640u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(DeathCoroutine()); ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { }, 0.7f, delegate { //IL_0012: 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_004d: Unknown result type (might be due to invalid IL or missing references) GameObject val3 = Object.Instantiate(((Component)reaperEyePrefab).gameObject, base.eye.position, ((Component)this).transform.rotation); if ((Object)(object)val3 != (Object)null) { val3.GetComponent().Spawn(false); SpawnItemClientRpc(Plugin.ReaperRewardValue.Value, NetworkObjectReference.op_Implicit(val3)); } })); } public IEnumerator DeathCoroutine() { base.creatureVoice.PlayOneShot(base.dieSFX); redAuraParticles.Stop(); deathParticles.Play(); List materialList = new List(); float duration = 0f; SkinnedMeshRenderer[] skinnedMeshRenderers = base.skinnedMeshRenderers; foreach (SkinnedMeshRenderer renderer in skinnedMeshRenderers) { Material[] materials = ((Renderer)renderer).materials; foreach (Material material in materials) { materialList.Add(material); } } while (duration < 1f) { foreach (Material material2 in materialList) { material2.SetFloat("_DissolveAmount", duration); } duration += Time.deltaTime / 3f; yield return null; } foreach (Material material3 in materialList) { material3.SetFloat("_DissolveAmount", 1f); } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void PlaySoundClientRpc(int index) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(628847326u, val, (RpcDelivery)1); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 628847326u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureSFX.PlayOneShot(audioClips[index]); } } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void DoAnimationClientRpc(string animationName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3694848120u, val, (RpcDelivery)1); bool flag = animationName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(animationName, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3694848120u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LogIfDebugBuild("Animation: " + animationName); base.creatureAnimator.SetTrigger(animationName); } } [ClientRpc] public void ChangeStateClientRpc(State state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2145747752u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForEnums)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2145747752u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stateType = state; } } } [ServerRpc] public void SwingAttackHitServerRpc() { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4057042274u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4057042274u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DamagePlayerClientRpc(); } } [ClientRpc] public void DamagePlayerClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4142847681u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4142847681u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; timeSinceHittingLocalPlayer = 0f; int num = 8; Collider[] array = Physics.OverlapBox(attackArea.position, attackArea.lossyScale, Quaternion.identity, num, (QueryTriggerInteraction)1); if (array.Length == 0) { return; } if (((NetworkBehaviour)this).IsServer) { PlaySoundClientRpc(3); } Collider[] array2 = array; foreach (Collider val3 in array2) { if (!((Object)(object)((Component)val3).GetComponent() != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { PlayerControllerB val4 = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(val3, false, false); val4.externalForceAutoFade = Vector3.zero; val4.DamagePlayer(Plugin.ReaperBashDamage.Value, true, true, (CauseOfDeath)1, 0, false, Vector3.Normalize(((Component)val4.gameplayCamera).transform.position - ((Component)this).transform.position) * 150f / Vector3.Distance(((Component)val4.gameplayCamera).transform.position, ((Component)this).transform.position)); val4.externalForceAutoFade += Vector3.Normalize(((Component)val4).transform.position - ((Component)this).transform.position + Vector3.up) * 90f / Vector3.Distance(((Component)val4.gameplayCamera).transform.position, ((Component)this).transform.position); HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } } } [ServerRpc] public void ShootAttackHitServerRpc() { //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 //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2982501201u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2982501201u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!(bullets > 0f)) { return; } bullets -= 1f; if ((Object)(object)base.targetPlayer != (Object)null) { Vector3 position = ((Component)base.targetPlayer).transform.position; if (base.targetPlayer.isCrouching) { position.y += bulletAimCrouchOffsetY; } position.y += bulletAimOffsetY; Transform val3 = leftGunAttackPoint; if (bullets % 2f != 0f) { val3 = rightGunAttackPoint; } GunFlareClientRpc(); RaycastHit val4 = default(RaycastHit); if (Physics.Linecast(val3.position, position, ref val4, ((LayerMask)(ref bulletLayerMask)).value)) { if (((Component)((RaycastHit)(ref val4)).collider).gameObject.layer == LayerMask.NameToLayer("MapHazards")) { BreakableObject breakableObject = default(BreakableObject); Turret val5 = default(Turret); Landmine val6 = default(Landmine); if (((Component)((RaycastHit)(ref val4)).collider).gameObject.TryGetComponent(ref breakableObject)) { ((Component)breakableObject).GetComponent().Hit(1, Vector3.forward, (PlayerControllerB)null, false, -1); } else if (((Component)((RaycastHit)(ref val4)).collider).gameObject.TryGetComponent(ref val5)) { ((Component)val5).GetComponent().Hit(1, Vector3.forward, (PlayerControllerB)null, false, -1); } else if (((Component)((RaycastHit)(ref val4)).collider).gameObject.TryGetComponent(ref val6)) { ((Component)val6).GetComponent().Hit(1, Vector3.forward, (PlayerControllerB)null, false, -1); } } BulletTrailClientRpc(((RaycastHit)(ref val4)).point); } else { BulletTrailClientRpc(val3.position + ((Component)this).transform.forward * 100f); } RaycastHit val7 = default(RaycastHit); if (Physics.Linecast(val3.position, position, ref val7, ((LayerMask)(ref bulletLayerMask)).value) && (Object)(object)base.targetPlayer != (Object)null && ((Component)((RaycastHit)(ref val7)).transform).gameObject.CompareTag("Player")) { LogIfDebugBuild("Bullet hit player!"); timeSinceHittingLocalPlayer = 0f; DamagePlayerClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)base.targetPlayer), NetworkObjectReference.op_Implicit(((Component)((RaycastHit)(ref val7)).transform).gameObject)); } } if (bullets > 0f) { ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { }, timeBetweenShots, delegate { ShootAttackHitServerRpc(); })); } else if (stateType == State.GunAttackInProgress) { stateType = State.StickingInFrontOfPlayer; bullets = Plugin.ReaperMaxBullets.Value; } } [ClientRpc] public void DamagePlayerClientRpc(NetworkBehaviourReference playerRef, NetworkObjectReference hit2Ref) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3335473391u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref hit2Ref, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3335473391u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = default(PlayerControllerB); ((NetworkBehaviourReference)(ref playerRef)).TryGet(ref val3, (NetworkManager)null); NetworkObject val4 = default(NetworkObject); ((NetworkObjectReference)(ref hit2Ref)).TryGet(ref val4, (NetworkManager)null); if ((Object)(object)val3 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { val3.externalForceAutoFade = Vector3.zero; val3.DamagePlayer(Plugin.ReaperGunDamage.Value, true, true, (CauseOfDeath)7, 0, false, Vector3.Normalize(((Component)val3.gameplayCamera).transform.position - ((Component)this).transform.position) * 60f / Vector3.Distance(((Component)val3.gameplayCamera).transform.position, ((Component)this).transform.position)); PlayerControllerB obj = val3; obj.externalForceAutoFade += Vector3.Normalize(((Component)val3).transform.position - ((Component)this).transform.position + Vector3.up) * 32f / Vector3.Distance(((Component)val3.gameplayCamera).transform.position, ((Component)this).transform.position); } } } [ClientRpc] public void BulletTrailClientRpc(Vector3 HitPoint) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4092308411u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref HitPoint); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4092308411u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(BulletTrail(HitPoint)); } } } private IEnumerator BulletTrail(Vector3 HitPoint) { //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) TrailRenderer trail = ((bullets % 2f == 0f) ? bulletLeft : bulletRight); Vector3 startPosition = ((bullets % 2f == 0f) ? leftGunAttackPoint.position : rightGunAttackPoint.position); ((Component)trail).transform.position = startPosition; float distance = Vector3.Distance(((Component)trail).transform.position, HitPoint); float remainingDistance = distance; ((Component)trail).gameObject.SetActive(true); while (remainingDistance > 0f) { ((Component)trail).transform.position = Vector3.Lerp(startPosition, HitPoint, 1f - remainingDistance / distance); remainingDistance -= 150f * Time.deltaTime; yield return null; } ((Component)trail).transform.position = HitPoint; ((Component)trail).gameObject.SetActive(false); } [ClientRpc] public void GunFlareClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1091347549u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1091347549u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (bullets % 2f == 0f) { leftGunFlare.Play(); } else { rightGunFlare.Play(); } } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1737436176u, new RpcReceiveHandler(__rpc_handler_1737436176), "DeathServerRpc"); ((NetworkBehaviour)this).__registerRpc(384698229u, new RpcReceiveHandler(__rpc_handler_384698229), "SpawnItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(378781640u, new RpcReceiveHandler(__rpc_handler_378781640), "DeathClientRpc"); ((NetworkBehaviour)this).__registerRpc(628847326u, new RpcReceiveHandler(__rpc_handler_628847326), "PlaySoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(3694848120u, new RpcReceiveHandler(__rpc_handler_3694848120), "DoAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(2145747752u, new RpcReceiveHandler(__rpc_handler_2145747752), "ChangeStateClientRpc"); ((NetworkBehaviour)this).__registerRpc(4057042274u, new RpcReceiveHandler(__rpc_handler_4057042274), "SwingAttackHitServerRpc"); ((NetworkBehaviour)this).__registerRpc(4142847681u, new RpcReceiveHandler(__rpc_handler_4142847681), "DamagePlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2982501201u, new RpcReceiveHandler(__rpc_handler_2982501201), "ShootAttackHitServerRpc"); ((NetworkBehaviour)this).__registerRpc(3335473391u, new RpcReceiveHandler(__rpc_handler_3335473391), "DamagePlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(4092308411u, new RpcReceiveHandler(__rpc_handler_4092308411), "BulletTrailClientRpc"); ((NetworkBehaviour)this).__registerRpc(1091347549u, new RpcReceiveHandler(__rpc_handler_1091347549), "GunFlareClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1737436176(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; ((ReaperEnemyAI)(object)target).DeathServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_384698229(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int scrapValueSpawned = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref scrapValueSpawned); NetworkObjectReference objectSpawned = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref objectSpawned, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ReaperEnemyAI)(object)target).SpawnItemClientRpc(scrapValueSpawned, objectSpawned); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_378781640(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; ((ReaperEnemyAI)(object)target).DeathClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_628847326(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 index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); target.__rpc_exec_stage = (__RpcExecStage)1; ((ReaperEnemyAI)(object)target).PlaySoundClientRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3694848120(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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string animationName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationName, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((ReaperEnemyAI)(object)target).DoAnimationClientRpc(animationName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2145747752(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { State state = default(State); ((FastBufferReader)(ref reader)).ReadValueSafe(ref state, default(ForEnums)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ReaperEnemyAI)(object)target).ChangeStateClientRpc(state); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4057042274(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; ((ReaperEnemyAI)(object)target).SwingAttackHitServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4142847681(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; ((ReaperEnemyAI)(object)target).DamagePlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2982501201(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; ((ReaperEnemyAI)(object)target).ShootAttackHitServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3335473391(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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(ref playerRef, default(ForNetworkSerializable)); NetworkObjectReference hit2Ref = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hit2Ref, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ReaperEnemyAI)(object)target).DamagePlayerClientRpc(playerRef, hit2Ref); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4092308411(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 hitPoint = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hitPoint); target.__rpc_exec_stage = (__RpcExecStage)1; ((ReaperEnemyAI)(object)target).BulletTrailClientRpc(hitPoint); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1091347549(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; ((ReaperEnemyAI)(object)target).GunFlareClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ReaperEnemyAI"; } } public class RotateObject : MonoBehaviour { public Vector3 rotationVelocity; private void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.Rotate(rotationVelocity * Time.deltaTime, (Space)1); } } public class TarotCard : GrabbableObject { public int tarotRarity = 0; public GameObject tarotLight; private Vector3 rotationVelocity; public override void Start() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Start(); ((Component)this).transform.rotation = new Quaternion(0f, 0f, 0f, 0f); rotationVelocity = new Vector3(0f, 8f, 0f); } public override void Update() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); ((Component)this).transform.Rotate(rotationVelocity * Time.deltaTime, (Space)1); if (base.hasBeenHeld && rotationVelocity == new Vector3(0f, 8f, 0f)) { rotationVelocity = new Vector3(0f, 0f, 0f); tarotLight.SetActive(false); } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "TarotCard"; } } public class TartarusChestController : NetworkBehaviour { public bool isStoryLogChest = false; public GameObject storyLog; [SerializeField] private AudioSource audioSource; public Transform detectArea; private bool openingChest = false; [SerializeField] private Transform instantiatePosition; public GameObject objectToSpawn; private Item objectToSpawnItem; private int scrapValueSpawned; [SerializeField] private Animator animator; private void Start() { if (!isStoryLogChest) { TartarusInteriorNetworkController.Instance.chests.Add(((Component)this).gameObject); } } public void ChestConfirmedOpenable(GameObject prop) { GameObject prop2 = prop; ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { //IL_0061: 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_003a: Unknown result type (might be due to invalid IL or missing references) objectToSpawn = prop2; GrabbableObject val = default(GrabbableObject); if (objectToSpawn.TryGetComponent(ref val)) { val.targetFloorPosition = instantiatePosition.position; scrapValueSpawned = val.scrapValue; } objectToSpawn.transform.rotation = Quaternion.identity; }, 1f, delegate { prop2.gameObject.SetActive(false); })); } public void OpenChest() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) if (openingChest) { return; } if (isStoryLogChest) { OpenStoryLogChestServerRpc(); return; } if ((Object)(object)objectToSpawn == (Object)null) { Debug.LogError((object)"Tartarus (TartarusChestController) Error: Object to spawn is NULL. Please report this!"); } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; OpenChestServerRpc(new NetworkBehaviourReference((NetworkBehaviour)(object)localPlayerController)); } [ServerRpc(RequireOwnership = false)] public void OpenStoryLogChestServerRpc() { //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(2517278691u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2517278691u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; OpenStoryLogChestClientRpc(); } } } [ClientRpc] public void OpenStoryLogChestClientRpc() { //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(3848002956u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3848002956u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { animator.SetTrigger("OpenChest"); openingChest = true; audioSource.Play(); }, 0.4f, delegate { storyLog.SetActive(true); openingChest = false; })); } } [ServerRpc(RequireOwnership = false)] public void OpenChestServerRpc(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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) 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(1569040177u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1569040177u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SpawnItemClientRpc(playerRef, NetworkObjectReference.op_Implicit(objectToSpawn)); } } } [ClientRpc] public void SpawnItemClientRpc(NetworkBehaviourReference playerRef, NetworkObjectReference objectSpawned) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1824071035u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref objectSpawned, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1824071035u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; NetworkBehaviourReference playerRef2 = playerRef; ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { animator.SetTrigger("OpenChest"); openingChest = true; audioSource.Play(); }, 0.4f, delegate { List list = new List(RoundManager.Instance.currentLevel.spawnableScrap.Count); for (int i = 0; i < RoundManager.Instance.currentLevel.spawnableScrap.Count; i++) { if (RoundManager.Instance.currentLevel.spawnableScrap[i].spawnableItem.itemId == 152767) { list.Add(0); } else { list.Add(RoundManager.Instance.currentLevel.spawnableScrap[i].rarity); } } PlayerControllerB val3 = default(PlayerControllerB); ((NetworkBehaviourReference)(ref playerRef2)).TryGet(ref val3, (NetworkManager)null); Transform val4 = ((((!((Object)(object)val3 != (Object)null) || !val3.isInElevator) && !StartOfRound.Instance.inShipPhase) || !((Object)(object)RoundManager.Instance.spawnedScrapContainer != (Object)null)) ? StartOfRound.Instance.elevatorTransform : RoundManager.Instance.spawnedScrapContainer); objectToSpawn.SetActive(true); openingChest = 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(2517278691u, new RpcReceiveHandler(__rpc_handler_2517278691), "OpenStoryLogChestServerRpc"); ((NetworkBehaviour)this).__registerRpc(3848002956u, new RpcReceiveHandler(__rpc_handler_3848002956), "OpenStoryLogChestClientRpc"); ((NetworkBehaviour)this).__registerRpc(1569040177u, new RpcReceiveHandler(__rpc_handler_1569040177), "OpenChestServerRpc"); ((NetworkBehaviour)this).__registerRpc(1824071035u, new RpcReceiveHandler(__rpc_handler_1824071035), "SpawnItemClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2517278691(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; ((TartarusChestController)(object)target).OpenStoryLogChestServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3848002956(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; ((TartarusChestController)(object)target).OpenStoryLogChestClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1569040177(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(ref playerRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((TartarusChestController)(object)target).OpenChestServerRpc(playerRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1824071035(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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(ref playerRef, default(ForNetworkSerializable)); NetworkObjectReference objectSpawned = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref objectSpawned, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((TartarusChestController)(object)target).SpawnItemClientRpc(playerRef, objectSpawned); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TartarusChestController"; } } public class TartarusInteriorController : MonoBehaviour { public bool inVelvetRoom = false; public Transform entranceTeleportPoint; [SerializeField] private AudioSource musicSource1; [SerializeField] private AudioSource musicSource2; public int currTartarusFloor = 0; public List tartarusSongs = new List(); [SerializeField] private AudioClip velvetRoomSong; private PlayerControllerB player; [SerializeField] private float fadeSourceSpeed; [SerializeField] private float songMaxVolume; private bool isPlayingSong1; private Coroutine fadeSourceCoroutine; public static TartarusInteriorController Instance { get; private set; } private void Awake() { Instance = this; } private void Start() { player = GameNetworkManager.Instance.localPlayerController; if (!Plugin.MusicEnabled.Value) { musicSource1.Stop(); musicSource2.Stop(); } musicSource1.volume = Plugin.MusicMaxVolume.Value; musicSource2.volume = Plugin.MusicMaxVolume.Value; } private void Update() { CheckIfStopSource(); } public void UpdateTartarusFloor(GameObject volume) { currTartarusFloor = volume.GetComponent().blockNum; if (Plugin.MusicEnabled.Value) { ChangeSong(tartarusSongs[currTartarusFloor]); } } private void CheckIfStopSource() { if (player.isPlayerDead && (Object)(object)player.spectatedPlayerScript != (Object)null) { if (isPlayingSong1) { if (player.spectatedPlayerScript.isInsideFactory && !musicSource1.isPlaying) { musicSource1.Play(); } else if (!player.spectatedPlayerScript.isInsideFactory && musicSource1.isPlaying) { musicSource1.Stop(); } } else if (player.spectatedPlayerScript.isInsideFactory && !musicSource2.isPlaying) { musicSource2.Play(); } else if (!player.spectatedPlayerScript.isInsideFactory && musicSource2.isPlaying) { musicSource2.Stop(); } } else if (isPlayingSong1) { if (player.isInsideFactory && !musicSource1.isPlaying) { musicSource1.Play(); } else if (!player.isInsideFactory && musicSource1.isPlaying) { musicSource1.Stop(); } } else if (player.isInsideFactory && !musicSource2.isPlaying) { musicSource2.Play(); } else if (!player.isInsideFactory && musicSource2.isPlaying) { musicSource2.Stop(); } } public void EnterVelvetRoom() { if (Plugin.MusicEnabled.Value) { ChangeSongToVelvetRoom(velvetRoomSong); } } public void ExitVelvetRoom() { if (Plugin.MusicEnabled.Value) { ChangeSong(tartarusSongs[currTartarusFloor]); } } public void ChangeSongToVelvetRoom(AudioClip newSong) { if (fadeSourceCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(fadeSourceCoroutine); } fadeSourceCoroutine = ((MonoBehaviour)this).StartCoroutine(FadeSource(newSong, 2f)); isPlayingSong1 = !isPlayingSong1; } public void ChangeSong(AudioClip newSong) { if (fadeSourceCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(fadeSourceCoroutine); } fadeSourceCoroutine = ((MonoBehaviour)this).StartCoroutine(FadeSource(newSong, 0f)); isPlayingSong1 = !isPlayingSong1; } private IEnumerator FadeSource(AudioClip newSong, float delayBeforeSwitching) { float timeToFade = fadeSourceSpeed + delayBeforeSwitching; float timeElapsed = 0f; if (isPlayingSong1) { musicSource2.clip = newSong; musicSource2.Play(); while (timeElapsed < timeToFade) { musicSource2.volume = Mathf.Lerp(0f, Plugin.MusicMaxVolume.Value, timeElapsed / timeToFade); musicSource1.volume = Mathf.Lerp(Plugin.MusicMaxVolume.Value, 0f, timeElapsed / timeToFade); timeElapsed += Time.deltaTime; yield return null; } musicSource2.volume = Plugin.MusicMaxVolume.Value; musicSource1.volume = 0f; } else { musicSource1.clip = newSong; musicSource1.Play(); while (timeElapsed < timeToFade) { musicSource2.volume = Mathf.Lerp(Plugin.MusicMaxVolume.Value, 0f, timeElapsed / timeToFade); musicSource1.volume = Mathf.Lerp(0f, Plugin.MusicMaxVolume.Value, timeElapsed / timeToFade); timeElapsed += Time.deltaTime; yield return null; } musicSource2.volume = 0f; musicSource1.volume = Plugin.MusicMaxVolume.Value; } } } public class TartarusInteriorNetworkController : NetworkBehaviour { public List scrapTakenByChests = new List(); public List chests = new List(); private bool hasSetScrap = false; public static TartarusInteriorNetworkController Instance { get; private set; } private void Awake() { Instance = this; } [ServerRpc] public void SetScrapToChestsServerRpc() { //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 //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2364718706u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2364718706u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (hasSetScrap || !((NetworkBehaviour)this).IsServer || chests.Count == 0) { return; } hasSetScrap = true; int num = 64; GrabbableObject val4 = default(GrabbableObject); foreach (GameObject chest in chests) { TartarusChestController component = chest.GetComponent(); Collider[] array = Physics.OverlapBox(component.detectArea.position, component.detectArea.localScale, Quaternion.identity, num); if (array.Length != 0 && (Object)(object)component.objectToSpawn == (Object)null) { Collider[] array2 = array; foreach (Collider val3 in array2) { if (!ScrapAlreadyTaken(((Component)val3).gameObject) && ((Component)val3).TryGetComponent(ref val4) && !(val4.itemProperties.itemName == "Bus Stop Sign")) { scrapTakenByChests.Add(((Component)val4).gameObject); SetScrapToChestsClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val4), NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)component)); break; } } } if ((Object)(object)component.objectToSpawn == (Object)null) { chest.SetActive(false); } } } [ClientRpc] public void SetScrapToChestsClientRpc(NetworkBehaviourReference prop, NetworkBehaviourReference chestController) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(618355148u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref prop, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref chestController, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 618355148u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TartarusChestController tartarusChestController = default(TartarusChestController); ((NetworkBehaviourReference)(ref chestController)).TryGet(ref tartarusChestController, (NetworkManager)null); GrabbableObject val3 = default(GrabbableObject); ((NetworkBehaviourReference)(ref prop)).TryGet(ref val3, (NetworkManager)null); tartarusChestController.ChestConfirmedOpenable(((Component)val3).gameObject); } } } private bool ScrapAlreadyTaken(GameObject scrap) { int num = 0; foreach (GameObject scrapTakenByChest in scrapTakenByChests) { if ((Object)(object)scrap == (Object)(object)scrapTakenByChest) { return true; } num++; } return 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(2364718706u, new RpcReceiveHandler(__rpc_handler_2364718706), "SetScrapToChestsServerRpc"); ((NetworkBehaviour)this).__registerRpc(618355148u, new RpcReceiveHandler(__rpc_handler_618355148), "SetScrapToChestsClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2364718706(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; ((TartarusInteriorNetworkController)(object)target).SetScrapToChestsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_618355148(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference prop = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref prop, default(ForNetworkSerializable)); NetworkBehaviourReference chestController = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref chestController, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((TartarusInteriorNetworkController)(object)target).SetScrapToChestsClientRpc(prop, chestController); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TartarusInteriorNetworkController"; } } public class TartarusQuicksand : NetworkBehaviour { public Animator handsTrapAnimator; public bool isWater; public bool isInsideWater; public int audioClipIndex; [Space(5f)] public bool sinkingLocalPlayer; public float movementHinderance = 1.6f; public float sinkingSpeedMultiplier = 0.15f; private void OnTriggerStay(Collider other) { if (isWater) { if (!((Component)other).gameObject.CompareTag("Player")) { return; } PlayerControllerB component = ((Component)other).gameObject.GetComponent(); if ((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController && (Object)(object)component != (Object)null && (Object)(object)component.underwaterCollider != (Object)(object)this) { component.underwaterCollider = ((Component)this).gameObject.GetComponent(); return; } } if (!isWater && !((Component)other).gameObject.CompareTag("Player")) { return; } PlayerControllerB component2 = ((Component)other).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } if (isWater) { if (sinkingLocalPlayer) { StopSinkingLocalPlayer(component2); } return; } if (isWater && !component2.isUnderwater) { component2.underwaterCollider = ((Component)this).gameObject.GetComponent(); component2.isUnderwater = true; } component2.statusEffectAudioIndex = audioClipIndex; if (component2.isSinking) { return; } if (sinkingLocalPlayer) { if (!CheckConditionsForSinkingInQuicksand()) { StopSinkingLocalPlayer(component2); } } else if (CheckConditionsForSinkingInQuicksand()) { if ((Object)(object)handsTrapAnimator != (Object)null) { HandsTrapServerRpc(startSinking: true); } sinkingLocalPlayer = true; component2.sourcesCausingSinking++; component2.isMovementHindered++; component2.hinderedMultiplier *= movementHinderance; if (isWater) { component2.sinkingSpeedMultiplier = 0f; } else { component2.sinkingSpeedMultiplier = sinkingSpeedMultiplier; } } } [ServerRpc(RequireOwnership = false)] private void HandsTrapServerRpc(bool startSinking) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3459809458u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startSinking, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3459809458u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; HandsTrapClientRpc(startSinking); } } } [ClientRpc] private void HandsTrapClientRpc(bool startSinking) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1823810414u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startSinking, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1823810414u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (startSinking) { handsTrapAnimator.SetTrigger("startSinking"); } else { handsTrapAnimator.SetTrigger("stopSinking"); } } } private void OnTriggerExit(Collider other) { OnExit(other); } public void OnExit(Collider other) { if (!sinkingLocalPlayer) { if (isWater && ((Component)other).CompareTag("Player") && !((Object)(object)((Component)other).gameObject.GetComponent() == (Object)(object)GameNetworkManager.Instance.localPlayerController)) { ((Component)other).gameObject.GetComponent().isUnderwater = false; } } else if (((Component)other).CompareTag("Player")) { PlayerControllerB component = ((Component)other).gameObject.GetComponent(); if (!((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { StopSinkingLocalPlayer(component); } } } public void StopSinkingLocalPlayer(PlayerControllerB playerScript) { if (sinkingLocalPlayer) { if ((Object)(object)handsTrapAnimator != (Object)null) { HandsTrapServerRpc(startSinking: false); } sinkingLocalPlayer = false; playerScript.sourcesCausingSinking = Mathf.Clamp(playerScript.sourcesCausingSinking - 1, 0, 100); playerScript.isMovementHindered = Mathf.Clamp(playerScript.isMovementHindered - 1, 0, 100); playerScript.hinderedMultiplier = Mathf.Clamp(playerScript.hinderedMultiplier / movementHinderance, 1f, 100f); if (playerScript.isMovementHindered == 0 && isWater) { playerScript.isUnderwater = false; } } } public bool CheckConditionsForSinkingInQuicksand() { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!localPlayerController.thisController.isGrounded) { return false; } if (localPlayerController.inSpecialInteractAnimation || Object.op_Implicit((Object)(object)localPlayerController.inAnimationWithEnemy) || localPlayerController.isClimbingLadder) { return false; } if ((Object)(object)localPlayerController.physicsParent != (Object)null) { return false; } if (localPlayerController.isInHangarShipRoom) { return false; } if (localPlayerController.isInElevator) { return false; } return true; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3459809458u, new RpcReceiveHandler(__rpc_handler_3459809458), "HandsTrapServerRpc"); ((NetworkBehaviour)this).__registerRpc(1823810414u, new RpcReceiveHandler(__rpc_handler_1823810414), "HandsTrapClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3459809458(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool startSinking = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startSinking, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((TartarusQuicksand)(object)target).HandsTrapServerRpc(startSinking); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1823810414(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool startSinking = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startSinking, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((TartarusQuicksand)(object)target).HandsTrapClientRpc(startSinking); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TartarusQuicksand"; } } public class TartarusTeleporter : NetworkBehaviour { private Animator _animator; public GameObject teleporterVFX; public bool isEntranceToBuilding; private Transform exitPoint; public int entranceId; public StartOfRound playersManager; private bool initializedVariables; public int audioReverbPreset = -1; public AudioSource entrancePointAudio; private AudioSource exitPointAudio; public AudioClip[] doorAudios; public AudioClip firstTimeAudio; public int dungeonFlowId = -1; private InteractTrigger triggerScript; private float checkForEnemiesInterval; private bool enemyNearLastCheck; private bool gotExitPoint; private bool checkedForFirstTime; public float timeAtLastUse; public bool poweredOn; private void Awake() { playersManager = Object.FindObjectOfType(); triggerScript = ((Component)this).gameObject.GetComponent(); checkForEnemiesInterval = 10f; _animator = ((Component)this).GetComponent(); entrancePointAudio = ((Component)this).GetComponent(); } public bool FindExitPoint() { exitPoint = TartarusInteriorController.Instance.entranceTeleportPoint; exitPointAudio = ((Component)exitPoint).GetComponent(); if ((Object)(object)exitPoint == (Object)null) { return false; } return true; } public void TeleportPlayer() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) bool flag = false; if (!FindExitPoint()) { flag = true; } if (flag) { HUDManager.Instance.DisplayTip("???", "The entrance appears to be blocked.", false, false, "LC_Tip1"); return; } Transform thisPlayerBody = GameNetworkManager.Instance.localPlayerController.thisPlayerBody; GameNetworkManager.Instance.localPlayerController.TeleportPlayer(exitPoint.position, false, 0f, false, true); thisPlayerBody.eulerAngles = new Vector3(thisPlayerBody.eulerAngles.x, exitPoint.eulerAngles.y, thisPlayerBody.eulerAngles.z); SetAudioPreset((int)GameNetworkManager.Instance.localPlayerController.playerClientId); for (int i = 0; i < GameNetworkManager.Instance.localPlayerController.ItemSlots.Length; i++) { if ((Object)(object)GameNetworkManager.Instance.localPlayerController.ItemSlots[i] != (Object)null) { GameNetworkManager.Instance.localPlayerController.ItemSlots[i].isInFactory = isEntranceToBuilding; } } timeAtLastUse = Time.realtimeSinceStartup; TeleportPlayerServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); GameNetworkManager.Instance.localPlayerController.isInsideFactory = isEntranceToBuilding; } [ServerRpc(RequireOwnership = false)] public void TogglePowerServerRpc() { //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(4746794u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4746794u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TogglePowerClientRpc(); Debug.LogError((object)"Pulled1"); } } } [ClientRpc] public void TogglePowerClientRpc() { //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(3954146813u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3954146813u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; poweredOn = false; Debug.LogError((object)"Pulled"); } } } [ServerRpc(RequireOwnership = false)] public void TeleportPlayerServerRpc(int playerObj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(306148035u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerObj); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 306148035u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TeleportPlayerClientRpc(playerObj); } } } [ClientRpc] public void TeleportPlayerClientRpc(int playerObj) { //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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2383629639u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerObj); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2383629639u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; GameObject val3 = Object.Instantiate(teleporterVFX); val3.GetComponent().playerID = playerObj; Object.Destroy((Object)(object)val3, 5f); if ((Object)(object)playersManager.allPlayerScripts[playerObj] == (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } FindExitPoint(); _animator.SetTrigger("Activate"); playersManager.allPlayerScripts[playerObj].TeleportPlayer(exitPoint.position, true, exitPoint.eulerAngles.y, false, true); PlayAudioAtTeleportPositionsServerRpc(); playersManager.allPlayerScripts[playerObj].isInsideFactory = isEntranceToBuilding; for (int i = 0; i < playersManager.allPlayerScripts[playerObj].ItemSlots.Length; i++) { if ((Object)(object)playersManager.allPlayerScripts[playerObj].ItemSlots[i] != (Object)null) { playersManager.allPlayerScripts[playerObj].ItemSlots[i].isInFactory = isEntranceToBuilding; } } if (GameNetworkManager.Instance.localPlayerController.isPlayerDead && (Object)(object)playersManager.allPlayerScripts[playerObj] == (Object)(object)GameNetworkManager.Instance.localPlayerController.spectatedPlayerScript) { SetAudioPreset(playerObj); } timeAtLastUse = Time.realtimeSinceStartup; } private void SetAudioPreset(int playerObj) { if (audioReverbPreset != -1) { Object.FindObjectOfType().audioPresets[audioReverbPreset].ChangeAudioReverbForPlayer(StartOfRound.Instance.allPlayerScripts[playerObj]); if ((Object)(object)entrancePointAudio != (Object)null) { PlayAudioAtTeleportPositionsServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void PlayAudioAtTeleportPositionsServerRpc() { //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(1508105552u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1508105552u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayAudioAtTeleportPositionsClientRpc(); } } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void PlayAudioAtTeleportPositionsClientRpc() { //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(620740474u, val, (RpcDelivery)1); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 620740474u, val, (RpcDelivery)1); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; entrancePointAudio.PlayOneShot(doorAudios[0]); exitPointAudio.PlayOneShot(doorAudios[0]); } } } private void Update() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) if (!isEntranceToBuilding) { return; } if (checkForEnemiesInterval <= 0f) { if (!gotExitPoint) { if (FindExitPoint()) { gotExitPoint = true; } return; } checkForEnemiesInterval = 1f; bool flag = false; for (int i = 0; i < RoundManager.Instance.SpawnedEnemies.Count; i++) { if (Vector3.Distance(((Component)RoundManager.Instance.SpawnedEnemies[i]).transform.position, ((Component)exitPoint).transform.position) < 7.7f) { flag = true; break; } } if (flag && !enemyNearLastCheck) { enemyNearLastCheck = true; } else if (enemyNearLastCheck) { enemyNearLastCheck = false; } } else { checkForEnemiesInterval -= Time.deltaTime; } } private void OnTriggerEnter(Collider other) { if (((Component)other).CompareTag("Player")) { TeleportPlayer(); } } 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(4746794u, new RpcReceiveHandler(__rpc_handler_4746794), "TogglePowerServerRpc"); ((NetworkBehaviour)this).__registerRpc(3954146813u, new RpcReceiveHandler(__rpc_handler_3954146813), "TogglePowerClientRpc"); ((NetworkBehaviour)this).__registerRpc(306148035u, new RpcReceiveHandler(__rpc_handler_306148035), "TeleportPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(2383629639u, new RpcReceiveHandler(__rpc_handler_2383629639), "TeleportPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(1508105552u, new RpcReceiveHandler(__rpc_handler_1508105552), "PlayAudioAtTeleportPositionsServerRpc"); ((NetworkBehaviour)this).__registerRpc(620740474u, new RpcReceiveHandler(__rpc_handler_620740474), "PlayAudioAtTeleportPositionsClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4746794(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; ((TartarusTeleporter)(object)target).TogglePowerServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3954146813(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; ((TartarusTeleporter)(object)target).TogglePowerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_306148035(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 playerObj = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObj); target.__rpc_exec_stage = (__RpcExecStage)1; ((TartarusTeleporter)(object)target).TeleportPlayerServerRpc(playerObj); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2383629639(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 playerObj = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObj); target.__rpc_exec_stage = (__RpcExecStage)1; ((TartarusTeleporter)(object)target).TeleportPlayerClientRpc(playerObj); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1508105552(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; ((TartarusTeleporter)(object)target).PlayAudioAtTeleportPositionsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_620740474(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; ((TartarusTeleporter)(object)target).PlayAudioAtTeleportPositionsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TartarusTeleporter"; } } internal class TartarusVolumeController : MonoBehaviour { public int blockNum = 0; private void OnTriggerEnter(Collider other) { PlayerControllerB val = default(PlayerControllerB); if (((Component)other).CompareTag("Player") && TartarusInteriorController.Instance.currTartarusFloor != blockNum && ((Component)other).TryGetComponent(ref val) && (Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController) { TartarusInteriorController.Instance.UpdateTartarusFloor(((Component)this).gameObject); } } } public class TeleporterApparatus : GrabbableObject { public bool isLungPowered = true; public bool isLungDocked = true; public bool isLungDockedInElevator; public RoundManager roundManager; public GameObject sparkParticle; private Coroutine disconnectAnimation; public AudioClip connectSFX; public AudioClip disconnectSFX; public AudioClip removeFromMachineSFX; public float lungDeviceLightIntensity; public MeshRenderer lungDeviceMesh; private Color emissiveColor; public EnemyType radMechEnemyType; public TartarusTeleporter tartarusTeleporter; public override void EquipItem() { Debug.Log((object)$"Lung apparatice was grabbed. Is owner: {((NetworkBehaviour)this).IsOwner}"); if (isLungDocked) { isLungDocked = false; if (disconnectAnimation != null) { ((MonoBehaviour)this).StopCoroutine(disconnectAnimation); } disconnectAnimation = ((MonoBehaviour)this).StartCoroutine(DisconnectFromMachinery()); } if (isLungDockedInElevator) { isLungDockedInElevator = false; ((Component)this).gameObject.GetComponent().PlayOneShot(disconnectSFX); _ = isLungPowered; } ((GrabbableObject)this).EquipItem(); } private IEnumerator DisconnectFromMachinery() { GameObject newSparkParticle = Object.Instantiate(sparkParticle, ((Component)this).transform.position, Quaternion.identity, (Transform)null); AudioSource thisAudio = ((Component)this).gameObject.GetComponent(); thisAudio.Stop(); thisAudio.PlayOneShot(disconnectSFX, 0.7f); yield return (object)new WaitForSeconds(0.1f); newSparkParticle.SetActive(true); thisAudio.PlayOneShot(removeFromMachineSFX); } public override void Start() { ((GrabbableObject)this).Start(); roundManager = Object.FindObjectOfType(); } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "TeleporterApparatus"; } } internal class TeleporterVFXController : NetworkBehaviour { public int playerID; private StartOfRound playersManager; private void Awake() { playersManager = Object.FindObjectOfType(); } private void LateUpdate() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GameNetworkManager.Instance != (Object)null && (Object)(object)playersManager.allPlayerScripts[playerID] != (Object)null) { ((Component)this).transform.position = ((Component)playersManager.allPlayerScripts[playerID]).transform.position; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "TeleporterVFXController"; } } public class TogglePerWeather : MonoBehaviour { public enum State { None, Eclipsed, Rainy, Flooded, Forsaken, Hurricane, Hallowed, Earthquakes } public bool isAnimator; [Header("State")] public State preferredState; private void Start() { if (Enabled()) { WeatherRegistryCheck(); } else { NonWeatherRegistryCheck(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void WeatherRegistryCheck() { if (preferredState.ToString() == WeatherManager.GetCurrentWeatherName(RoundManager.Instance.currentLevel, false) && isAnimator) { ((Component)this).GetComponent().SetTrigger(preferredState.ToString()); } else if (!WeatherMatches() && !isAnimator) { ((Component)this).gameObject.SetActive(false); } } public void NonWeatherRegistryCheck() { if (WeatherMatches() && isAnimator) { ((Component)this).GetComponent().SetTrigger(preferredState.ToString()); } else if (!WeatherMatches() && !isAnimator) { ((Component)this).gameObject.SetActive(false); } } public bool Enabled() { if (Chainloader.PluginInfos.ContainsKey("mrov.WeatherRegistry")) { return true; } return false; } public bool WeatherMatches() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Invalid comparison between Unknown and I4 //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Invalid comparison between Unknown and I4 //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Invalid comparison between Unknown and I4 if (preferredState == State.None && (int)TimeOfDay.Instance.currentLevelWeather == -1) { return true; } if (preferredState == State.Eclipsed && (int)TimeOfDay.Instance.currentLevelWeather == 5) { return true; } if (preferredState == State.Rainy && (int)TimeOfDay.Instance.currentLevelWeather == 1) { return true; } if (preferredState == State.Flooded && (int)TimeOfDay.Instance.currentLevelWeather == 4) { return true; } return false; } } public class VelvetDoorTeleport : MonoBehaviour { [SerializeField] private Transform telePoint; [SerializeField] private Animator velvetRoomTransitionAnimator; [SerializeField] private AudioSource velvetRoomTransitionAudioSource; public void TeleportInVelvetRoom() { if (Plugin.VelvetRoomEntryAnimation.Value) { Plugin.velvetRoomEntryPlayCount++; velvetRoomTransitionAnimator.SetTrigger("playAnimation"); velvetRoomTransitionAudioSource.Play(); } ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { }, 0.5f, delegate { TartarusInteriorController.Instance.EnterVelvetRoom(); ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { }, 0.7f, delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) GameNetworkManager.Instance.localPlayerController.TeleportPlayer(telePoint.position, false, 0f, false, true); })); })); } public void TeleportOutOfVelvetRoom() { if (Plugin.VelvetRoomEntryAnimation.Value) { Plugin.velvetRoomEntryPlayCount++; velvetRoomTransitionAnimator.SetTrigger("playAnimation"); velvetRoomTransitionAudioSource.Play(); } ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { }, 0.5f, delegate { TartarusInteriorController.Instance.ExitVelvetRoom(); ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { }, 0.7f, delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) GameNetworkManager.Instance.localPlayerController.TeleportPlayer(telePoint.position, false, 0f, false, true); })); })); } } public class VelvetRoomBigAssLight : MonoBehaviour { private Light light; private void Start() { light = ((Component)this).GetComponent(); light.intensity = Plugin.VelvetRoomLightBrightness.Value; } } public class VelvetRoomDoorController : MonoBehaviour { private Animator m_Animator; public void Start() { m_Animator = ((Component)this).GetComponent(); } public void OpenDoor() { m_Animator.SetTrigger("DoorOpen"); } } public class VelvetTableController : NetworkBehaviour { public AudioClip cardSound1; public AudioClip cardSound2; public AudioClip summonStartSound; public AudioClip summonFinishSound; private AudioSource audioSource; public Transform instantiatePosition; public List applicableObjects; public bool turningCardIntoItem = false; public Animator igorAnimator; private GameObject objectToSpawn; private Item objectToSpawnItem; private int scrapValueSpawned; private void Start() { audioSource = ((Component)this).GetComponent(); } public void DiscardHeldItem() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; DiscardHeldItemServerRpc(new NetworkBehaviourReference((NetworkBehaviour)(object)localPlayerController)); } [ServerRpc(RequireOwnership = false)] public void DiscardHeldItemServerRpc(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_0169: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(496052787u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 496052787u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB player = default(PlayerControllerB); ((NetworkBehaviourReference)(ref playerRef)).TryGet(ref player, (NetworkManager)null); if (!((Object)(object)player.currentlyHeldObjectServer != (Object)null) || !HeldItemIsApplicable(player.currentlyHeldObjectServer) || turningCardIntoItem) { return; } int tarotRarity = ((Component)player.currentlyHeldObjectServer).GetComponent().tarotRarity; DiscardHeldItemClientRpc(playerRef); ((MonoBehaviour)this).StartCoroutine(Ext.WaitAndDo(delegate { turningCardIntoItem = true; }, 8f, delegate { //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) List list = new List(RoundManager.Instance.currentLevel.spawnableScrap.Count); for (int i = 0; i < RoundManager.Instance.currentLevel.spawnableScrap.Count; i++) { if (RoundManager.Instance.currentLevel.spawnableScrap[i].spawnableItem.itemId == 152767) { list.Add(0); } else { list.Add(RoundManager.Instance.currentLevel.spawnableScrap[i].rarity); } } Random random = new Random(); int randomWeightedIndexList = RoundManager.Instance.GetRandomWeightedIndexList(list, random); Transform val3 = ((((!((Object)(object)player != (Object)null) || !player.isInElevator) && !StartOfRound.Instance.inShipPhase) || !((Object)(object)RoundManager.Instance.spawnedScrapContainer != (Object)null)) ? StartOfRound.Instance.elevatorTransform : RoundManager.Instance.spawnedScrapContainer); Vector3 val4 = instantiatePosition.position + Vector3.up * 0.25f; objectToSpawnItem = RoundManager.Instance.currentLevel.spawnableScrap[randomWeightedIndexList].spawnableItem; objectToSpawn = objectToSpawnItem.spawnPrefab; GameObject val5 = Object.Instantiate(objectToSpawn, val4, Quaternion.identity, val3); GrabbableObject component = val5.GetComponent(); scrapValueSpawned = (int)((float)random.Next((objectToSpawnItem.minValue + objectToSpawnItem.maxValue) / 2) * RoundManager.Instance.scrapValueMultiplier * Plugin.VelvetRoomScrapValueMultiplier.Value * (0.5f + 0.15f * (float)tarotRarity)); component.SetScrapValue(scrapValueSpawned); ((NetworkBehaviour)component).NetworkObject.Spawn(false); SpawnItemClientRpc(scrapValueSpawned, NetworkObjectReference.op_Implicit(((Component)component).gameObject)); turningCardIntoItem = false; })); } [ClientRpc] public void DiscardHeldItemClientRpc(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) 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(205344007u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 205344007u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = default(PlayerControllerB); ((NetworkBehaviourReference)(ref playerRef)).TryGet(ref val3, (NetworkManager)null); val3.currentlyHeldObjectServer.DestroyObjectInHand(val3); igorAnimator.SetTrigger("TurnCardIntoItem"); ((MonoBehaviour)this).StartCoroutine(PlaySummonSounds()); } } } [ClientRpc] public void SpawnItemClientRpc(int scrapValueSpawned, NetworkObjectReference objectSpawned) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) 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(863204369u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, scrapValueSpawned); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref objectSpawned, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 863204369u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); ((NetworkObjectReference)(ref objectSpawned)).TryGet(ref val3, (NetworkManager)null); ((Component)val3).GetComponent().SetScrapValue(scrapValueSpawned); RoundManager instance = RoundManager.Instance; instance.totalScrapValueInLevel += (float)scrapValueSpawned; } } } public IEnumerator PlaySummonSounds() { audioSource.PlayOneShot(cardSound1); yield return (object)new WaitForSeconds(3f); audioSource.PlayOneShot(cardSound1); yield return (object)new WaitForSeconds(1.5f); audioSource.PlayOneShot(cardSound2); yield return (object)new WaitForSeconds(1f); audioSource.PlayOneShot(summonStartSound); yield return (object)new WaitForSeconds(2.5f); audioSource.PlayOneShot(summonFinishSound); } private bool HeldItemIsApplicable(GrabbableObject grabbableObject) { foreach (GrabbableObject applicableObject in applicableObjects) { if (((Object)applicableObject).name == ((Object)grabbableObject).name || ((Object)applicableObject).name + "(Clone)" == ((Object)grabbableObject).name) { return true; } } return 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 ((NetworkBehaviour)this).__registerRpc(496052787u, new RpcReceiveHandler(__rpc_handler_496052787), "DiscardHeldItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(205344007u, new RpcReceiveHandler(__rpc_handler_205344007), "DiscardHeldItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(863204369u, new RpcReceiveHandler(__rpc_handler_863204369), "SpawnItemClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_496052787(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(ref playerRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetTableController)(object)target).DiscardHeldItemServerRpc(playerRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_205344007(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(ref playerRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetTableController)(object)target).DiscardHeldItemClientRpc(playerRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_863204369(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int num = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref num); NetworkObjectReference objectSpawned = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref objectSpawned, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetTableController)(object)target).SpawnItemClientRpc(num, objectSpawned); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "VelvetTableController"; } } internal class WealthHandEnemyAI : EnemyAI { public enum State { Wander, Run, Alert } [SerializeField] private List possibleDrops; [SerializeField] private GameObject worldTarot; public List audioClips = new List(); public Transform turnCompass = null; public Transform attackArea = null; public ParticleSystem deathParticles; public float wanderMoveSpeed; public float chaseMoveSpeed; private float timeSinceNewRandPos; private float timeSinceAttacking; private float timeSinceAlerted; private Vector3 StalkPos; private Random enemyRandom = null; private bool isDeadAnimationDone; private bool gettingFarthestNodeFromPlayerAsync; private Transform farthestNodeFromTargetPlayer; private float avoidPlayersTimer; private float fearTimer; private float timeSinceAlert; private PlayerControllerB closestSeenPlayer; [Header("State")] public State stateType; [Conditional("DEBUG")] private void LogIfDebugBuild(string text) { } public override void Start() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); LogIfDebugBuild("Example Enemy Spawned"); base.creatureAnimator.SetTrigger("startWalk"); timeSinceNewRandPos = 0f; timeSinceAlerted = 0f; enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex); isDeadAnimationDone = false; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); } public override void Update() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead) { if (!isDeadAnimationDone) { isDeadAnimationDone = true; } return; } if (((NetworkBehaviour)this).IsOwner && gettingFarthestNodeFromPlayerAsync && (Object)(object)closestSeenPlayer != (Object)null) { int num = ((!(timeSinceAlert < 0.5f)) ? 10 : 30); Transform val = ((EnemyAI)this).ChooseFarthestNodeFromPosition(((Component)closestSeenPlayer).transform.position, true, 0, true, num, -1); if (!base.gotFarthestNodeAsync) { return; } farthestNodeFromTargetPlayer = val; gettingFarthestNodeFromPlayerAsync = false; } timeSinceAttacking += Time.deltaTime; timeSinceNewRandPos += Time.deltaTime; timeSinceAlerted += Time.deltaTime; avoidPlayersTimer += Time.deltaTime; } public override void DoAIInterval() { //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } switch (stateType) { case State.Wander: { base.agent.speed = Plugin.WealthHandWanderSpeed.Value; PlayerControllerB val3 = FoundClosestPlayerInRange(25f, 1f); if ((Object)(object)val3 != (Object)null) { if ((Object)(object)closestSeenPlayer == (Object)null || ((Object)(object)val3 != (Object)(object)closestSeenPlayer && Vector3.Distance(base.eye.position, ((Component)val3).transform.position) < Vector3.Distance(base.eye.position, ((Component)closestSeenPlayer).transform.position))) { closestSeenPlayer = val3; avoidPlayersTimer = 0f; ((EnemyAI)this).ChangeOwnershipOfEnemy(closestSeenPlayer.actualClientId); } LogIfDebugBuild("Start Target Player"); ((EnemyAI)this).StopSearch(base.currentSearch, true); DoAnimationClientRpc("alert"); PlaySoundClientRpc(0); timeSinceAlerted = 0f; ChangeStateClientRpc(State.Alert); } break; } case State.Alert: base.agent.speed = 0f; if ((Object)(object)base.targetPlayer != (Object)null) { turnCompass.LookAt(((Component)base.targetPlayer.gameplayCamera).transform.position); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(new Vector3(0f, turnCompass.eulerAngles.y, 0f)), 4f * Time.deltaTime); } if (timeSinceAlerted > 0.7f) { ChangeStateClientRpc(State.Run); } break; case State.Run: { base.agent.speed = Plugin.WealthHandFleeSpeed.Value; PlayerControllerB val = FoundClosestPlayerInRange(25f, 1f); if ((Object)(object)val != (Object)null && ((Object)(object)closestSeenPlayer == (Object)null || ((Object)(object)val != (Object)(object)closestSeenPlayer && Vector3.Distance(base.eye.position, ((Component)val).transform.position) < Vector3.Distance(base.eye.position, ((Component)closestSeenPlayer).transform.position)))) { closestSeenPlayer = val; avoidPlayersTimer = 0f; ((EnemyAI)this).ChangeOwnershipOfEnemy(closestSeenPlayer.actualClientId); } if ((Object)(object)farthestNodeFromTargetPlayer == (Object)null) { gettingFarthestNodeFromPlayerAsync = true; break; } Transform val2 = farthestNodeFromTargetPlayer; farthestNodeFromTargetPlayer = null; if ((Object)(object)val2 != (Object)null) { base.targetNode = val2; ((EnemyAI)this).SetDestinationToPosition(base.targetNode.position, false); } else if (avoidPlayersTimer > 5f && Vector3.Distance(base.eye.position, ((Component)closestSeenPlayer).transform.position) > 10f) { LogIfDebugBuild("Stop Target Player"); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ChangeStateClientRpc(State.Wander); DoAnimationClientRpc("wander"); } break; } default: LogIfDebugBuild("This Behavior State doesn't exist!"); break; } } private PlayerControllerB FoundClosestPlayerInRange(float range, float senseRange) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).TargetClosestPlayer(1.5f, true, 100f, false, false, true); if ((Object)(object)base.targetPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < range) { return base.targetPlayer; } return null; } public override void HitEnemy(int force = 1, PlayerControllerB? playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (!base.isEnemyDead) { base.enemyHP -= force; PlaySoundClientRpc(2); if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead) { DeathServerRpc(); ((MonoBehaviour)this).StopCoroutine(base.searchCoroutine); ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } } [ServerRpc] public void DeathServerRpc() { //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 //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2814474960u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2814474960u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; int num = Random.Range(0, 101); if (num <= Plugin.WorldTarotSpawnChance.Value) { GameObject val3 = Object.Instantiate(worldTarot, ((Component)turnCompass).transform.position, ((Component)this).transform.rotation); if ((Object)(object)val3 != (Object)null) { val3.GetComponent().Spawn(false); val3.GetComponent().tarotRarity = 20; } } else { int index = Random.Range(0, possibleDrops.Count); GameObject val4 = Object.Instantiate(possibleDrops[index], ((Component)turnCompass).transform.position, ((Component)this).transform.rotation); if ((Object)(object)val4 != (Object)null) { val4.GetComponent().Spawn(false); val4.GetComponent().tarotRarity = Plugin.WealthHandRewardRarity.Value; } } DeathClientRpc(); } [ClientRpc(/*Could not decode attribute arguments.*/)] public void DeathClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(363563276u, val, (RpcDelivery)1); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 363563276u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(DeathCoroutine()); } } } public IEnumerator DeathCoroutine() { base.creatureVoice.PlayOneShot(audioClips[1]); base.creatureSFX.Stop(); deathParticles.Play(); List materialList = new List(); float duration = 0f; SkinnedMeshRenderer[] skinnedMeshRenderers = base.skinnedMeshRenderers; foreach (SkinnedMeshRenderer renderer in skinnedMeshRenderers) { Material[] materials = ((Renderer)renderer).materials; foreach (Material material in materials) { materialList.Add(material); } } while (duration < 1f) { foreach (Material material2 in materialList) { material2.SetFloat("_DissolveAmount", duration); } duration += Time.deltaTime / 3f; yield return null; } foreach (Material material3 in materialList) { material3.SetFloat("_DissolveAmount", 1f); } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void DoAnimationClientRpc(string animationName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3106344946u, val, (RpcDelivery)1); bool flag = animationName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(animationName, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3106344946u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LogIfDebugBuild("Animation: " + animationName); base.creatureAnimator.SetTrigger(animationName); } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void PlaySoundClientRpc(int index) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1790622119u, val, (RpcDelivery)1); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1790622119u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureVoice.PlayOneShot(audioClips[index]); } } } [ClientRpc] public void ChangeStateClientRpc(State state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4191803078u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForEnums)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4191803078u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stateType = state; } } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2814474960u, new RpcReceiveHandler(__rpc_handler_2814474960), "DeathServerRpc"); ((NetworkBehaviour)this).__registerRpc(363563276u, new RpcReceiveHandler(__rpc_handler_363563276), "DeathClientRpc"); ((NetworkBehaviour)this).__registerRpc(3106344946u, new RpcReceiveHandler(__rpc_handler_3106344946), "DoAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(1790622119u, new RpcReceiveHandler(__rpc_handler_1790622119), "PlaySoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(4191803078u, new RpcReceiveHandler(__rpc_handler_4191803078), "ChangeStateClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_2814474960(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; ((WealthHandEnemyAI)(object)target).DeathServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_363563276(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; ((WealthHandEnemyAI)(object)target).DeathClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3106344946(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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string animationName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationName, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((WealthHandEnemyAI)(object)target).DoAnimationClientRpc(animationName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1790622119(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 index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); target.__rpc_exec_stage = (__RpcExecStage)1; ((WealthHandEnemyAI)(object)target).PlaySoundClientRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4191803078(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { State state = default(State); ((FastBufferReader)(ref reader)).ReadValueSafe(ref state, default(ForEnums)); target.__rpc_exec_stage = (__RpcExecStage)1; ((WealthHandEnemyAI)(object)target).ChangeStateClientRpc(state); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "WealthHandEnemyAI"; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace com.github.Teaisnt.Tartarus.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }