#define DEBUG using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using Dawn.Utils; using Dusk; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using Observers.src; using Reiko888.Observers.NetcodePatcher; using Unity.Netcode; using UnityEngine; using UnityEngine.Video; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Reiko888.Observers")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("2.0.1.0")] [assembly: AssemblyInformationalVersion("2.0.1+cece1756811f2c50425d62adde1d1b54965d8b26")] [assembly: AssemblyProduct("Observers")] [assembly: AssemblyTitle("Reiko888.Observers")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.0.1.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; } } } namespace Observers { internal class ObserverContentHandler : ContentHandler { public class ObserverAssets : AssetBundleLoader { [LoadFromBundle("ObserverChaser.prefab")] public GameObject ObserverChaser { get; private set; } = null; public ObserverAssets(DuskMod mod, string filePath) : base(mod, filePath) { } } internal ObserverAssets? observerAssets; public ObserverContentHandler(DuskMod mod) : base(mod) { ((ContentHandler)this).RegisterContent("observers", ref observerAssets, false); } } internal class ObserversAI : EnemyAI { [Serializable] public struct WeaponSoundSet { public AudioClip[] sounds; } private enum State { Observing, MarkingPlayer, Chase, Cooldown } public static List allChasers = new List(); public ObserversAI master; public bool isMaster; private bool choseMasterObserver; public GameObject ObserverPrefab; public GameObject activeObserver; public GameObject activeChaserModel; public Transform attackArea = null; public int SirenAudioSourceIndex = 0; public int AtmosphereAudioSourceIndex = 1; public AudioClip[] AtmosphereClips; private float atmosphereTimer = 0f; public Vector3 SpectreRotationOffset = new Vector3(0f, -90f, 0f); public float SirenDelay = 6.5f; public ScreenShakeType SirenShakeType = (ScreenShakeType)0; public float AirRaidLength = 60f; private Dictionary originalEmissions = new Dictionary(); [Header("Door Prying")] public HangarShipDoor shipDoor; public bool isPryingDoor; private bool inSpecialAnimation; private float pryingDoorAnimTime; public float pryOpenDoorAnimLength = 3f; public AudioClip breakAndEnter; public AudioClip shipAlarm; public AudioSource breakDownDoorAudio; private int queuedState = -1; private Animator chaserAnimator; private Random enemyRandom = null; private bool hasSpawnedSpectre = false; private Vector3 mainEntrancePosition; private bool isPlayingMarkAnimation = false; private float chaseTimer = 0f; private bool isStartingCooldown = false; private float attackCooldown = 0f; private Ray enemyRay; private RaycastHit enemyRayHit; public AudioClip[] customFootstepSounds; private float footstepTimer = 0f; public AudioSource movementAudio; public GameObject knifeModel; public WeaponSoundSet[] weaponStabSounds; public int activeWeaponIndex = 0; private DoorLock[] cachedDoors; private float slowScanTimer = 0f; private const float SLOW_SCAN_INTERVAL = 2f; private Dictionary doorCooldowns = new Dictionary(); public AudioClip chaserDeathSound; public AudioClip chaserReanimateSound; private Vector3 lastPosition; private MineshaftElevatorController elevatorScript; private bool isInElevatorStartRoom = false; private bool isHalted = false; public AudioSource markedLineAudio; public ParticleSystem manifestationParticles; public SkinnedMeshRenderer chaserRenderer; public Mesh[] randomMeshes; public GameObject[] meshVariants; public GameObject[] knifeModels; private EntranceTeleport[] allTeleports; public GameObject possessionSwarmParticles; public AudioClip tauntVoiceline; public Transform handBone; private ScanNodeProperties cachedScanNode; private bool isStunned = false; private float slowDownTimer = 0f; private float currentChaseDuration = 0f; private bool isBlasting = false; private float cameraShakeTimer = 0f; private float baseSpeed; private float raidVolume; private float observerCooldown; private float detectRange; private bool itemDrop; private float chaseTime; private int chaserDamage; private int scrapAnger; private void HandleOwnershipChange(int newStateIndex) { if (((NetworkBehaviour)this).IsServer) { if (newStateIndex == 2 && (Object)(object)base.targetPlayer != (Object)null) { ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); } else if (newStateIndex == 3 || newStateIndex == 0) { ((EnemyAI)this).ChangeOwnershipOfEnemy(0uL); } } } public void SyncStateSafely(int newStateIndex) { if (inSpecialAnimation) { queuedState = newStateIndex; } else if (((NetworkBehaviour)this).IsServer) { HandleOwnershipChange(newStateIndex); SyncStateSafelyClientRpc(newStateIndex); } else { SyncStateSafelyServerRpc(newStateIndex); } } [ServerRpc(RequireOwnership = false)] private void SyncStateSafelyServerRpc(int newStateIndex) { //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(3736050795u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, newStateIndex); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3736050795u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; HandleOwnershipChange(newStateIndex); SyncStateSafelyClientRpc(newStateIndex); } } } [ClientRpc] private void SyncStateSafelyClientRpc(int newStateIndex) { //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(996601758u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, newStateIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 996601758u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.currentBehaviourStateIndex != newStateIndex) { base.currentBehaviourStateIndex = newStateIndex; Plugin.Logger.LogInfo((object)$"Observer State changed to {(State)newStateIndex}"); } } } [Conditional("DEBUG")] private void LogIfDebugBuild(string text) { Plugin.Logger.LogInfo((object)text); } public override void Start() { //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); detectRange = ((AssetBundleLoader)(object)ContentHandler.Instance.observerAssets).GetConfig("Observer Detection Range").Value; raidVolume = ((AssetBundleLoader)(object)ContentHandler.Instance.observerAssets).GetConfig("Observer Air Raid volume").Value; observerCooldown = ((AssetBundleLoader)(object)ContentHandler.Instance.observerAssets).GetConfig("Observer Cooldown").Value; baseSpeed = ((AssetBundleLoader)(object)ContentHandler.Instance.observerAssets).GetConfig("Chaser run speed").Value; itemDrop = ((AssetBundleLoader)(object)ContentHandler.Instance.observerAssets).GetConfig("Chaser item drop").Value; chaseTime = ((AssetBundleLoader)(object)ContentHandler.Instance.observerAssets).GetConfig("Chaser chase time").Value; base.enemyHP = ((AssetBundleLoader)(object)ContentHandler.Instance.observerAssets).GetConfig("Chaser health").Value; chaserDamage = ((AssetBundleLoader)(object)ContentHandler.Instance.observerAssets).GetConfig("Chaser attack damage").Value; scrapAnger = ((AssetBundleLoader)(object)ContentHandler.Instance.observerAssets).GetConfig("Base scrap anger").Value; LogIfDebugBuild("Observer Spawned"); isHalted = true; shipDoor = Object.FindObjectOfType(); chaserAnimator = ((Component)this).GetComponentInChildren(); if ((Object)(object)attackArea != (Object)null) { Vector3 localScale = attackArea.localScale; localScale.z = 2f; attackArea.localScale = localScale; Vector3 localPosition = attackArea.localPosition; localPosition.z = localScale.z / 2f; attackArea.localPosition = localPosition; } SetupChaserMesh(); if ((Object)(object)movementAudio != (Object)null) { movementAudio.spatialize = false; if ((Object)(object)SoundManager.Instance != (Object)null && (Object)(object)SoundManager.Instance.diageticMixer != (Object)null) { movementAudio.outputAudioMixerGroup = SoundManager.Instance.diageticMixer.FindMatchingGroups("Master")[0]; } } if ((Object)(object)base.creatureSFX != (Object)null) { base.creatureSFX.spatialize = false; } Animator componentInChildren = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.cullingMode = (AnimatorCullingMode)0; ((Behaviour)componentInChildren).enabled = true; componentInChildren.applyRootMotion = false; } ((EnemyAI)this).GetAINodes(); mainEntrancePosition = RoundManager.FindMainEntrancePosition(true, base.isOutside); if (!base.isOutside && base.allAINodes != null && base.allAINodes.Length != 0) { Transform transform = base.allAINodes[enemyRandom.Next(0, base.allAINodes.Length)].transform; base.agent.Warp(transform.position); ((EnemyAI)this).SyncPositionToClients(); Plugin.Logger.LogInfo((object)"Warped Chaser to a random internal AI node"); } base.currentBehaviourStateIndex = 0; } private void SetupChaserMesh() { enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex); if (meshVariants == null || meshVariants.Length == 0) { return; } GameObject[] array = meshVariants; foreach (GameObject val in array) { if ((Object)(object)val != (Object)null) { val.SetActive(false); } } int num = (activeWeaponIndex = enemyRandom.Next(0, meshVariants.Length)); activeChaserModel = meshVariants[num]; if ((Object)(object)activeChaserModel != (Object)null) { activeChaserModel.SetActive(true); } Plugin.Logger.LogInfo((object)$"Variant {num} active."); } private void BeginPryOpenDoor() { DoAnimationServerRpc("isPryingDoor", isBool: true, state: true); SetPryingDoorServerRpc(state: true); } private void FinishPryOpenDoor() { DoAnimationServerRpc("isPryingDoor", isBool: true); SetPryingDoorServerRpc(state: false); } [ServerRpc(RequireOwnership = false)] public void SetPryingDoorServerRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1053520595u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1053520595u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetPryingDoorClientRpc(state); } } } [ClientRpc] public void SetPryingDoorClientRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) 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(2040238424u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2040238424u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; isPryingDoor = state; inSpecialAnimation = state; ((Behaviour)base.agent).enabled = !state; if (state) { pryingDoorAnimTime = 0f; if ((Object)(object)shipDoor != (Object)null) { shipDoor.shipDoorsAnimator.SetBool("PryingOpenDoor", true); shipDoor.shipDoorsAnimator.SetFloat("pryOpenDoor", 0f); } if ((Object)(object)breakDownDoorAudio != (Object)null && (Object)(object)breakAndEnter != (Object)null) { breakDownDoorAudio.PlayOneShot(breakAndEnter); WalkieTalkie.TransmitOneShotAudio(breakDownDoorAudio, breakAndEnter, 1f); } RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 15f, 0.9f, 0, false, 0); if ((Object)(object)shipAlarm != (Object)null) { StartOfRound.Instance.speakerAudioSource.PlayOneShot(shipAlarm); WalkieTalkie.TransmitOneShotAudio(StartOfRound.Instance.speakerAudioSource, shipAlarm, 1f); } if (Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)this).transform.position) < 18f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)3); } return; } if ((Object)(object)shipDoor != (Object)null) { shipDoor.shipDoorsAnimator.SetBool("Closed", false); shipDoor.shipDoorsAnimator.SetBool("PryingOpenDoor", false); StartOfRound.Instance.SetShipDoorsClosed(false); StartOfRound.Instance.SetShipDoorsOverheatLocalClient(); shipDoor.doorPower = 0f; } if (queuedState != -1) { if (((NetworkBehaviour)this).IsServer) { SyncStateSafely(queuedState); } queuedState = -1; } } public bool BreakIntoShip() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)shipDoor == (Object)null) { return false; } if (isPryingDoor) { if (pryingDoorAnimTime >= 1f) { FinishPryOpenDoor(); } return true; } if (StartOfRound.Instance.hangarDoorsClosed && (Object)(object)base.targetPlayer != (Object)null && base.targetPlayer.isInHangarShipRoom && Vector3.Distance(((Component)this).transform.position, shipDoor.outsideDoorPoint.position) < 4f) { foreach (ObserversAI allChaser in allChasers) { if ((Object)(object)allChaser != (Object)null && (Object)(object)allChaser != (Object)(object)this && allChaser.isPryingDoor) { return false; } } BeginPryOpenDoor(); return true; } return false; } private bool AreOtherChasersAlive() { if (allChasers == null) { return false; } foreach (ObserversAI allChaser in allChasers) { if ((Object)(object)allChaser != (Object)null && (Object)(object)allChaser != (Object)(object)this && !((EnemyAI)allChaser).isEnemyDead) { return true; } } return false; } public override void OnDestroy() { ((EnemyAI)this).OnDestroy(); if (allChasers.Contains(this)) { allChasers.Remove(this); } if (!AreOtherChasersAlive() && (Object)(object)activeObserver != (Object)null) { Object.Destroy((Object)(object)activeObserver); } if ((Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.Stop(); } Plugin.Logger.LogInfo((object)"Enemy destroyed"); } private void OnEnable() { ObserversEventManager.OnShipLeft += HandleShipLeft; ObserversEventManager.OnPlayerDied += HandlePlayerDeathOrDC; ObserversEventManager.OnPlayerDisconnect += HandlePlayerDeathOrDC; } private void OnDisable() { ObserversEventManager.OnShipLeft -= HandleShipLeft; ObserversEventManager.OnPlayerDied -= HandlePlayerDeathOrDC; ObserversEventManager.OnPlayerDisconnect -= HandlePlayerDeathOrDC; } private void HandleShipLeft() { Plugin.Logger.LogInfo((object)"Ship is leaving! Cleaning up"); if ((Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.Stop(); } SpectreSirenClientRpc(play: false); DespawnObserverSpectre(); isHalted = false; base.targetPlayer = null; ObserverScrapListener.ClearData(); } private void HandlePlayerDeathOrDC(PlayerControllerB player) { if (((NetworkBehaviour)this).IsServer && !base.isEnemyDead && (Object)(object)base.targetPlayer == (Object)(object)player) { Plugin.Logger.LogInfo((object)"Target died or disconnected."); if (base.currentBehaviourStateIndex == 2 || base.currentBehaviourStateIndex == 1) { TriggerChaseEndClientRpc(); } } } [ServerRpc(RequireOwnership = false)] public void DoAnimationServerRpc(string animationTrigger, bool isBool = false, bool state = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (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_0135: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1525562837u, val2, (RpcDelivery)0); bool flag = animationTrigger != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(animationTrigger, false); } ((FastBufferWriter)(ref val)).WriteValueSafe(ref isBool, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1525562837u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DoAnimationClientRpc(animationTrigger, isBool, state); } } [ClientRpc] public void DoAnimationClientRpc(string animationTrigger, bool isBool = false, bool state = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (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_0135: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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(1295253700u, val2, (RpcDelivery)0); bool flag = animationTrigger != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(animationTrigger, false); } ((FastBufferWriter)(ref val)).WriteValueSafe(ref isBool, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1295253700u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Animator componentInChildren = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { if (isBool) { componentInChildren.SetBool(animationTrigger, state); } else { componentInChildren.SetTrigger(animationTrigger); } } } [ClientRpc] public void PlayVictimWhisperClientRpc(int victimClientId) { //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(3891565636u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, victimClientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3891565636u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId == victimClientId && (Object)(object)markedLineAudio != (Object)null) { markedLineAudio.Play(); } } } [ClientRpc] public void PlayChaserSFXClientRpc(string sfxType) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3962993773u, val2, (RpcDelivery)0); bool flag = sfxType != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(sfxType, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3962993773u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (sfxType == "reanimate") { base.creatureSFX.Play(); } else if (sfxType == "death" && (Object)(object)base.dieSFX != (Object)null) { base.creatureVoice.PlayOneShot(base.dieSFX); } } } [ClientRpc] public void PlayClientFXClientRpc(int fxType) { //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(549905190u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, fxType); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 549905190u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; switch (fxType) { case 0: ((MonoBehaviour)this).StartCoroutine(FlickerLightsDuringRise(7f)); break; case 1: if (!base.creatureVoice.isPlaying) { base.creatureVoice.Play(); } break; } } public void SpawnObserverSpectre() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0184: 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_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0206: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: 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_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) EntranceTeleport[] array = Object.FindObjectsOfType(); EntranceTeleport val = null; EntranceTeleport[] array2 = array; foreach (EntranceTeleport val2 in array2) { if (val2.entranceId == 0 && val2.isEntranceToBuilding) { val = val2; break; } } if ((Object)(object)val == (Object)null) { return; } Vector3 val3 = (mainEntrancePosition = ((Component)val).transform.position); GameObject[] array3 = GameObject.FindGameObjectsWithTag("OutsideAINode"); Vector3 val4 = val3; float num = float.MaxValue; if (array3 != null) { GameObject[] array4 = array3; foreach (GameObject val5 in array4) { float num2 = Vector3.Distance(val3, val5.transform.position); if (num2 > 12f && num2 < 40f && num2 < num) { num = num2; val4 = val5.transform.position; } } if (num == float.MaxValue && array3.Length != 0) { val4 = array3[0].transform.position; GameObject[] array5 = array3; foreach (GameObject val6 in array5) { if (Vector3.Distance(val3, val6.transform.position) < Vector3.Distance(val3, val4)) { val4 = val6.transform.position; } } } } val4.y += 15f; if (val4.y < val3.y) { val4.y = val3.y + 5f; } Vector3 val7 = val3 - val4; val7.y = 0f; Quaternion spawnRot = Quaternion.LookRotation(val7); if ((Object)(object)ObserverPrefab != (Object)null) { Plugin.Logger.LogInfo((object)$"Spawning Spectre at {val4} to watch the door."); hasSpawnedSpectre = true; SpawnSpectreClientRpc(val4, spawnRot); } } [ClientRpc] public void SpawnSpectreClientRpc(Vector3 spawnPos, Quaternion spawnRot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010d: 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(1365692926u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref spawnPos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref spawnRot); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1365692926u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)activeObserver == (Object)null && (Object)(object)ObserverPrefab != (Object)null) { GameObject val3 = Object.Instantiate(ObserverPrefab, spawnPos, spawnRot); foreach (ObserversAI allChaser in allChasers) { if ((Object)(object)allChaser != (Object)null) { allChaser.activeObserver = val3; allChaser.hasSpawnedSpectre = true; } } Terminal val4 = Object.FindObjectOfType(); if ((Object)(object)val4 != (Object)null) { foreach (TerminalNode enemyFile in val4.enemyFiles) { if (!((Object)(object)enemyFile != (Object)null) || !enemyFile.creatureName.Contains("Observer")) { continue; } ScanNodeProperties[] componentsInChildren = ((Component)this).GetComponentsInChildren(true); foreach (ScanNodeProperties val5 in componentsInChildren) { if (val5.nodeType == 1) { val5.creatureScanID = enemyFile.creatureFileID; } } break; } } } ToggleAndMoveScanNode(enable: true, spawnPos); } [ClientRpc] public void SyncTargetClientRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4289629946u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4289629946u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (playerId < 0 || playerId >= StartOfRound.Instance.allPlayerScripts.Length) { return; } PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; foreach (ObserversAI allChaser in allChasers) { if ((Object)(object)allChaser != (Object)null) { ((EnemyAI)allChaser).targetPlayer = val3; } } Plugin.Logger.LogInfo((object)("Target synced to all chasers: " + val3.playerUsername)); } [ClientRpc] public void PlayTauntInEarClientRpc(ulong targetClientId) { //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(3975555292u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, targetClientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3975555292u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (StartOfRound.Instance.localPlayerController.actualClientId == targetClientId) { if ((Object)(object)tauntVoiceline != (Object)null) { HUDManager.Instance.UIAudio.PlayOneShot(tauntVoiceline, 1f); } else { Plugin.Logger.LogWarning((object)"Taunt voiceline is missing"); } } } public void DespawnObserverSpectre() { if (((NetworkBehaviour)this).IsServer) { DespawnSpectreClientRpc(); hasSpawnedSpectre = false; } } [ClientRpc] public void DespawnSpectreClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: 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(272201980u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 272201980u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)activeObserver != (Object)null) { Vector3 position = activeObserver.transform.position; if ((Object)(object)manifestationParticles != (Object)null) { ParticleSystem val3 = Object.Instantiate(manifestationParticles, position + Vector3.up * 1.5f, Quaternion.identity); ((Component)val3).gameObject.SetActive(true); val3.Play(true); Object.Destroy((Object)(object)((Component)val3).gameObject, 3f); } else { Plugin.Logger.LogWarning((object)"Manifest particles are missing in the Inspector! Skipping despawn VFX."); } Object.Destroy((Object)(object)activeObserver); } ToggleAndMoveScanNode(enable: false); } private void ChooseMasterObserver() { ObserversAI[] array = Object.FindObjectsByType((FindObjectsSortMode)0); int num = int.MaxValue; int num2 = -1; for (int i = 0; i < array.Length; i++) { if (!((EnemyAI)array[i]).isEnemyDead && ((EnemyAI)array[i]).thisEnemyIndex < num) { num = ((EnemyAI)array[i]).thisEnemyIndex; num2 = i; } } if (num2 == -1) { return; } master = array[num2]; if (((NetworkBehaviour)this).IsServer) { allChasers = new List(array); foreach (ObserversAI allChaser in allChasers) { if ((Object)(object)allChaser != (Object)(object)master) { allChaser.isMaster = false; allChaser.master = master; allChaser.activeObserver = master.activeObserver; allChaser.hasSpawnedSpectre = master.hasSpawnedSpectre; } } } if ((Object)(object)master == (Object)(object)this) { isMaster = true; SyncMasterObserverClientRpc(); } else if (((NetworkBehaviour)this).IsServer) { master.SyncMasterObserverClientRpc(); } } [ClientRpc] public void SyncMasterObserverClientRpc() { //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(1018360634u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1018360634u, 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).IsServer) { return; } master = this; isMaster = true; allChasers = new List(Object.FindObjectsByType((FindObjectsSortMode)0)); foreach (ObserversAI allChaser in allChasers) { if ((Object)(object)allChaser != (Object)(object)this) { allChaser.isMaster = false; allChaser.master = this; allChaser.activeObserver = activeObserver; allChaser.hasSpawnedSpectre = hasSpawnedSpectre; } } } public override void Update() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0081: 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_021b: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) if (isPryingDoor && inSpecialAnimation && (Object)(object)shipDoor != (Object)null) { ((Component)this).transform.position = Vector3.Lerp(((Component)this).transform.position, shipDoor.outsideDoorPoint.position, 7f * Time.deltaTime); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, shipDoor.outsideDoorPoint.rotation, 7f * Time.deltaTime); pryingDoorAnimTime = Mathf.Min(pryingDoorAnimTime + Time.deltaTime / pryOpenDoorAnimLength, 1f); if ((Object)(object)chaserAnimator != (Object)null) { chaserAnimator.SetFloat("pryOpenDoor", pryingDoorAnimTime); } shipDoor.shipDoorsAnimator.SetFloat("pryOpenDoor", pryingDoorAnimTime); BreakIntoShip(); return; } ((EnemyAI)this).Update(); if (((NetworkBehaviour)this).IsServer && isMaster && !base.isEnemyDead && base.currentBehaviourStateIndex == 0) { atmosphereTimer += Time.deltaTime; if (atmosphereTimer >= 10f) { atmosphereTimer = 0f; if (Random.value <= 0.3f) { PlayAtmosphereClientRpc(); } } } if (isBlasting && (Object)(object)activeObserver != (Object)null) { cameraShakeTimer -= Time.deltaTime; if (cameraShakeTimer <= 0f) { cameraShakeTimer = 0.3f; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController != (Object)null && !localPlayerController.isPlayerDead) { float num = Vector3.Distance(((Component)localPlayerController).transform.position, activeObserver.transform.position); if (num < 35f) { HUDManager.Instance.ShakeCamera(SirenShakeType); } } } } if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; if (!isStunned) { isStunned = true; DoAnimationClientRpc("hasBeenStunned"); Plugin.Logger.LogInfo((object)"Chaser has been stunned"); } } else { isStunned = false; } if (attackCooldown > 0f) { attackCooldown -= Time.deltaTime; } if (!base.isEnemyDead) { slowScanTimer += Time.deltaTime; if (slowScanTimer >= 2f) { slowScanTimer = 0f; cachedDoors = Object.FindObjectsOfType(); } } if (!base.isEnemyDead && base.enemyHP > 0 && base.currentBehaviourStateIndex == 2 && base.stunNormalizedTimer <= 0f) { if (((NetworkBehaviour)this).IsOwner) { float num2 = 1f; if ((Object)(object)base.targetPlayer != (Object)null && base.isOutside != !base.targetPlayer.isInsideFactory) { num2 = 0.5f; } currentChaseDuration += Time.deltaTime * num2; if (currentChaseDuration >= chaseTime) { currentChaseDuration = -9999f; Plugin.Logger.LogInfo((object)"Chase time expired"); if (isMaster) { TriggerChaseEndServerRpc(); } return; } } } else if (base.currentBehaviourStateIndex == 3) { chaseTimer += Time.deltaTime; if (chaseTimer > observerCooldown) { chaseTimer = 0f; base.targetPlayer = null; if (((NetworkBehaviour)this).IsServer && isMaster) { SpectreAnimationClientRpc("cooldownOver"); SpectreSetEmissionClientRpc(12f); ToggleSpotlightClientRpc(enable: true); foreach (ObserversAI allChaser in allChasers) { if ((Object)(object)allChaser != (Object)null) { ((EnemyAI)allChaser).targetPlayer = null; allChaser.SyncStateSafely(0); } } } } } if (slowDownTimer > 0f) { slowDownTimer -= Time.deltaTime; } if (((NetworkBehaviour)this).IsServer && !base.isEnemyDead && (base.currentBehaviourStateIndex == 2 || base.currentBehaviourStateIndex == 1) && (Object)(object)base.targetPlayer != (Object)null && (base.targetPlayer.isPlayerDead || !base.targetPlayer.isPlayerControlled)) { Plugin.Logger.LogInfo((object)"Victim died/DC'd. Chaser is ending the chase early"); TriggerChaseEndClientRpc(); } if (!base.isEnemyDead && base.currentBehaviourStateIndex == 2) { HandleCustomFootsteps(); if ((Object)(object)base.agent != (Object)null && ((Behaviour)base.agent).enabled && base.agent.isOnNavMesh) { Vector3 velocity = base.agent.velocity; bool flag = ((Vector3)(ref velocity)).sqrMagnitude > 0.1f; if (base.agent.speed == 0f && !isHalted) { isHalted = true; DoAnimationClientRpc("isHalted"); } else if (base.agent.speed > 0f && isHalted) { isHalted = false; DoAnimationClientRpc("hasAccelerated"); } } } int currentBehaviourStateIndex = base.currentBehaviourStateIndex; } public void LateUpdate() { //IL_0107: 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_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012f: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsServer) { if (!choseMasterObserver) { choseMasterObserver = true; ChooseMasterObserver(); } else if ((Object)(object)master == (Object)null || ((EnemyAI)master).isEnemyDead) { ChooseMasterObserver(); } } if ((Object)(object)activeObserver != (Object)null && !base.isEnemyDead && (base.currentBehaviourStateIndex == 0 || base.currentBehaviourStateIndex == 1)) { PlayerControllerB val = null; if (base.currentBehaviourStateIndex == 0) { val = GameNetworkManager.Instance.localPlayerController; } else if (base.currentBehaviourStateIndex == 1) { val = base.targetPlayer; } if ((Object)(object)val != (Object)null) { Animator componentInChildren = activeObserver.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.applyRootMotion = false; } Vector3 val2 = ((Component)val.gameplayCamera).transform.position - activeObserver.transform.position; val2.y = 0f; if (val2 != Vector3.zero) { Quaternion val3 = Quaternion.LookRotation(val2) * Quaternion.Euler(SpectreRotationOffset); activeObserver.transform.rotation = Quaternion.Slerp(activeObserver.transform.rotation, val3, Time.deltaTime * 5f); } Light componentInChildren2 = activeObserver.GetComponentInChildren(); if ((Object)(object)componentInChildren2 != (Object)null) { Vector3 val4 = ((Component)val.gameplayCamera).transform.position - ((Component)componentInChildren2).transform.position; if (val4 != Vector3.zero) { ((Component)componentInChildren2).transform.rotation = Quaternion.Slerp(((Component)componentInChildren2).transform.rotation, Quaternion.LookRotation(val4), Time.deltaTime * 10f); } } } if ((Object)(object)cachedScanNode != (Object)null && ((Component)cachedScanNode).gameObject.activeSelf) { ((Component)cachedScanNode).transform.position = activeObserver.transform.position + Vector3.up * 1.5f; } } if (!((NetworkBehaviour)this).IsServer && !base.isEnemyDead) { if (base.currentBehaviourStateIndex == 2) { base.agent.speed = ((slowDownTimer > 0f) ? 3f : baseSpeed); } else if (base.currentBehaviourStateIndex == 3) { base.agent.speed = 0f; } else { base.agent.speed = baseSpeed; } } } [ClientRpc] public void SyncNewTargetClientRpc(int newVictimId) { //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(1418583216u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, newVictimId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1418583216u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.targetPlayer = StartOfRound.Instance.allPlayerScripts[newVictimId]; Plugin.Logger.LogInfo((object)("Clients synced new target: " + base.targetPlayer.playerUsername)); } } } public override void DoAIInterval() { ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } switch (base.currentBehaviourStateIndex) { case 0: if (isMaster) { if (!hasSpawnedSpectre) { SpawnObserverSpectre(); } int num = Mathf.Min(StartOfRound.Instance.connectedPlayersAmount + 1, 4); int threshold = scrapAnger; PlayerControllerB val = ObserverScrapListener.CheckForGreedyPlayer(threshold); if ((Object)(object)val != (Object)null) { base.targetPlayer = val; Plugin.Logger.LogInfo((object)"Scrap anger threshold met"); SyncTargetClientRpc((int)val.playerClientId); SyncStateSafely(1); } } break; case 1: if (isMaster) { ManageMarkingState(); } break; case 2: ManageChaseState(); break; case 3: if (isStartingCooldown) { } break; } } private void ToggleAndMoveScanNode(bool enable, Vector3 newPosition = default(Vector3)) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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) ScanNodeProperties[] componentsInChildren = ((Component)this).GetComponentsInChildren(true); ScanNodeProperties[] array = componentsInChildren; foreach (ScanNodeProperties val in array) { if (val.nodeType == 1) { cachedScanNode = val; ((Component)val).gameObject.SetActive(enable); Collider component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.enabled = enable; } if (enable) { ((Component)val).transform.position = newPosition + Vector3.up * 1.5f; } break; } } } [ClientRpc] public void TogglePossessionSwarmClientRpc(bool enable) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4022354919u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enable, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4022354919u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)possessionSwarmParticles != (Object)null) { possessionSwarmParticles.SetActive(enable); } } } private EntranceTeleport GetClosestDoorToChaser() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) if (allTeleports == null || allTeleports.Length == 0) { allTeleports = Object.FindObjectsOfType(); } EntranceTeleport result = null; float num = float.MaxValue; EntranceTeleport[] array = allTeleports; foreach (EntranceTeleport val in array) { if (val.isEntranceToBuilding == base.isOutside) { float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position); if (num2 < num) { num = num2; result = val; } } } return result; } private EntranceTeleport GetCorrespondingDoor(EntranceTeleport chaserDoor) { if ((Object)(object)chaserDoor == (Object)null) { return null; } EntranceTeleport[] array = allTeleports; foreach (EntranceTeleport val in array) { if (val.entranceId == chaserDoor.entranceId && val.isEntranceToBuilding != chaserDoor.isEntranceToBuilding) { return val; } } return null; } private void UseElevator(bool goUp) { //IL_0036: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)elevatorScript == (Object)null) { return; } Vector3 val = (goUp ? elevatorScript.elevatorBottomPoint.position : elevatorScript.elevatorTopPoint.position); if (Vector3.Distance(((Component)this).transform.position, elevatorScript.elevatorInsidePoint.position) < 2f) { ((EnemyAI)this).SetDestinationToPosition(elevatorScript.elevatorInsidePoint.position, false); base.agent.speed = 0f; if (elevatorScript.elevatorFinishedMoving && elevatorScript.elevatorDoorOpen && elevatorScript.elevatorMovingDown == goUp) { elevatorScript.PressElevatorButtonOnServer(true); } if (!elevatorScript.elevatorFinishedMoving) { ((Behaviour)base.agent).enabled = false; ((Component)this).transform.position = elevatorScript.elevatorInsidePoint.position; } else { ((Behaviour)base.agent).enabled = true; } return; } ((Behaviour)base.agent).enabled = true; if (elevatorScript.elevatorFinishedMoving && elevatorScript.elevatorDoorOpen && elevatorScript.elevatorMovingDown == goUp) { ((EnemyAI)this).SetDestinationToPosition(elevatorScript.elevatorInsidePoint.position, false); base.agent.speed = baseSpeed; return; } ((EnemyAI)this).SetDestinationToPosition(val, false); if (Vector3.Distance(((Component)this).transform.position, val) < 2f) { if (!elevatorScript.elevatorCalled && elevatorScript.elevatorMovingDown != goUp) { elevatorScript.CallElevatorOnServer(goUp); } base.agent.speed = 0f; } else { base.agent.speed = baseSpeed; } } [ServerRpc(RequireOwnership = false)] public void TriggerChaseEndServerRpc() { //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.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3538892510u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3538892510u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; foreach (ObserversAI allChaser in allChasers) { if ((Object)(object)allChaser != (Object)null) { allChaser.TriggerChaseEndClientRpc(); } } } [ClientRpc] public void TriggerChaseEndClientRpc() { //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(2624471623u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2624471623u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; currentChaseDuration = 0f; base.creatureVoice.Stop(); if ((Object)(object)base.dieSFX != (Object)null) { base.creatureSFX.PlayOneShot(base.dieSFX, 1f); } base.agent.speed = 0f; SetChasePhysicsClientRpc(enablePhysics: false); DoAnimationClientRpc("hasBeenKilled"); if (((NetworkBehaviour)this).IsServer) { chaseTimer = 0f; SyncStateSafely(3); } SpectreSirenClientRpc(play: false); } } [ClientRpc] public void SetChasePhysicsClientRpc(bool enablePhysics) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(27746030u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enablePhysics, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 27746030u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((Component)this).GetComponentInChildren().enabled = enablePhysics; if (!enablePhysics) { base.agent.speed = 0f; } } } private void ManageMarkingState() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_0050: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)base.targetPlayer == (Object)null)) { Vector3 val = (((Object)(object)activeObserver != (Object)null) ? activeObserver.transform.position : RoundManager.FindMainEntrancePosition(true, base.isOutside)); if (Vector3.Distance(((Component)base.targetPlayer).transform.position, val) < detectRange && !isPlayingMarkAnimation) { isPlayingMarkAnimation = true; ((MonoBehaviour)this).StartCoroutine(MarkAndChaseSequence()); } } } private void HandleCustomFootsteps() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) float num = Vector3.Distance(((Component)this).transform.position, lastPosition); if (num > 0.02f) { footstepTimer += Time.deltaTime; if (footstepTimer > 0.35f) { footstepTimer = 0f; if (customFootstepSounds != null && customFootstepSounds.Length != 0 && (Object)(object)movementAudio != (Object)null) { int num2 = Random.Range(0, customFootstepSounds.Length); movementAudio.pitch = Random.Range(0.9f, 1.1f); movementAudio.PlayOneShot(customFootstepSounds[num2], 1f); } } } else { footstepTimer = 0f; } lastPosition = ((Component)this).transform.position; } [ClientRpc] public void SpectreAnimationClientRpc(string animationTrigger) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2864545691u, val2, (RpcDelivery)0); bool flag = animationTrigger != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(animationTrigger, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2864545691u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)activeObserver != (Object)null) { Animator componentInChildren = activeObserver.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.SetTrigger(animationTrigger); Plugin.Logger.LogInfo((object)("Triggered Spectre animation: " + animationTrigger)); } } } private IEnumerator MarkAndChaseSequence() { if (((NetworkBehaviour)this).IsServer && (Object)(object)base.targetPlayer != (Object)null) { PlayTauntInEarClientRpc(base.targetPlayer.actualClientId); } SpectreAnimationClientRpc("isMarked"); if ((Object)(object)base.targetPlayer != (Object)null) { PlayVictimWhisperClientRpc((int)base.targetPlayer.playerClientId); } yield return (object)new WaitForSeconds(SirenDelay); if (base.isEnemyDead || base.currentBehaviourStateIndex != 1) { yield break; } Plugin.Logger.LogInfo((object)"!!SIREN SOUNDING!!"); SpectreSirenClientRpc(play: true); SpectreSetBoolClientRpc("isBlasting", state: true); ((MonoBehaviour)this).StartCoroutine(FinishAirRaidAfter(AirRaidLength)); yield return (object)new WaitForSeconds(11f); if (base.isEnemyDead || base.currentBehaviourStateIndex != 1) { yield break; } foreach (ObserversAI chaser in allChasers) { if ((Object)(object)chaser != (Object)null && !((EnemyAI)chaser).isEnemyDead) { chaser.DoAnimationClientRpc("hasBeenSummoned"); chaser.ToggleVisualKnifeClientRpc(enable: true); chaser.PlayClientFXClientRpc(0); chaser.PlayChaserSFXClientRpc("reanimate"); chaser.TogglePossessionSwarmClientRpc(enable: true); ((MonoBehaviour)chaser).StartCoroutine(chaser.FlickerLightsDuringRise(6f)); } } yield return (object)new WaitForSeconds(8f); foreach (ObserversAI chaser2 in allChasers) { if ((Object)(object)chaser2 != (Object)null && !((EnemyAI)chaser2).isEnemyDead) { chaser2.TogglePossessionSwarmClientRpc(enable: false); } } if (base.isEnemyDead) { yield break; } yield return (object)new WaitForSeconds(3f); if (base.isEnemyDead) { yield break; } foreach (ObserversAI chaser3 in allChasers) { if ((Object)(object)chaser3 != (Object)null && !((EnemyAI)chaser3).isEnemyDead) { chaser3.DoAnimationClientRpc("riseFinished"); chaser3.PlayClientFXClientRpc(1); chaser3.SetChasePhysicsClientRpc(enablePhysics: true); chaser3.isHalted = false; ((EnemyAI)chaser3).agent.speed = baseSpeed; chaser3.SyncStateSafely(2); chaser3.isPlayingMarkAnimation = false; } } } private IEnumerator FinishAirRaidAfter(float delay) { yield return (object)new WaitForSeconds(delay); SpectreSetBoolClientRpc("isBlasting", state: false); SpectreAnimationClientRpc("isPoweringDown"); SpectreSetEmissionClientRpc(0f); ToggleSpotlightClientRpc(enable: false); } [ClientRpc] public void ToggleSpotlightClientRpc(bool enable) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1878763915u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enable, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1878763915u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)activeObserver != (Object)null)) { return; } Transform[] componentsInChildren = activeObserver.GetComponentsInChildren(true); Transform[] array = componentsInChildren; foreach (Transform val3 in array) { if (((Object)val3).name == "Spot Light") { ((Component)val3).gameObject.SetActive(enable); break; } } } [ClientRpc] public void SpectreSetEmissionClientRpc(float intensity) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: 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(3285939813u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref intensity, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3285939813u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)activeObserver != (Object)null)) { return; } Renderer[] componentsInChildren = activeObserver.GetComponentsInChildren(); Renderer[] array = componentsInChildren; foreach (Renderer val3 in array) { Material[] materials = val3.materials; foreach (Material val4 in materials) { string[] array2 = new string[2] { "_EmissionColor", "_EmissiveColor" }; string[] array3 = array2; foreach (string text in array3) { if (val4.HasProperty(text)) { int instanceID = ((Object)val4).GetInstanceID(); if (!originalEmissions.ContainsKey(instanceID)) { originalEmissions[instanceID] = val4.GetColor(text); } Color val5 = originalEmissions[instanceID]; float num = Mathf.Max(val5.r, Mathf.Max(val5.g, val5.b)); if (num > 0.0001f) { val4.SetColor(text, val5 / num * intensity); } else { val4.SetColor(text, Color.white * intensity); } } } } } } [ClientRpc] public void SpectreSetBoolClientRpc(string boolName, bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2011207444u, val2, (RpcDelivery)0); bool flag = boolName != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(boolName, false); } ((FastBufferWriter)(ref val)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2011207444u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (boolName == "isBlasting") { isBlasting = state; if ((Object)(object)activeObserver != (Object)null) { Transform val3 = activeObserver.transform.Find("Shockwave"); if ((Object)(object)val3 != (Object)null) { ParticleSystem component = ((Component)val3).GetComponent(); if ((Object)(object)component != (Object)null) { if (state) { component.Play(); } else { component.Stop(true, (ParticleSystemStopBehavior)0); } } } } } if ((Object)(object)activeObserver != (Object)null) { Animator componentInChildren = activeObserver.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.SetBool(boolName, state); Plugin.Logger.LogInfo((object)$"Set Spectre bool: {boolName} to {state}"); } } } [ClientRpc] public void SpectreSirenClientRpc(bool play) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4281834236u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref play, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4281834236u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)activeObserver != (Object)null)) { return; } AudioSource[] componentsInChildren = activeObserver.GetComponentsInChildren(); if (SirenAudioSourceIndex >= 0 && SirenAudioSourceIndex < componentsInChildren.Length) { AudioSource val3 = componentsInChildren[SirenAudioSourceIndex]; if ((Object)(object)val3 != (Object)null) { val3.volume = raidVolume; if (play) { val3.Play(); } else { val3.Stop(); } } } else { Plugin.Logger.LogWarning((object)$"Siren index {SirenAudioSourceIndex} out of bounds! Found {componentsInChildren.Length} sources."); } } [ClientRpc] public void PlayAtmosphereClientRpc() { //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(3330627720u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3330627720u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)activeObserver != (Object)null) || AtmosphereClips == null || AtmosphereClips.Length == 0) { return; } AudioSource[] componentsInChildren = activeObserver.GetComponentsInChildren(); if (AtmosphereAudioSourceIndex >= 0 && AtmosphereAudioSourceIndex < componentsInChildren.Length) { AudioSource val3 = componentsInChildren[AtmosphereAudioSourceIndex]; if ((Object)(object)val3 != (Object)null) { int num = Random.Range(0, AtmosphereClips.Length); val3.PlayOneShot(AtmosphereClips[num]); Plugin.Logger.LogInfo((object)"Played sound from spectre."); } } else { Plugin.Logger.LogWarning((object)$"Atmosphere index {AtmosphereAudioSourceIndex} out of bounds! Found {componentsInChildren.Length} sources."); } } [ClientRpc] public void ToggleVisualKnifeClientRpc(bool enable) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(228764123u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enable, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 228764123u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (knifeModels == null || knifeModels.Length == 0 || activeWeaponIndex < 0 || activeWeaponIndex >= knifeModels.Length) { return; } for (int i = 0; i < knifeModels.Length; i++) { if ((Object)(object)knifeModels[i] != (Object)null) { knifeModels[i].SetActive(enable && i == activeWeaponIndex); } } } public void SpawnKnifeItemLocally() { //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsServer) { return; } string text = "Knife"; if (knifeModels != null && activeWeaponIndex >= 0 && activeWeaponIndex < knifeModels.Length) { GameObject val = knifeModels[activeWeaponIndex]; if ((Object)(object)val != (Object)null) { string text2 = ((Object)val).name.ToLower(); if (text2.Contains("shovel")) { text = "Shovel"; } else if (text2.Contains("stopsign") || text2.Contains("stop sign")) { text = "Stop sign"; } else if (text2.Contains("yield")) { text = "Yield sign"; } } } Item val2 = null; foreach (Item items in StartOfRound.Instance.allItemsList.itemsList) { if (items.itemName == text || (text == "Knife" && items.itemName == "Kitchen knife")) { val2 = items; break; } } if (!((Object)(object)val2 == (Object)null)) { Vector3 val3 = (((Object)(object)handBone != (Object)null) ? handBone.position : (((Component)this).transform.position + Vector3.up * 1.5f)); Vector3 val4 = RoundManager.Instance.GetNavMeshPosition(val3, RoundManager.Instance.navHit, 5f, -1); if (!RoundManager.Instance.GotNavMeshPositionResult) { val4 = ((Component)this).transform.position; } val4.y += 1f; GameObject val5 = Object.Instantiate(val2.spawnPrefab, val4, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); GrabbableObject component = val5.GetComponent(); component.fallTime = 0f; component.targetFloorPosition = component.GetItemFloorPosition(val4); int scrapValue = (int)((float)Random.Range(val2.minValue, val2.maxValue) * RoundManager.Instance.scrapValueMultiplier); component.SetScrapValue(scrapValue); NetworkObject component2 = val5.GetComponent(); component2.Spawn(false); SyncScrapValueClientRpc(NetworkObjectReference.op_Implicit(component2), scrapValue); component.EnableItemMeshes(true); Plugin.Logger.LogInfo((object)"Dropped kitchen knife item"); } } [ClientRpc] public void SyncScrapValueClientRpc(NetworkObjectReference netObjRef, int scrapValue) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) 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(800401255u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref netObjRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val, scrapValue); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 800401255u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)RoundManager.Instance != (Object)null) { ((MonoBehaviour)RoundManager.Instance).StartCoroutine(DelayedScrapValueSync(netObjRef, scrapValue)); } else { ((MonoBehaviour)this).StartCoroutine(DelayedScrapValueSync(netObjRef, scrapValue)); } } } private IEnumerator DelayedScrapValueSync(NetworkObjectReference netObjRef, int scrapValue) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) yield return (object)new WaitForSeconds(1f); NetworkObject netObj = default(NetworkObject); if (((NetworkObjectReference)(ref netObjRef)).TryGet(ref netObj, (NetworkManager)null)) { GrabbableObject grabObj = ((Component)netObj).GetComponent(); if ((Object)(object)grabObj != (Object)null) { grabObj.SetScrapValue(scrapValue); } } } private void ManageChaseState() { //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.targetPlayer == (Object)null || BreakIntoShip()) { return; } bool flag = !base.targetPlayer.isInsideFactory; bool isOutside = base.isOutside; base.agent.speed = ((slowDownTimer > 0f) ? 3f : baseSpeed); BustOpenDoorsInRadius(); if (!base.isOutside && RoundManager.Instance.currentDungeonType == 4) { if ((Object)(object)elevatorScript == (Object)null) { elevatorScript = Object.FindObjectOfType(); } if ((Object)(object)elevatorScript != (Object)null) { if (isInElevatorStartRoom) { if (Vector3.Distance(((Component)this).transform.position, elevatorScript.elevatorBottomPoint.position) < 10f) { isInElevatorStartRoom = false; } } else if (Vector3.Distance(((Component)this).transform.position, elevatorScript.elevatorTopPoint.position) < 10f) { isInElevatorStartRoom = true; } bool flag2 = Mathf.Abs(((Component)base.targetPlayer).transform.position.y - elevatorScript.elevatorTopPoint.position.y) < Mathf.Abs(((Component)base.targetPlayer).transform.position.y - elevatorScript.elevatorBottomPoint.position.y); if (flag2 != isInElevatorStartRoom) { bool goUp = !isInElevatorStartRoom; UseElevator(goUp); return; } } } if (base.isOutside != flag) { base.movingTowardsTargetPlayer = false; EntranceTeleport closestDoorToChaser = GetClosestDoorToChaser(); if (!((Object)(object)closestDoorToChaser != (Object)null)) { return; } ((EnemyAI)this).SetDestinationToPosition(((Component)closestDoorToChaser).transform.position, false); if (Vector3.Distance(((Component)this).transform.position, ((Component)closestDoorToChaser).transform.position) < 4f) { EntranceTeleport correspondingDoor = GetCorrespondingDoor(closestDoorToChaser); if ((Object)(object)correspondingDoor != (Object)null) { TeleportEnemyServerRpc(correspondingDoor.entrancePoint.position, flag); } } } else { base.moveTowardsDestination = true; ((EnemyAI)this).SetDestinationToPosition(((Component)base.targetPlayer).transform.position, true); } } private void BustOpenDoorsInRadius() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsOwner || cachedDoors == null) { return; } float num = 5f; DoorLock[] array = cachedDoors; foreach (DoorLock val in array) { if ((Object)(object)val == (Object)null) { continue; } Vector3 val2 = ((Component)this).transform.position - ((Component)val).transform.position; if (!(((Vector3)(ref val2)).sqrMagnitude < num) || (doorCooldowns.ContainsKey(val) && Time.time - doorCooldowns[val] < 3f)) { continue; } AnimatedObjectTrigger component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null && !component.boolValue) { if (val.isLocked) { val.UnlockDoorServerRpc(); } DoAnimationClientRpc("bashDoor"); component.TriggerAnimationNonPlayer(true, true, false); val.OpenDoorAsEnemyServerRpc(); Plugin.Logger.LogInfo((object)"Chaser bashed a door open"); doorCooldowns[val] = Time.time; } } } private IEnumerator FlickerLightsDuringRise(float duration) { Light[] allLights = Object.FindObjectsOfType(); Dictionary originalIntensities = new Dictionary(); List nearbyLights = new List(); float radiusSq = 400f; Light[] array = allLights; foreach (Light l in array) { if ((Object)(object)l == (Object)null || (int)l.type == 1) { continue; } string nameLower = ((Object)((Component)l).gameObject).name.ToLower(); if (!nameLower.Contains("helmet") && !nameLower.Contains("visor") && !nameLower.Contains("sun")) { Vector3 val = ((Component)l).transform.position - ((Component)this).transform.position; if (((Vector3)(ref val)).sqrMagnitude <= radiusSq) { nearbyLights.Add(l); originalIntensities[l] = l.intensity; } } } for (float timer = 0f; timer < duration; timer += 0.1f) { foreach (Light l2 in nearbyLights) { if ((Object)(object)l2 != (Object)null && originalIntensities.ContainsKey(l2)) { float rand = Random.value; if (rand > 0.8f) { l2.intensity = originalIntensities[l2] * 2.5f; } else if (rand > 0.5f) { l2.intensity = originalIntensities[l2] * 0.1f; } else { l2.intensity = originalIntensities[l2]; } } } yield return (object)new WaitForSeconds(0.1f); } foreach (KeyValuePair kvp in originalIntensities) { if ((Object)(object)kvp.Key != (Object)null) { kvp.Key.intensity = kvp.Value; } } } [ServerRpc] public void TeleportEnemyServerRpc(Vector3 pos, bool setOutside) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Invalid comparison between Unknown and I4 //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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(3926938328u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setOutside, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3926938328u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TeleportEnemyClientRpc(pos, setOutside); } } [ClientRpc] public void TeleportEnemyClientRpc(Vector3 pos, bool setOutside) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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(2194695671u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setOutside, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2194695671u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TeleportEnemyLocally(pos, setOutside); } } } private void TeleportEnemyLocally(Vector3 pos, bool setOutside) { //IL_0014: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) ((Behaviour)base.agent).enabled = false; ((Component)this).transform.position = pos; ((Behaviour)base.agent).enabled = true; base.serverPosition = pos; ((EnemyAI)this).SetEnemyOutside(setOutside); mainEntrancePosition = RoundManager.FindMainEntrancePosition(true, base.isOutside); EntranceTeleport val = RoundManager.FindMainEntranceScript(setOutside); if ((Object)(object)val != (Object)null && val.doorAudios != null && val.doorAudios.Length != 0) { val.entrancePointAudio.PlayOneShot(val.doorAudios[0]); } } public override void OnCollideWithPlayer(Collider other) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (!base.isEnemyDead && base.currentBehaviourStateIndex == 2 && !(attackCooldown > 0f) && !(base.stunNormalizedTimer > 0f)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { val.DamagePlayer(chaserDamage, true, true, (CauseOfDeath)14, 0, false, default(Vector3)); attackCooldown = 0.5f; slowDownTimer = 1f; TriggerAttackAnimationServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void TriggerAttackAnimationServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1031757427u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1031757427u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TriggerAttackAnimationClientRpc(); } } } [ClientRpc] public void TriggerAttackAnimationClientRpc() { //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(3866338387u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3866338387u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; attackCooldown = 0.5f; slowDownTimer = 1f; Animator componentInChildren = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.SetTrigger("stabAttack"); } if (weaponStabSounds == null || activeWeaponIndex < 0 || activeWeaponIndex >= weaponStabSounds.Length) { return; } AudioClip[] sounds = weaponStabSounds[activeWeaponIndex].sounds; if (sounds != null && sounds.Length != 0 && (Object)(object)base.creatureSFX != (Object)null) { int num = Random.Range(0, sounds.Length); if ((Object)(object)sounds[num] != (Object)null) { base.creatureSFX.PlayOneShot(sounds[num], 1f); } } } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { if (base.isEnemyDead || base.currentBehaviourStateIndex != 2) { return; } ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (base.isEnemyDead) { return; } base.enemyHP -= force; if (base.enemyHP <= 0) { base.agent.speed = 0f; attackCooldown = 10f; if ((Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.Stop(); } ((EnemyAI)this).KillEnemyOnOwnerClient(false); } else if (((NetworkBehaviour)this).IsServer) { DoAnimationClientRpc("TakeDamage"); } } public override void KillEnemy(bool destroy = false) { if (base.isEnemyDead) { return; } base.agent.speed = 0f; ((Behaviour)base.agent).enabled = false; if ((Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.Stop(); } AudioClip dieSFX = base.dieSFX; base.dieSFX = null; ((EnemyAI)this).KillEnemy(destroy); base.dieSFX = dieSFX; if ((Object)(object)base.dieSFX != (Object)null && (Object)(object)base.creatureSFX != (Object)null) { base.creatureSFX.PlayOneShot(base.dieSFX, 1f); } if (((NetworkBehaviour)this).IsServer) { DoAnimationClientRpc("hasBeenKilled"); if (itemDrop) { SpawnKnifeItemLocally(); } ToggleVisualKnifeClientRpc(enable: false); } if (!AreOtherChasersAlive()) { SpectreSirenClientRpc(play: false); DespawnObserverSpectre(); } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Expected O, but got Unknown //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Expected O, but got Unknown //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3736050795u, new RpcReceiveHandler(__rpc_handler_3736050795), "SyncStateSafelyServerRpc"); ((NetworkBehaviour)this).__registerRpc(996601758u, new RpcReceiveHandler(__rpc_handler_996601758), "SyncStateSafelyClientRpc"); ((NetworkBehaviour)this).__registerRpc(1053520595u, new RpcReceiveHandler(__rpc_handler_1053520595), "SetPryingDoorServerRpc"); ((NetworkBehaviour)this).__registerRpc(2040238424u, new RpcReceiveHandler(__rpc_handler_2040238424), "SetPryingDoorClientRpc"); ((NetworkBehaviour)this).__registerRpc(1525562837u, new RpcReceiveHandler(__rpc_handler_1525562837), "DoAnimationServerRpc"); ((NetworkBehaviour)this).__registerRpc(1295253700u, new RpcReceiveHandler(__rpc_handler_1295253700), "DoAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(3891565636u, new RpcReceiveHandler(__rpc_handler_3891565636), "PlayVictimWhisperClientRpc"); ((NetworkBehaviour)this).__registerRpc(3962993773u, new RpcReceiveHandler(__rpc_handler_3962993773), "PlayChaserSFXClientRpc"); ((NetworkBehaviour)this).__registerRpc(549905190u, new RpcReceiveHandler(__rpc_handler_549905190), "PlayClientFXClientRpc"); ((NetworkBehaviour)this).__registerRpc(1365692926u, new RpcReceiveHandler(__rpc_handler_1365692926), "SpawnSpectreClientRpc"); ((NetworkBehaviour)this).__registerRpc(4289629946u, new RpcReceiveHandler(__rpc_handler_4289629946), "SyncTargetClientRpc"); ((NetworkBehaviour)this).__registerRpc(3975555292u, new RpcReceiveHandler(__rpc_handler_3975555292), "PlayTauntInEarClientRpc"); ((NetworkBehaviour)this).__registerRpc(272201980u, new RpcReceiveHandler(__rpc_handler_272201980), "DespawnSpectreClientRpc"); ((NetworkBehaviour)this).__registerRpc(1018360634u, new RpcReceiveHandler(__rpc_handler_1018360634), "SyncMasterObserverClientRpc"); ((NetworkBehaviour)this).__registerRpc(1418583216u, new RpcReceiveHandler(__rpc_handler_1418583216), "SyncNewTargetClientRpc"); ((NetworkBehaviour)this).__registerRpc(4022354919u, new RpcReceiveHandler(__rpc_handler_4022354919), "TogglePossessionSwarmClientRpc"); ((NetworkBehaviour)this).__registerRpc(3538892510u, new RpcReceiveHandler(__rpc_handler_3538892510), "TriggerChaseEndServerRpc"); ((NetworkBehaviour)this).__registerRpc(2624471623u, new RpcReceiveHandler(__rpc_handler_2624471623), "TriggerChaseEndClientRpc"); ((NetworkBehaviour)this).__registerRpc(27746030u, new RpcReceiveHandler(__rpc_handler_27746030), "SetChasePhysicsClientRpc"); ((NetworkBehaviour)this).__registerRpc(2864545691u, new RpcReceiveHandler(__rpc_handler_2864545691), "SpectreAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(1878763915u, new RpcReceiveHandler(__rpc_handler_1878763915), "ToggleSpotlightClientRpc"); ((NetworkBehaviour)this).__registerRpc(3285939813u, new RpcReceiveHandler(__rpc_handler_3285939813), "SpectreSetEmissionClientRpc"); ((NetworkBehaviour)this).__registerRpc(2011207444u, new RpcReceiveHandler(__rpc_handler_2011207444), "SpectreSetBoolClientRpc"); ((NetworkBehaviour)this).__registerRpc(4281834236u, new RpcReceiveHandler(__rpc_handler_4281834236), "SpectreSirenClientRpc"); ((NetworkBehaviour)this).__registerRpc(3330627720u, new RpcReceiveHandler(__rpc_handler_3330627720), "PlayAtmosphereClientRpc"); ((NetworkBehaviour)this).__registerRpc(228764123u, new RpcReceiveHandler(__rpc_handler_228764123), "ToggleVisualKnifeClientRpc"); ((NetworkBehaviour)this).__registerRpc(800401255u, new RpcReceiveHandler(__rpc_handler_800401255), "SyncScrapValueClientRpc"); ((NetworkBehaviour)this).__registerRpc(3926938328u, new RpcReceiveHandler(__rpc_handler_3926938328), "TeleportEnemyServerRpc"); ((NetworkBehaviour)this).__registerRpc(2194695671u, new RpcReceiveHandler(__rpc_handler_2194695671), "TeleportEnemyClientRpc"); ((NetworkBehaviour)this).__registerRpc(1031757427u, new RpcReceiveHandler(__rpc_handler_1031757427), "TriggerAttackAnimationServerRpc"); ((NetworkBehaviour)this).__registerRpc(3866338387u, new RpcReceiveHandler(__rpc_handler_3866338387), "TriggerAttackAnimationClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3736050795(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 newStateIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newStateIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SyncStateSafelyServerRpc(newStateIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_996601758(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 newStateIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newStateIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SyncStateSafelyClientRpc(newStateIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1053520595(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool pryingDoorServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pryingDoorServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SetPryingDoorServerRpc(pryingDoorServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2040238424(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool pryingDoorClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pryingDoorClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SetPryingDoorClientRpc(pryingDoorClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1525562837(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string animationTrigger = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationTrigger, false); } bool isBool = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isBool, default(ForPrimitives)); bool state = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref state, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).DoAnimationServerRpc(animationTrigger, isBool, state); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1295253700(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string animationTrigger = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationTrigger, false); } bool isBool = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isBool, default(ForPrimitives)); bool state = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref state, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).DoAnimationClientRpc(animationTrigger, isBool, state); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3891565636(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 victimClientId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref victimClientId); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).PlayVictimWhisperClientRpc(victimClientId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3962993773(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string sfxType = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref sfxType, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).PlayChaserSFXClientRpc(sfxType); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_549905190(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 fxType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref fxType); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).PlayClientFXClientRpc(fxType); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1365692926(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 spawnPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnPos); Quaternion spawnRot = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnRot); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SpawnSpectreClientRpc(spawnPos, spawnRot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4289629946(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SyncTargetClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3975555292(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong targetClientId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref targetClientId); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).PlayTauntInEarClientRpc(targetClientId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_272201980(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; ((ObserversAI)(object)target).DespawnSpectreClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1018360634(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; ((ObserversAI)(object)target).SyncMasterObserverClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1418583216(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 newVictimId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newVictimId); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SyncNewTargetClientRpc(newVictimId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4022354919(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool enable = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enable, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).TogglePossessionSwarmClientRpc(enable); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3538892510(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; ((ObserversAI)(object)target).TriggerChaseEndServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2624471623(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; ((ObserversAI)(object)target).TriggerChaseEndClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_27746030(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool chasePhysicsClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref chasePhysicsClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SetChasePhysicsClientRpc(chasePhysicsClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2864545691(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string animationTrigger = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationTrigger, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SpectreAnimationClientRpc(animationTrigger); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1878763915(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool enable = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enable, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).ToggleSpotlightClientRpc(enable); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3285939813(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float intensity = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref intensity, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SpectreSetEmissionClientRpc(intensity); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2011207444(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string boolName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref boolName, false); } bool state = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref state, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SpectreSetBoolClientRpc(boolName, state); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4281834236(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool play = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref play, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SpectreSirenClientRpc(play); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3330627720(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; ((ObserversAI)(object)target).PlayAtmosphereClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_228764123(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool enable = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enable, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).ToggleVisualKnifeClientRpc(enable); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_800401255(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference netObjRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref netObjRef, default(ForNetworkSerializable)); int scrapValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref scrapValue); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).SyncScrapValueClientRpc(netObjRef, scrapValue); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3926938328(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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); bool setOutside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setOutside, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).TeleportEnemyServerRpc(pos, setOutside); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2194695671(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); bool setOutside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setOutside, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ObserversAI)(object)target).TeleportEnemyClientRpc(pos, setOutside); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1031757427(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; ((ObserversAI)(object)target).TriggerAttackAnimationServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3866338387(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; ((ObserversAI)(object)target).TriggerAttackAnimationClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ObserversAI"; } } [BepInPlugin("Reiko888.Observer", "Observer", "2.0.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] internal class Plugin : BaseUnityPlugin { public const string modGUID = "Reiko888.Observer"; public const string modName = "Observer"; public const string modVersion = "2.0.1"; public static Plugin Instance = null; internal static ManualLogSource Logger = null; internal static readonly Harmony harmony = new Harmony("Reiko888.Observer"); internal static DuskMod mod = null; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } Logger = ((BaseUnityPlugin)this).Logger; AssetBundle val = AssetBundleUtils.LoadBundle(Assembly.GetExecutingAssembly(), "observer_cont"); mod = DuskMod.RegisterMod((BaseUnityPlugin)(object)this, val); mod.RegisterContentHandlers(); harmony.PatchAll(Assembly.GetExecutingAssembly()); Logger.LogInfo((object)"Plugin Observer is loaded!"); } } public class ObserverTerminalAssets : MonoBehaviour { public VideoClip bestiaryVideo; } public static class PluginInfo { public const string PLUGIN_GUID = "Reiko888.Observers"; public const string PLUGIN_NAME = "Observers"; public const string PLUGIN_VERSION = "2.0.1"; } } namespace Observers.src { [HarmonyPatch(typeof(Terminal))] internal class TerminalVideoInjectorPatch { [HarmonyPatch("Start")] [HarmonyPostfix] public static void InjectVideo(Terminal __instance) { if ((Object)(object)ContentHandler.Instance.observerAssets.ObserverChaser == (Object)null) { return; } ObserverTerminalAssets component = ContentHandler.Instance.observerAssets.ObserverChaser.GetComponent(); if ((Object)(object)component == (Object)null || (Object)(object)component.bestiaryVideo == (Object)null) { return; } foreach (TerminalNode enemyFile in __instance.enemyFiles) { if ((Object)(object)enemyFile != (Object)null && ((Object)enemyFile).name == "ObserverBestiaryNode") { enemyFile.displayVideo = component.bestiaryVideo; return; } } Plugin.Logger.LogWarning((object)"Could not find a TerminalNode named 'ObserverBestiaryNode' in the Bestiary."); } } [HarmonyPatch] public static class ObserversEventManager { public static event Action OnShipLeft; public static event Action OnPlayerDied; public static event Action OnPlayerDisconnect; [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] [HarmonyPostfix] private static void TriggerShipLeave() { ObserversEventManager.OnShipLeft?.Invoke(); } [HarmonyPatch(typeof(PlayerControllerB), "KillPlayer")] [HarmonyPostfix] private static void TriggerPlayerDied(PlayerControllerB __instance) { ObserversEventManager.OnPlayerDied?.Invoke(__instance); } [HarmonyPatch(typeof(StartOfRound), "OnPlayerDC")] [HarmonyPostfix] private static void TriggerPlayerDisconnect(int playerObjectNumber) { if ((Object)(object)StartOfRound.Instance != (Object)null && playerObjectNumber >= 0 && playerObjectNumber < StartOfRound.Instance.allPlayerScripts.Length) { ObserversEventManager.OnPlayerDisconnect?.Invoke(StartOfRound.Instance.allPlayerScripts[playerObjectNumber]); } } } public static class ObserverScrapListener { public static Dictionary> playerScrapReg = new Dictionary>(); public static HashSet SpawnedScrapReg = new HashSet(); public static HashSet globallyFoundScrapIDs = new HashSet(); public static void RegisterScrapPickup(ulong playerId, ulong scrapId) { if (SpawnedScrapReg.Contains(scrapId) && !globallyFoundScrapIDs.Contains(scrapId)) { globallyFoundScrapIDs.Add(scrapId); if (!playerScrapReg.ContainsKey(playerId)) { playerScrapReg[playerId] = new HashSet(); } playerScrapReg[playerId].Add(scrapId); Plugin.Logger.LogInfo((object)$"Registered pickup of scrap with ID {scrapId} by player with ID {playerId}"); } } public static PlayerControllerB CheckForGreedyPlayer(int threshold) { PlayerControllerB result = null; int num = threshold - 1; foreach (KeyValuePair> item in playerScrapReg) { int count = item.Value.Count; if (count > num) { PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[item.Key]; if ((Object)(object)val != (Object)null && !val.isPlayerDead && val.isPlayerControlled) { result = val; num = count; } } } return result; } public static void ClearData() { playerScrapReg.Clear(); SpawnedScrapReg.Clear(); globallyFoundScrapIDs.Clear(); Plugin.Logger.LogInfo((object)"Scrap list cleared for new round"); } } internal class ScrapListenerPatch { [HarmonyPatch(typeof(RoundManager), "SyncScrapValuesClientRpc")] public class ScrapSyncPatch { [HarmonyPostfix] public static void GetSpawnedScrap(NetworkObjectReference[] spawnedScrap) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) NetworkObject val2 = default(NetworkObject); for (int i = 0; i < spawnedScrap.Length; i++) { NetworkObjectReference val = spawnedScrap[i]; if (((NetworkObjectReference)(ref val)).TryGet(ref val2, (NetworkManager)null)) { ulong networkObjectId = val2.NetworkObjectId; if (ObserverScrapListener.SpawnedScrapReg.Add(networkObjectId)) { Plugin.Logger.LogInfo((object)$"Added scrap with ID {networkObjectId} to SpawnedScrapReg"); } } } } } [HarmonyPatch(typeof(PlayerControllerB), "GrabObjectClientRpc")] public class pickedUpUniqueScrapPatch { [HarmonyPostfix] public static void addItemToScrapReg(PlayerControllerB __instance, bool grabValidated, NetworkObjectReference grabbedObject) { NetworkObject val = default(NetworkObject); if (grabValidated && ((NetworkObjectReference)(ref grabbedObject)).TryGet(ref val, (NetworkManager)null)) { ulong networkObjectId = val.NetworkObjectId; ulong playerClientId = __instance.playerClientId; ObserverScrapListener.RegisterScrapPickup(playerClientId, networkObjectId); } } } [HarmonyPatch(typeof(GameNetworkManager), "Disconnect")] public class DisconnectPatch { [HarmonyPostfix] public static void ClearScrapData() { ObserverScrapListener.ClearData(); Plugin.Logger.LogInfo((object)"Lobby disconnected: Cleared Observer scrap memory and targets."); } } } } namespace DigitalRuby.LightningBolt { public enum LightningBoltAnimationMode { None, Random, Loop, PingPong } [RequireComponent(typeof(LineRenderer))] public class LightningBoltScript : MonoBehaviour { [Tooltip("The game object where the lightning will emit from. If null, StartPosition is used.")] public GameObject StartObject; [Tooltip("The start position where the lightning will emit from. This is in world space if StartObject is null, otherwise this is offset from StartObject position.")] public Vector3 StartPosition; [Tooltip("The game object where the lightning will end at. If null, EndPosition is used.")] public GameObject EndObject; [Tooltip("The end position where the lightning will end at. This is in world space if EndObject is null, otherwise this is offset from EndObject position.")] public Vector3 EndPosition; [Range(0f, 8f)] [Tooltip("How manu generations? Higher numbers create more line segments.")] public int Generations = 6; [Range(0.01f, 1f)] [Tooltip("How long each bolt should last before creating a new bolt. In ManualMode, the bolt will simply disappear after this amount of seconds.")] public float Duration = 0.05f; private float timer; [Range(0f, 1f)] [Tooltip("How chaotic should the lightning be? (0-1)")] public float ChaosFactor = 0.15f; [Tooltip("In manual mode, the trigger method must be called to create a bolt")] public bool ManualMode; [Range(1f, 64f)] [Tooltip("The number of rows in the texture. Used for animation.")] public int Rows = 1; [Range(1f, 64f)] [Tooltip("The number of columns in the texture. Used for animation.")] public int Columns = 1; [Tooltip("The animation mode for the lightning")] public LightningBoltAnimationMode AnimationMode = LightningBoltAnimationMode.PingPong; [NonSerialized] [HideInInspector] public Random RandomGenerator = new Random(); private LineRenderer lineRenderer; private List> segments = new List>(); private int startIndex; private Vector2 size; private Vector2[] offsets; private int animationOffsetIndex; private int animationPingPongDirection = 1; private bool orthographic; private void GetPerpendicularVector(ref Vector3 directionNormalized, out Vector3 side) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) if (directionNormalized == Vector3.zero) { side = Vector3.right; return; } float x = directionNormalized.x; float y = directionNormalized.y; float z = directionNormalized.z; float num = Mathf.Abs(x); float num2 = Mathf.Abs(y); float num3 = Mathf.Abs(z); float num4; float num5; float num6; if (num >= num2 && num2 >= num3) { num4 = 1f; num5 = 1f; num6 = (0f - (y * num4 + z * num5)) / x; } else if (num2 >= num3) { num6 = 1f; num5 = 1f; num4 = (0f - (x * num6 + z * num5)) / y; } else { num6 = 1f; num4 = 1f; num5 = (0f - (x * num6 + y * num4)) / z; } Vector3 val = new Vector3(num6, num4, num5); side = ((Vector3)(ref val)).normalized; } private void GenerateLightningBolt(Vector3 start, Vector3 end, int generation, int totalGenerations, float offsetAmount) { //IL_004a: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0112: 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_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) if (generation < 0 || generation > 8) { return; } if (orthographic) { start.z = (end.z = Mathf.Min(start.z, end.z)); } segments.Add(new KeyValuePair(start, end)); if (generation == 0) { return; } if (offsetAmount <= 0f) { Vector3 val = end - start; offsetAmount = ((Vector3)(ref val)).magnitude * ChaosFactor; } while (generation-- > 0) { int num = startIndex; startIndex = segments.Count; for (int i = num; i < startIndex; i++) { start = segments[i].Key; end = segments[i].Value; Vector3 val2 = (start + end) * 0.5f; RandomVector(ref start, ref end, offsetAmount, out var result); val2 += result; segments.Add(new KeyValuePair(start, val2)); segments.Add(new KeyValuePair(val2, end)); } offsetAmount *= 0.5f; } } public void RandomVector(ref Vector3 start, ref Vector3 end, float offsetAmount, out Vector3 result) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) Vector3 val; if (orthographic) { val = end - start; Vector3 normalized = ((Vector3)(ref val)).normalized; Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(0f - normalized.y, normalized.x, normalized.z); float num = (float)RandomGenerator.NextDouble() * offsetAmount * 2f - offsetAmount; result = val2 * num; } else { val = end - start; Vector3 directionNormalized = ((Vector3)(ref val)).normalized; GetPerpendicularVector(ref directionNormalized, out var side); float num2 = ((float)RandomGenerator.NextDouble() + 0.1f) * offsetAmount; float num3 = (float)RandomGenerator.NextDouble() * 360f; result = Quaternion.AngleAxis(num3, directionNormalized) * side * num2; } } private void SelectOffsetFromAnimationMode() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) if (AnimationMode == LightningBoltAnimationMode.None) { ((Renderer)lineRenderer).material.mainTextureOffset = offsets[0]; return; } int num; if (AnimationMode == LightningBoltAnimationMode.PingPong) { num = animationOffsetIndex; animationOffsetIndex += animationPingPongDirection; if (animationOffsetIndex >= offsets.Length) { animationOffsetIndex = offsets.Length - 2; animationPingPongDirection = -1; } else if (animationOffsetIndex < 0) { animationOffsetIndex = 1; animationPingPongDirection = 1; } } else if (AnimationMode == LightningBoltAnimationMode.Loop) { num = animationOffsetIndex++; if (animationOffsetIndex >= offsets.Length) { animationOffsetIndex = 0; } } else { num = RandomGenerator.Next(0, offsets.Length); } if (num >= 0 && num < offsets.Length) { ((Renderer)lineRenderer).material.mainTextureOffset = offsets[num]; } else { ((Renderer)lineRenderer).material.mainTextureOffset = offsets[0]; } } private void UpdateLineRenderer() { //IL_0052: 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) int num = segments.Count - startIndex + 1; lineRenderer.positionCount = num; if (num >= 1) { int num2 = 0; lineRenderer.SetPosition(num2++, segments[startIndex].Key); for (int i = startIndex; i < segments.Count; i++) { lineRenderer.SetPosition(num2++, segments[i].Value); } segments.Clear(); SelectOffsetFromAnimationMode(); } } private void Start() { orthographic = (Object)(object)Camera.main != (Object)null && Camera.main.orthographic; lineRenderer = ((Component)this).GetComponent(); lineRenderer.positionCount = 0; UpdateFromMaterialChange(); } private void Update() { orthographic = (Object)(object)Camera.main != (Object)null && Camera.main.orthographic; if (timer <= 0f) { if (ManualMode) { timer = Duration; lineRenderer.positionCount = 0; } else { Trigger(); } } timer -= Time.deltaTime; } public void Trigger() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_0089: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) timer = Duration + Mathf.Min(0f, timer); Vector3 start = ((!((Object)(object)StartObject == (Object)null)) ? (StartObject.transform.position + StartPosition) : StartPosition); Vector3 end = ((!((Object)(object)EndObject == (Object)null)) ? (EndObject.transform.position + EndPosition) : EndPosition); startIndex = 0; GenerateLightningBolt(start, end, Generations, Generations, 0f); UpdateLineRenderer(); } public void UpdateFromMaterialChange() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_0088: Unknown result type (might be due to invalid IL or missing references) size = new Vector2(1f / (float)Columns, 1f / (float)Rows); ((Renderer)lineRenderer).material.mainTextureScale = size; offsets = (Vector2[])(object)new Vector2[Rows * Columns]; for (int i = 0; i < Rows; i++) { for (int j = 0; j < Columns; j++) { offsets[j + i * Columns] = new Vector2((float)j / (float)Columns, (float)i / (float)Rows); } } } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace Reiko888.Observers.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }