Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of CharlottesLabyrinth v1.1.2
plugins/CharlottesLabyrinth.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
#define DEBUG using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; 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 CharlottesLabyrinth; using CharlottesLabyrinth.NetcodePatcher; using CodeRebirth.src.MiscScripts; using Dawn.Utils; using ExampleEnemy; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.UI; using WeatherRegistry; [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("CharlottesLabyrinth")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.4.0")] [assembly: AssemblyInformationalVersion("1.0.4")] [assembly: AssemblyProduct("CharlottesLabyrinth")] [assembly: AssemblyTitle("CharlottesLabyrinth")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.4.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class KyokosSpear : GrabbableObject { public int shovelHitForce = 1; public bool attacking; public bool isHoldingButton; private RaycastHit rayHit; private Coroutine reelingUpCoroutine; private RaycastHit[] objectsHitByShovel; private List<RaycastHit> objectsHitByShovelList = new List<RaycastHit>(); public AudioClip reelUp; public AudioClip swing; public AudioClip[] hitSFX; public AudioSource shovelAudio; private PlayerControllerB previousPlayerHeldBy; public Animator spearAnimator; private int shovelMask = 1084754248; public override void ItemActivate(bool used, bool buttonDown = true) { if ((Object)(object)base.playerHeldBy == (Object)null) { return; } isHoldingButton = buttonDown; if (!attacking && buttonDown) { attacking = true; previousPlayerHeldBy = base.playerHeldBy; if (reelingUpCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(reelingUpCoroutine); } reelingUpCoroutine = ((MonoBehaviour)this).StartCoroutine(reelUpShovel()); } } private IEnumerator reelUpShovel() { spearAnimator.SetTrigger("AttackNormal"); base.playerHeldBy.playerBodyAnimator.SetBool("crouching", false); base.playerHeldBy.playerBodyAnimator.SetTrigger("SwitchHoldAnimationTwoHanded"); base.playerHeldBy.playerBodyAnimator.SetBool("HoldPatcherTool", true); base.playerHeldBy.playerBodyAnimator.SetBool("PullingCameraRight", true); base.playerHeldBy.activatingItem = true; base.playerHeldBy.twoHanded = true; base.playerHeldBy.playerBodyAnimator.SetBool("HoldPatcherTool", false); base.playerHeldBy.playerBodyAnimator.SetBool("PullingCameraRight", false); SwingShovel(!base.isHeld); yield return (object)new WaitForSeconds(0.5f); yield return (object)new WaitForEndOfFrame(); HitShovel(!base.isHeld); yield return (object)new WaitForSeconds(0.5f); attacking = false; reelingUpCoroutine = null; } [ServerRpc] public void ReelUpSFXServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2393832603u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2393832603u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ReelUpSFXClientRpc(); } } [ClientRpc] public void ReelUpSFXClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2174232780u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2174232780u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { shovelAudio.PlayOneShot(reelUp); } } } public override void DiscardItem() { if ((Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.activatingItem = false; } ((GrabbableObject)this).DiscardItem(); } public void SwingShovel(bool cancel = false) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (!cancel) { shovelAudio.PlayOneShot(swing); previousPlayerHeldBy.UpdateSpecialAnimationValue(true, (short)((Component)previousPlayerHeldBy).transform.localEulerAngles.y, 0.4f, false); } } public void HitShovel(bool cancel = false) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_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_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: 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_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)previousPlayerHeldBy == (Object)null) { Debug.LogError((object)"Previousplayerheldby is null on this client when HitShovel is called."); return; } previousPlayerHeldBy.activatingItem = false; bool flag = false; bool flag2 = false; bool flag3 = false; int num = -1; if (!cancel) { previousPlayerHeldBy.twoHanded = false; objectsHitByShovel = Physics.SphereCastAll(((Component)previousPlayerHeldBy.gameplayCamera).transform.position + ((Component)previousPlayerHeldBy.gameplayCamera).transform.right * -0.35f, 0.8f, ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward, 1.5f, shovelMask, (QueryTriggerInteraction)2); objectsHitByShovelList = objectsHitByShovel.OrderBy((RaycastHit x) => ((RaycastHit)(ref x)).distance).ToList(); List<EnemyAI> list = new List<EnemyAI>(); IHittable val2 = default(IHittable); for (int num2 = 0; num2 < objectsHitByShovelList.Count; num2++) { RaycastHit val = objectsHitByShovelList[num2]; if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 8) { val = objectsHitByShovelList[num2]; if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 11) { val = objectsHitByShovelList[num2]; if (!((Component)((RaycastHit)(ref val)).transform).TryGetComponent<IHittable>(ref val2)) { continue; } val = objectsHitByShovelList[num2]; if ((Object)(object)((RaycastHit)(ref val)).transform == (Object)(object)((Component)previousPlayerHeldBy).transform) { continue; } val = objectsHitByShovelList[num2]; if (!(((RaycastHit)(ref val)).point == Vector3.zero)) { Vector3 position = ((Component)previousPlayerHeldBy.gameplayCamera).transform.position; RaycastHit val3 = objectsHitByShovelList[num2]; if (Physics.Linecast(position, ((RaycastHit)(ref val3)).point, ref val, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { continue; } } flag = true; Vector3 forward = ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward; try { val = objectsHitByShovelList[num2]; EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref val)).transform).GetComponent<EnemyAICollisionDetect>(); if ((Object)(object)component != (Object)null) { if (!((Object)(object)component.mainScript == (Object)null) && !list.Contains(component.mainScript)) { goto IL_035f; } continue; } val = objectsHitByShovelList[num2]; if (!((Object)(object)((Component)((RaycastHit)(ref val)).transform).GetComponent<PlayerControllerB>() != (Object)null)) { goto IL_035f; } if (!flag3) { flag3 = true; goto IL_035f; } goto end_IL_02c3; IL_035f: bool flag4 = val2.Hit(shovelHitForce, forward, previousPlayerHeldBy, true, 1); if (flag4 && (Object)(object)component != (Object)null) { list.Add(component.mainScript); } if (!flag2) { flag2 = flag4; } end_IL_02c3:; } catch (Exception arg) { Debug.Log((object)$"Exception caught when hitting object with shovel from player #{previousPlayerHeldBy.playerClientId}: {arg}"); } continue; } } val = objectsHitByShovelList[num2]; if (((RaycastHit)(ref val)).collider.isTrigger) { continue; } flag = true; val = objectsHitByShovelList[num2]; string tag = ((Component)((RaycastHit)(ref val)).collider).gameObject.tag; for (int num3 = 0; num3 < StartOfRound.Instance.footstepSurfaces.Length; num3++) { if (StartOfRound.Instance.footstepSurfaces[num3].surfaceTag == tag) { num = num3; break; } } } } if (flag) { RoundManager.PlayRandomClip(shovelAudio, hitSFX, true, 1f, 0, 1000); Object.FindObjectOfType<RoundManager>().PlayAudibleNoise(((Component)this).transform.position, 17f, 0.8f, 0, false, 0); if (!flag2 && num != -1) { shovelAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[num].hitSurfaceSFX); WalkieTalkie.TransmitOneShotAudio(shovelAudio, StartOfRound.Instance.footstepSurfaces[num].hitSurfaceSFX, 1f); } HitShovelServerRpc(num); } } [ServerRpc] public void HitShovelServerRpc(int hitSurfaceID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(963831900u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, hitSurfaceID); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 963831900u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; HitShovelClientRpc(hitSurfaceID); } } [ClientRpc] public void HitShovelClientRpc(int hitSurfaceID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(54649613u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, hitSurfaceID); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 54649613u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { RoundManager.PlayRandomClip(shovelAudio, hitSFX, true, 1f, 0, 1000); if (hitSurfaceID != -1) { HitSurfaceWithShovel(hitSurfaceID); } } } private void HitSurfaceWithShovel(int hitSurfaceID) { shovelAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[hitSurfaceID].hitSurfaceSFX); WalkieTalkie.TransmitOneShotAudio(shovelAudio, StartOfRound.Instance.footstepSurfaces[hitSurfaceID].hitSurfaceSFX, 1f); } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2393832603u, new RpcReceiveHandler(__rpc_handler_2393832603), "ReelUpSFXServerRpc"); ((NetworkBehaviour)this).__registerRpc(2174232780u, new RpcReceiveHandler(__rpc_handler_2174232780), "ReelUpSFXClientRpc"); ((NetworkBehaviour)this).__registerRpc(963831900u, new RpcReceiveHandler(__rpc_handler_963831900), "HitShovelServerRpc"); ((NetworkBehaviour)this).__registerRpc(54649613u, new RpcReceiveHandler(__rpc_handler_54649613), "HitShovelClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_2393832603(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; ((KyokosSpear)(object)target).ReelUpSFXServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2174232780(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; ((KyokosSpear)(object)target).ReelUpSFXClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_963831900(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { int hitSurfaceID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)1; ((KyokosSpear)(object)target).HitShovelServerRpc(hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_54649613(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 hitSurfaceID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)1; ((KyokosSpear)(object)target).HitShovelClientRpc(hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "KyokosSpear"; } } public class LabyrinthController : NetworkBehaviour { public WanderingCharlotteOffset currentWanderingCharlotteOffset; public Animator wanderingCharlotteAnimator; public Animator outsideWanderingCharlotteAnimator; public AudioSource wanderingCharlotteAudioSource; public AudioSource outsideWanderingCharlotteAudioSource; public List<WanderingCharlotteOffset> wanderingCharlotteOffsets = new List<WanderingCharlotteOffset>(); public List<WanderingCharlotteOffset> wanderingOutsideCharlotteOffsets = new List<WanderingCharlotteOffset>(); public List<GameObject> objectsToEnableWhenCollapse = new List<GameObject>(); public List<EnableWhenCollapse> labyrinthLights = new List<EnableWhenCollapse>(); public List<Volume> labyrinthVolumes = new List<Volume>(); public Transform qbSpawnPosition; public EnemyType qbEnemyType; public bool hasDisabledCollapseObjects = false; public bool isCollapsing = false; public VolumeProfile collapsingProfile; private PlayerControllerB player; [SerializeField] private AudioSource musicSource1; [SerializeField] private AudioSource musicSource2; [SerializeField] private AudioClip interiorCollapsingSong; [SerializeField] private AudioClip moonCollapsingSong; [SerializeField] private AudioClip charlotteRumbleClip; [SerializeField] private AudioClip charlotteBreakWallEnterClip; [SerializeField] private AudioClip charlotteBreakWallExitClip; [SerializeField] private AudioClip charlotteEmergeClip; [SerializeField] private float fadeSourceSpeed; [SerializeField] private float songMaxVolume; private bool isPlayingSong1; private Coroutine fadeSourceCoroutine; private RoundManager roundManager; private float timeSinceCollapseStarted = 0f; private float currWanderTime = 0f; private float timeUntilWanderAgain = 5f; public static LabyrinthController Instance { get; private set; } private void Awake() { Instance = this; } private void Start() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) roundManager = Object.FindObjectOfType<RoundManager>(); if (((NetworkBehaviour)this).IsOwner) { RoundManager.Instance.SpawnEnemyGameObject(qbSpawnPosition.position, 0f, 1, qbEnemyType); } 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() { currWanderTime += Time.deltaTime; if (isCollapsing && Plugin.MusicEnabled.Value) { CheckIfStopSource(); } if (isCollapsing) { WanderingCharlotte(); } if (isCollapsing) { timeSinceCollapseStarted += Time.deltaTime; } } private void WanderingCharlotte() { if (currWanderTime > timeUntilWanderAgain) { CharlotteChooseServerRpc(); } } [ServerRpc] public void CharlotteChooseServerRpc() { //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_01b6: 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) 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2974428696u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2974428696u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; int num = 0; if (!StartOfRound.Instance.allPlayersDead) { num = ChooseRandomPlayer(); } if (wanderingOutsideCharlotteOffsets.Count > 0 && timeSinceCollapseStarted > 7f && (AllPlayersOutside() || !StartOfRound.Instance.allPlayerScripts[num].isInsideFactory)) { int rand = Random.Range(0, wanderingOutsideCharlotteOffsets.Count); CharlotteWanderOutsideClientRpc(rand); return; } int num2 = 0; WanderingCharlotteOffset wanderingCharlotteOffset = null; foreach (WanderingCharlotteOffset wanderingCharlotteOffset2 in wanderingCharlotteOffsets) { if (Vector3.Distance(wanderingCharlotteOffset2.groundParticleSystem.transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[num]).transform.position) < 20f) { wanderingCharlotteOffset = wanderingCharlotteOffset2; break; } num2++; } if ((Object)(object)wanderingCharlotteOffset == (Object)null) { num2 = Random.Range(0, wanderingCharlotteOffsets.Count); } CharlotteChooseClientRpc(num2); } private bool AllPlayersOutside() { bool result = true; PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!val.isPlayerDead && val.isInsideFactory) { result = false; } } return result; } private int ChooseRandomPlayer() { int num = 0; bool flag = false; while (!flag && !StartOfRound.Instance.allPlayersDead) { num = Random.Range(0, StartOfRound.Instance.allPlayerScripts.Count()); if (!StartOfRound.Instance.allPlayerScripts[num].isPlayerDead && StartOfRound.Instance.allPlayerScripts[num].isPlayerControlled) { flag = true; } } return num; } [ClientRpc] public void CharlotteWanderOutsideClientRpc(int rand) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1363687108u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, rand); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1363687108u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; currWanderTime = -3f; currentWanderingCharlotteOffset = wanderingOutsideCharlotteOffsets[rand]; ((MonoBehaviour)this).StartCoroutine(CharlotteWanderOutsideCoroutine()); } } } [ClientRpc] public void CharlotteChooseClientRpc(int rand) { //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_0107: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2340899945u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, rand); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2340899945u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; currWanderTime = 0f; currentWanderingCharlotteOffset = wanderingCharlotteOffsets[rand]; ((Component)wanderingCharlotteAnimator).transform.position = ((Component)currentWanderingCharlotteOffset).transform.position; ((Component)wanderingCharlotteAnimator).transform.rotation = ((Component)currentWanderingCharlotteOffset).transform.rotation; ((MonoBehaviour)this).StartCoroutine(CharlotteWanderCoroutine()); } } } public IEnumerator CharlotteWanderCoroutine() { if (Vector3.Distance(currentWanderingCharlotteOffset.groundParticleSystem.transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 30f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } ParticleSystem groundParticleSystem = currentWanderingCharlotteOffset.groundParticleSystem.GetComponent<ParticleSystem>(); ParticleSystem entrancePointParticleSystem1 = currentWanderingCharlotteOffset.entrancePointParticleSystem1.GetComponent<ParticleSystem>(); ParticleSystem entrancePointParticleSystem2 = currentWanderingCharlotteOffset.entrancePointParticleSystem2.GetComponent<ParticleSystem>(); ParticleSystem entrancePointParticleSystem3 = currentWanderingCharlotteOffset.entrancePointParticleSystem3.GetComponent<ParticleSystem>(); ParticleSystem exitPointParticleSystem = currentWanderingCharlotteOffset.exitPointParticleSystem.GetComponent<ParticleSystem>(); groundParticleSystem.Play(); entrancePointParticleSystem1.Play(); currentWanderingCharlotteOffset.PlaySoundAtEntrance(charlotteRumbleClip); yield return (object)new WaitForSeconds(1.5f); wanderingCharlotteAnimator.SetTrigger(currentWanderingCharlotteOffset.stateType.ToString()); yield return (object)new WaitForSeconds(0.2f); currentWanderingCharlotteOffset.PlaySoundAtEntrance(charlotteBreakWallEnterClip); wanderingCharlotteAudioSource.PlayOneShot(charlotteEmergeClip); if (Vector3.Distance(currentWanderingCharlotteOffset.groundParticleSystem.transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 20f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } currentWanderingCharlotteOffset.entrancePointDecal.SetActive(true); entrancePointParticleSystem2.Play(); entrancePointParticleSystem3.Play(); yield return (object)new WaitForSeconds(0.3f); currentWanderingCharlotteOffset.PlaySoundAtExit(charlotteBreakWallExitClip); exitPointParticleSystem.Play(); currentWanderingCharlotteOffset.exitPointDecal.SetActive(true); } public IEnumerator CharlotteWanderOutsideCoroutine() { if (Vector3.Distance(currentWanderingCharlotteOffset.groundParticleSystem.transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 50f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } ParticleSystem groundParticleSystem = currentWanderingCharlotteOffset.groundParticleSystem.GetComponent<ParticleSystem>(); ParticleSystem entrancePointParticleSystem1 = currentWanderingCharlotteOffset.entrancePointParticleSystem1.GetComponent<ParticleSystem>(); ParticleSystem entrancePointParticleSystem2 = currentWanderingCharlotteOffset.entrancePointParticleSystem2.GetComponent<ParticleSystem>(); ParticleSystem entrancePointParticleSystem3 = currentWanderingCharlotteOffset.entrancePointParticleSystem3.GetComponent<ParticleSystem>(); ParticleSystem exitPointParticleSystem = currentWanderingCharlotteOffset.exitPointParticleSystem.GetComponent<ParticleSystem>(); groundParticleSystem.Play(); entrancePointParticleSystem1.Play(); currentWanderingCharlotteOffset.PlaySoundAtEntrance(charlotteRumbleClip); yield return (object)new WaitForSeconds(1.5f); outsideWanderingCharlotteAnimator.SetTrigger(currentWanderingCharlotteOffset.stateType.ToString()); yield return (object)new WaitForSeconds(0.2f); currentWanderingCharlotteOffset.PlaySoundAtEntrance(charlotteBreakWallEnterClip); outsideWanderingCharlotteAudioSource.PlayOneShot(charlotteEmergeClip); if (Vector3.Distance(currentWanderingCharlotteOffset.groundParticleSystem.transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 50f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } currentWanderingCharlotteOffset.entrancePointDecal.SetActive(true); entrancePointParticleSystem2.Play(); entrancePointParticleSystem3.Play(); yield return (object)new WaitForSeconds(0.3f); currentWanderingCharlotteOffset.PlaySoundAtExit(charlotteBreakWallExitClip); exitPointParticleSystem.Play(); currentWanderingCharlotteOffset.exitPointDecal.SetActive(true); } private void CheckIfStopSource() { if (player.isPlayerDead && (Object)(object)player.spectatedPlayerScript != (Object)null) { if (player.spectatedPlayerScript.isInsideFactory && !isPlayingSong1) { ChangeSong(interiorCollapsingSong); } else if (!player.spectatedPlayerScript.isInsideFactory && isPlayingSong1) { ChangeSong(moonCollapsingSong); } } else if (player.isInsideFactory && !isPlayingSong1) { ChangeSong(interiorCollapsingSong); } else if (!player.isInsideFactory && isPlayingSong1) { ChangeSong(moonCollapsingSong); } } [ServerRpc(RequireOwnership = false)] public void StartCollapseLabyrinthServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(689911344u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 689911344u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; StartCollapseLabyrinthClientRpc(); } } } [ClientRpc] public void StartCollapseLabyrinthClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2405009467u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2405009467u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!isCollapsing) { ((MonoBehaviour)this).StartCoroutine(LabyrinthCollapseCoroutine()); } } } private IEnumerator LabyrinthCollapseCoroutine() { if (((NetworkBehaviour)this).IsServer && Random.Range(0, 100) < 70 && RoundManager.Instance.minEnemiesToSpawn < 2) { RoundManager.Instance.minEnemiesToSpawn = 2; } yield return (object)new WaitForSeconds(1f); if (((NetworkBehaviour)this).IsServer) { roundManager.FlickerLights(false, false); } yield return (object)new WaitForSeconds(0.5f); foreach (GameObject item in objectsToEnableWhenCollapse) { item.SetActive(true); } yield return (object)new WaitForSeconds(1f); if (((NetworkBehaviour)this).IsServer) { roundManager.SwitchPower(false); } yield return (object)new WaitForSeconds(1f); HUDManager.Instance.RadiationWarningHUD(); isCollapsing = true; if (Plugin.MusicEnabled.Value) { if (player.isInsideFactory) { ChangeSong(interiorCollapsingSong); } else if (!player.isInsideFactory) { ChangeSong(moonCollapsingSong); } } if (((NetworkBehaviour)this).IsServer) { roundManager.SwitchPower(true); } yield return (object)new WaitForSeconds(0.5f); foreach (EnableWhenCollapse light in labyrinthLights) { light.LightGoBrrrr(); } foreach (Volume volume in labyrinthVolumes) { volume.profile = collapsingProfile; } } 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; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2974428696u, new RpcReceiveHandler(__rpc_handler_2974428696), "CharlotteChooseServerRpc"); ((NetworkBehaviour)this).__registerRpc(1363687108u, new RpcReceiveHandler(__rpc_handler_1363687108), "CharlotteWanderOutsideClientRpc"); ((NetworkBehaviour)this).__registerRpc(2340899945u, new RpcReceiveHandler(__rpc_handler_2340899945), "CharlotteChooseClientRpc"); ((NetworkBehaviour)this).__registerRpc(689911344u, new RpcReceiveHandler(__rpc_handler_689911344), "StartCollapseLabyrinthServerRpc"); ((NetworkBehaviour)this).__registerRpc(2405009467u, new RpcReceiveHandler(__rpc_handler_2405009467), "StartCollapseLabyrinthClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2974428696(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; ((LabyrinthController)(object)target).CharlotteChooseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1363687108(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 rand = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref rand); target.__rpc_exec_stage = (__RpcExecStage)1; ((LabyrinthController)(object)target).CharlotteWanderOutsideClientRpc(rand); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2340899945(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 rand = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref rand); target.__rpc_exec_stage = (__RpcExecStage)1; ((LabyrinthController)(object)target).CharlotteChooseClientRpc(rand); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_689911344(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; ((LabyrinthController)(object)target).StartCollapseLabyrinthServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2405009467(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; ((LabyrinthController)(object)target).StartCollapseLabyrinthClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "LabyrinthController"; } } 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 QBHittable : MonoBehaviour, IHittable { public QBController qbController; bool IHittable.Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit, bool playHitSFX, int hitID = -1) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) qbController.HitFromTurret(hitDirection); return true; } } public class QBPhysicsProp : GrabbableObject { public Animator animator = null; public QBController qbController = null; public PlayerControllerB? previousPlayerHeldBy = null; [HideInInspector] public static readonly int RunSpeedFloat = Animator.StringToHash("RunSpeed"); public override void EquipItem() { ((GrabbableObject)this).EquipItem(); qbController.PickUpQBLocalClient(); previousPlayerHeldBy = base.playerHeldBy; } public override void FallWithCurve() { if (((EnemyAI)qbController).inSpecialAnimation) { ((GrabbableObject)this).FallWithCurve(); } } public override void Start() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) base.propColliders = ((Component)this).gameObject.GetComponentsInChildren<Collider>(); for (int i = 0; i < base.propColliders.Length; i++) { if (!((Component)base.propColliders[i]).CompareTag("DoNotSet") && !((Component)base.propColliders[i]).CompareTag("Enemy")) { base.propColliders[i].excludeLayers = LayerMask.op_Implicit(-2621449); } } base.originalScale = ((Component)this).transform.localScale; if (base.itemProperties.itemSpawnsOnGround) { base.startFallingPosition = ((Component)this).transform.position; if ((Object)(object)((Component)this).transform.parent != (Object)null) { base.startFallingPosition = ((Component)this).transform.parent.InverseTransformPoint(base.startFallingPosition); } ((GrabbableObject)this).FallToGround(false, false, default(Vector3)); } else { base.fallTime = 1f; base.hasHitGround = true; base.reachedFloorTarget = true; base.targetFloorPosition = ((Component)this).transform.localPosition; } if (base.itemProperties.isScrap) { base.fallTime = 1f; base.hasHitGround = true; } if (base.itemProperties.isScrap && (Object)(object)RoundManager.Instance.mapPropsContainer != (Object)null) { base.radarIcon = Object.Instantiate<GameObject>(StartOfRound.Instance.itemRadarIconPrefab, RoundManager.Instance.mapPropsContainer.transform).transform; } if (!base.itemProperties.isScrap) { HoarderBugAI.grabbableObjectsInMap.Add(((Component)this).gameObject); } MeshRenderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<MeshRenderer>(); for (int j = 0; j < componentsInChildren.Length; j++) { ((Renderer)componentsInChildren[j]).renderingLayerMask = 1u; } SkinnedMeshRenderer[] componentsInChildren2 = ((Component)this).gameObject.GetComponentsInChildren<SkinnedMeshRenderer>(); for (int k = 0; k < componentsInChildren2.Length; k++) { ((Renderer)componentsInChildren2[k]).renderingLayerMask = 1u; } } public override void Update() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: 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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsOwner) { Animator obj = animator; int runSpeedFloat = RunSpeedFloat; Vector3 velocity = ((EnemyAI)qbController).agent.velocity; obj.SetFloat(runSpeedFloat, ((Vector3)(ref velocity)).magnitude / 3f); if (!base.wasOwnerLastFrame) { base.wasOwnerLastFrame = true; } } else if (base.wasOwnerLastFrame) { base.wasOwnerLastFrame = false; } if (!base.isHeld && (Object)(object)base.parentObject == (Object)null) { if (base.fallTime < 1f) { base.reachedFloorTarget = false; ((GrabbableObject)this).FallWithCurve(); if (((Component)this).transform.localPosition.y - base.targetFloorPosition.y < 0.05f && !base.hasHitGround) { ((GrabbableObject)this).PlayDropSFX(); ((GrabbableObject)this).OnHitGround(); } return; } if (!base.reachedFloorTarget) { if (!base.hasHitGround) { ((GrabbableObject)this).PlayDropSFX(); ((GrabbableObject)this).OnHitGround(); } base.reachedFloorTarget = true; if (base.floorYRot == -1) { ((Component)this).transform.rotation = Quaternion.Euler(base.itemProperties.restingRotation.x, ((Component)this).transform.eulerAngles.y, base.itemProperties.restingRotation.z); } else { ((Component)this).transform.rotation = Quaternion.Euler(base.itemProperties.restingRotation.x, (float)(base.floorYRot + base.itemProperties.floorYOffset) + 90f, base.itemProperties.restingRotation.z); } } if (((EnemyAI)qbController).inSpecialAnimation) { ((Component)this).transform.localPosition = base.targetFloorPosition; } } else if (base.isHeld || base.isHeldByEnemy) { base.reachedFloorTarget = false; } } public override void LateUpdate() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) if (((EnemyAI)qbController).inSpecialAnimation && (Object)(object)base.parentObject != (Object)null) { ((Component)this).transform.rotation = base.parentObject.rotation; ((Component)this).transform.Rotate(base.itemProperties.rotationOffset); ((Component)this).transform.position = base.parentObject.position; Vector3 positionOffset = base.itemProperties.positionOffset; positionOffset = base.parentObject.rotation * positionOffset; Transform transform = ((Component)this).transform; transform.position += positionOffset; } } public override void EnableItemMeshes(bool enable) { MeshRenderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<MeshRenderer>(); for (int i = 0; i < componentsInChildren.Length; i++) { if (!((Component)componentsInChildren[i]).gameObject.CompareTag("DoNotSet") && !((Component)componentsInChildren[i]).gameObject.CompareTag("InteractTrigger") && !((Component)componentsInChildren[i]).gameObject.CompareTag("Enemy")) { ((Renderer)componentsInChildren[i]).enabled = enable; } } SkinnedMeshRenderer[] componentsInChildren2 = ((Component)this).gameObject.GetComponentsInChildren<SkinnedMeshRenderer>(); for (int j = 0; j < componentsInChildren2.Length; j++) { ((Renderer)componentsInChildren2[j]).enabled = enable; } } public override void DiscardItem() { qbController.DropQbLocalClient(); DropBabyServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); previousPlayerHeldBy = base.playerHeldBy; ((GrabbableObject)this).DiscardItem(); } [ServerRpc(RequireOwnership = false)] public void DropBabyServerRpc(int playerClientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1798048404u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerClientId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1798048404u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; animator.SetTrigger("drop"); DropBabyClientRpc(playerClientId); } } } [ClientRpc] public void DropBabyClientRpc(int playerClientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3995923262u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerClientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3995923262u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (playerClientId != (int)GameNetworkManager.Instance.localPlayerController.playerClientId) { qbController.DropQbLocalClient(); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1798048404u, new RpcReceiveHandler(__rpc_handler_1798048404), "DropBabyServerRpc"); ((NetworkBehaviour)this).__registerRpc(3995923262u, new RpcReceiveHandler(__rpc_handler_3995923262), "DropBabyClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_1798048404(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 playerClientId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerClientId); target.__rpc_exec_stage = (__RpcExecStage)1; ((QBPhysicsProp)(object)target).DropBabyServerRpc(playerClientId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3995923262(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 playerClientId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerClientId); target.__rpc_exec_stage = (__RpcExecStage)1; ((QBPhysicsProp)(object)target).DropBabyClientRpc(playerClientId); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "QBPhysicsProp"; } } public class QBSpikeTrapDetect : NetworkBehaviour { public QBController qbController; private Transform spikeRoofTrapCurrTransform; public void OnTriggerEnter(Collider other) { SpikeRoofTrap val = default(SpikeRoofTrap); if (((Component)other).TryGetComponent<SpikeRoofTrap>(ref val)) { spikeRoofTrapCurrTransform = ((Component)val.stickingPointsContainer).transform; AddStickPointServerRpc(); qbController.SpikeTrapDeathServerRpc(); } } [ServerRpc] public void AddStickPointServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1736775760u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1736775760u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AddStickPointClientRpc(); } } [ClientRpc] public void AddStickPointClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(91649286u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 91649286u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; qbController.qbRagdollAttachPoints.Add(spikeRoofTrapCurrTransform); } } } 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(1736775760u, new RpcReceiveHandler(__rpc_handler_1736775760), "AddStickPointServerRpc"); ((NetworkBehaviour)this).__registerRpc(91649286u, new RpcReceiveHandler(__rpc_handler_91649286), "AddStickPointClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1736775760(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; ((QBSpikeTrapDetect)(object)target).AddStickPointServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_91649286(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; ((QBSpikeTrapDetect)(object)target).AddStickPointClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "QBSpikeTrapDetect"; } } 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 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<Animator>().SetTrigger(preferredState.ToString()); } else if (!WeatherMatches() && !isAnimator) { ((Component)this).gameObject.SetActive(false); } } public void NonWeatherRegistryCheck() { if (WeatherMatches() && isAnimator) { ((Component)this).GetComponent<Animator>().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; } } } namespace CodeRebirth.src.MiscScripts { public class ShipAnimator : MonoBehaviour { public AnimationClip shipLandAnimation = null; public AnimationClip shipNormalLeaveAnimation = null; private Animator hangarShipAnimator = null; public AnimationClip originalShipLandClip = null; public AnimationClip originalShipLeaveClip = null; private RuntimeAnimatorController animatorController = null; public AnimatorOverrideController overrideController = null; private void Start() { hangarShipAnimator = StartOfRound.Instance.shipAnimator; animatorController = hangarShipAnimator.runtimeAnimatorController; AnimationClip[] animationClips = animatorController.animationClips; foreach (AnimationClip val in animationClips) { if (((Object)val).name == "HangarShipLandB") { originalShipLandClip = val; } else if (((Object)val).name == "ShipLeave") { originalShipLeaveClip = val; } } ((MonoBehaviour)this).StartCoroutine(WaitToReplaceClip()); } private IEnumerator WaitToReplaceClip() { while (true) { Plugin.Logger.LogError((object)"REPLACING??"); yield return (object)new WaitUntil((Func<bool>)(() => RoundManager.Instance.currentLevel.sceneName == "CharlottesLabyrinth" && !StartOfRound.Instance.inShipPhase)); ReplaceAnimationClip(); Plugin.Logger.LogError((object)"REPLACED!!!"); yield return (object)new WaitUntil((Func<bool>)(() => RoundManager.Instance.currentLevel.sceneName != "CharlottesLabyrinth" || StartOfRound.Instance.inShipPhase)); Plugin.Logger.LogError((object)"UNREPLACED!!!"); UnReplaceAnimationClip(); } } private void ReplaceAnimationClip() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown overrideController = new AnimatorOverrideController(animatorController); overrideController[originalShipLandClip] = shipLandAnimation; overrideController[originalShipLeaveClip] = shipNormalLeaveAnimation; hangarShipAnimator.runtimeAnimatorController = (RuntimeAnimatorController)(object)overrideController; } public void KillAllPlayersAnimEvent() { PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!val.isPlayerControlled || val.isPlayerDead) { } } } private void UnReplaceAnimationClip() { hangarShipAnimator.runtimeAnimatorController = animatorController; } } } namespace ExampleEnemy { public class QBController : EnemyAI { public enum State { Wander, Sit, Held } public BoxCollider collisionThing; public BoxCollider interactCollider; public BoxCollider scanNode; public GameObject qbRagdollPrefab; public PlayerControllerB playerHolding; public QBPhysicsProp propScript; public List<AudioClip> audioClips = new List<AudioClip>(); public Transform turnCompass = null; public Transform attackArea = null; public ParticleSystem deathParticles; public float wanderMoveSpeed; public float chaseMoveSpeed; public float trySitInterval; public float tryGetUpInterval; private Coroutine dropQbCoroutine; private Coroutine dropBabyCoroutine; public List<Transform> qbRagdolls = new List<Transform>(); public List<Transform> qbRagdollAttachPoints = new List<Transform>(); private bool holdingQb = false; private float timeSinceSatDown; private float timeSinceLastSat; private float timeSinceNewRandPos; private float timeSinceAttacking; private float timeSinceAlerted; private float timeSinceDropped; 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_0014: 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_005e: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); ((GrabbableObject)propScript).originalScale = ((Component)this).transform.localScale; timeSinceNewRandPos = 0f; timeSinceAlerted = 0f; enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex); isDeadAnimationDone = false; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); base.isOutside = false; } public override void Update() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (qbRagdolls.Count > 0 && qbRagdolls.Count == qbRagdollAttachPoints.Count) { int num = 0; foreach (Transform qbRagdoll in qbRagdolls) { qbRagdoll.position = qbRagdollAttachPoints[num].position; num++; } } if (base.isEnemyDead) { if (!isDeadAnimationDone) { LogIfDebugBuild("Stopping enemy voice with janky code."); isDeadAnimationDone = true; StopSfxClientRpc(); } } else { timeSinceAttacking += Time.deltaTime; timeSinceNewRandPos += Time.deltaTime; timeSinceAlerted += Time.deltaTime; timeSinceLastSat += Time.deltaTime; timeSinceSatDown += Time.deltaTime; timeSinceDropped += Time.deltaTime; ((EnemyAI)this).DoAIInterval(); } } public override void DoAIInterval() { if (stateType == State.Held) { return; } if (((NetworkBehaviour)this).IsServer) { ((EnemyAI)this).DoAIInterval(); } if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead || !((NetworkBehaviour)this).IsOwner) { return; } switch (stateType) { case State.Wander: ChangeSpeedClientRpc(wanderMoveSpeed); if (timeSinceLastSat > trySitInterval && timeSinceDropped > 2f) { float num2 = Random.Range(0, 100); if (num2 < 25f) { PlaySoundClientRpc(0); ChangeStateClientRpc(State.Sit); DoAnimationClientRpc("sitDown"); timeSinceSatDown = 0f; } else { timeSinceLastSat = 0f; } } break; case State.Sit: ChangeSpeedClientRpc(0f); if (timeSinceSatDown > tryGetUpInterval) { float num = Random.Range(0, 100); if (num < 25f) { PlaySoundClientRpc(1); ChangeStateClientRpc(State.Wander); DoAnimationClientRpc("getUp"); timeSinceLastSat = 0f; } else { timeSinceSatDown = 0f; } } break; default: LogIfDebugBuild("This Behavior State doesn't exist!"); break; } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void ChangeSpeedClientRpc(float speed) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(828867089u, val2, (RpcDelivery)1); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref speed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 828867089u, val2, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.agent.speed = speed; } } } [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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2844141494u, val2, (RpcDelivery)1); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2844141494u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(794199885u, val2, (RpcDelivery)1); BytePacker.WriteValueBitPacked(val, clipNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 794199885u, val2, (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; } public void HitFromTurret(Vector3 hitDirection) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) if (!base.isEnemyDead) { base.enemyHP--; if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead) { DeathServerRpc(hitDirection * 10f + hitDirection * 10f); } } } public override void HitFromExplosion(float distance) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_0074: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).HitFromExplosion(distance); if (!base.isEnemyDead) { base.enemyHP--; if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead) { DeathServerRpc(((Component)this).transform.forward * 50f + ((Component)this).transform.up * 50f); } } } public override void HitEnemy(int force = 1, PlayerControllerB? playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (!base.isEnemyDead) { base.enemyHP -= force; if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead) { DeathServerRpc(Vector3.down); } } } [ServerRpc] public void DeathServerRpc(Vector3 bodyVelocity) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 //IL_0160: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1205418331u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref bodyVelocity); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1205418331u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ChangeStateClientRpc(State.Held); GameObject val3 = Object.Instantiate<GameObject>(qbRagdollPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation); val3.GetComponent<NetworkObject>().Spawn(false); Rigidbody[] componentsInChildren = val3.GetComponentsInChildren<Rigidbody>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].velocity = bodyVelocity; } ((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f)); DeathClientRpc(); } } [ServerRpc] public void SpikeTrapDeathServerRpc() { //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_0121: 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_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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1973894588u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1973894588u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ChangeStateClientRpc(State.Held); GameObject val3 = Object.Instantiate<GameObject>(qbRagdollPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation); val3.GetComponent<NetworkObject>().Spawn(false); qbRagdolls.Add(val3.transform); ((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f)); 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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(400727888u, val2, (RpcDelivery)1); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 400727888u, val2, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((Collider)interactCollider).enabled = false; ((Collider)collisionThing).enabled = false; ((Collider)scanNode).enabled = false; SkinnedMeshRenderer[] skinnedMeshRenderers = base.skinnedMeshRenderers; foreach (SkinnedMeshRenderer val3 in skinnedMeshRenderers) { ((Renderer)val3).enabled = false; } base.enemyHP = 1; } } public IEnumerator DeathCoroutine(float delayTime) { yield return (object)new WaitForSeconds(delayTime); if (RoundManager.Instance.allEnemyVents.Length != 0) { bool foundValidVent = false; EnemyVent[] allEnemyVents = RoundManager.Instance.allEnemyVents; foreach (EnemyVent enemyVent in allEnemyVents) { bool hasNearbyPlayer = false; GameObject[] allPlayerObjects = StartOfRound.Instance.allPlayerObjects; foreach (GameObject player in allPlayerObjects) { if (Vector3.Distance(player.transform.position, ((Component)enemyVent).transform.position) < 15f) { hasNearbyPlayer = true; } } if (!hasNearbyPlayer) { foundValidVent = true; ((Collider)interactCollider).enabled = true; ((Collider)collisionThing).enabled = true; ((Collider)scanNode).enabled = true; SkinnedMeshRenderer[] skinnedMeshRenderers = base.skinnedMeshRenderers; foreach (SkinnedMeshRenderer skinnedMeshRenderer in skinnedMeshRenderers) { ((Renderer)skinnedMeshRenderer).enabled = true; } ((Behaviour)base.agent).enabled = false; ((Component)this).transform.position = ((Component)enemyVent.floorNode).transform.position; ((Behaviour)base.agent).enabled = true; ChangeStateClientRpc(State.Wander); break; } } if (!foundValidVent) { ((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f)); } } else { ((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f)); } } [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)) {