using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using DunGen; using DunGen.Tags; using GameNetcodeStuff; using HarmonyLib; using JLL.API; using JLL.Components; using LethalLevelLoader; using LethalModDataLib.Base; using TMPro; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.Animations.Rigging; using UnityEngine.Events; using UnityEngine.Rendering.HighDefinition; using WesleysInteriorTools.EnemyAiChanges; using WesleysInteriorTools.Enums; using WesleysInteriorTools.Features; using WesleysInteriorTools.Items; using WesleysInteriorTools.NetcodePatcher; using WesleysInteriorTools.Patches; using WesleysInteriorTools.Save; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("WesleysInteriorTools")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("WesleysInteriorTools")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("39592857-f60c-4037-afe6-6ad4e7189866")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] [module: NetcodePatchedAssembly] public class AssimilatedEmployee : EnemyAI { private int previousBehaviourState = -1; private Vector3 fallToPosition; private RaycastHit rayHit; public bool hasBurst; private Coroutine fallToGroundCoroutine; public AnimationCurve fallCurve; public ParticleSystem burstParticle; public SkinnedMeshRenderer thisSkinnedRenderer; public AudioClip burstSFX; private Vector3 agentLocalVelocity; private float velX; private float velZ; public Transform animationContainer; private Vector3 previousPosition; public float seenPlayersTimer; public AISearchRoutine searchForPlayers; private Vector3 lastPositionOfSeenPlayer; private bool lostPlayerInChase; private float lostPlayerTimer; private float seePlayerMeter; private float jitterMoveInterval; private Vector3 jitterDest; private RaycastHit rayhit; public bool testingBloomEnemy; private bool chestPlantVisible; private float timeSinceBurst; public AudioSource breathingSFX; public AudioSource burstSource; public AudioSource burstSource2; public List plantFeetHitClips; public AudioClip chestBurst; private float timeAtLastChestBurst; public AudioClip[] chestPlantRoars; private float timeAtLastHeardNoise; private Vector3 pingAttentionPos; private float timeSinceHittingPlayer; private float timeAtLastHitStun; public GameObject killParticle; public PlayerControllerB burstPlayer; public AudioClip bitePlayer; private ScanNodeProperties playerScanNode; private float distanceToTarget; private RaycastHit hit; private bool isBehindObstacle; private float checkPathDistanceInterval; public Transform radarHeadTransform; public ParticleSystem teleportParticle; private IEnumerator teleportBloomCoroutine; public List AltEnemyMeshes; public override Transform GetRadarHeadTransform() { return radarHeadTransform; } public override void ShipTeleportEnemy() { ((EnemyAI)this).ShipTeleportEnemy(); if (teleportBloomCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(teleportBloomCoroutine); } ((MonoBehaviour)this).StartCoroutine(teleportBloom()); } private IEnumerator teleportBloom() { teleportParticle.Play(); base.creatureVoice.PlayOneShot(Object.FindObjectOfType().beamUpPlayerBodySFX); yield return (object)new WaitForSeconds(3f); if (StartOfRound.Instance.shipIsLeaving || !hasBurst) { yield break; } ((EnemyAI)this).SetEnemyOutside(true); base.isInsidePlayerShip = true; ShipTeleporter[] array = Object.FindObjectsOfType(); ShipTeleporter shipTeleporter = null; if (array != null) { for (int i = 0; i < array.Length; i++) { if (!array[i].isInverseTeleporter) { shipTeleporter = array[i]; } } } if ((Object)(object)shipTeleporter != (Object)null) { if (((NetworkBehaviour)this).IsOwner) { ((Behaviour)base.agent).enabled = false; ((Component)this).transform.position = shipTeleporter.teleporterPosition.position; ((Behaviour)base.agent).enabled = true; base.isInsidePlayerShip = true; } base.serverPosition = shipTeleporter.teleporterPosition.position; PlayerControllerB closestPlayer = ((EnemyAI)this).GetClosestPlayer(false, false, false); if ((Object)(object)closestPlayer != (Object)null) { PingAttention(((Component)closestPlayer.playerEye).transform.position); } } teleportBloomCoroutine = null; } public override void Start() { //IL_0066: 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) ((EnemyAI)this).Start(); if (!testingBloomEnemy) { base.inSpecialAnimation = true; ((Behaviour)base.agent).enabled = false; if (!hasBurst) { ((EnemyAI)this).EnableEnemyMesh(false, false, true); } } else { BurstForth(StartOfRound.Instance.allPlayerScripts[0], kill: false, ((Component)StartOfRound.Instance.allPlayerScripts[0]).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[0]).transform.eulerAngles); } AssimilatedGrowth assimilatedGrowth = Object.FindObjectOfType(); if ((Object)(object)assimilatedGrowth != (Object)null) { int num = -1; for (int i = 0; i < assimilatedGrowth.bloomEnemies.Length; i++) { if ((Object)(object)assimilatedGrowth.bloomEnemies[i] == (Object)null) { num = i; break; } } assimilatedGrowth.bloomEnemies[num] = this; } lostPlayerInChase = true; } public override void DetectNoise(Vector3 noisePosition, float noiseLoudness, int timesPlayedInOneSpot = 0, int noiseID = 0) { //IL_00b4: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsOwner || !lostPlayerInChase || seePlayerMeter > 0.07f || base.inSpecialAnimation || base.isEnemyDead || Time.realtimeSinceStartup - timeAtLastHeardNoise < 1f || Vector3.Distance(noisePosition, ((Component)this).transform.position + Vector3.up * 0.4f) < 0.5f || (base.currentBehaviourStateIndex == 2 && Vector3.Angle(((Component)this).transform.forward, noisePosition - ((Component)this).transform.position) < 60f)) { return; } float num = Vector3.Distance(noisePosition, ((Component)this).transform.position); float num2 = noiseLoudness / num; if (!(num > 15f) && !(num2 <= 0.075f)) { if (Physics.Linecast(((Component)this).transform.position, noisePosition, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { num2 *= 0.6f; } if (!(num2 <= 0.022f)) { PingAttention(noisePosition); } } } public void PingAttention(Vector3 lookAtPos) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) timeAtLastHeardNoise = Time.realtimeSinceStartup; pingAttentionPos = lookAtPos; PingAttentionRpc(lookAtPos); } [Rpc(/*Could not decode attribute arguments.*/)] public void PingAttentionRpc(Vector3 lookAtPos) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3351050978u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref lookAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3351050978u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; timeAtLastHeardNoise = Time.realtimeSinceStartup; pingAttentionPos = lookAtPos; } } } public void BurstForth(PlayerControllerB player, bool kill, Vector3 burstPosition, Vector3 burstRotation) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) burstPlayer = player; player.redirectToEnemy = (EnemyAI)(object)this; ((EnemyAI)this).EnableEnemyMesh(true, false, false); base.inSpecialAnimation = true; ((Behaviour)base.agent).enabled = false; ((Component)this).transform.position = burstPosition + Vector3.up * 0.005f; ((Component)this).transform.rotation = Quaternion.Euler(burstRotation); ((EnemyAI)this).SetEnemyOutside(burstPosition.y > -90f); SetSuit(player.currentSuitID); player.DropBlood(Vector3.down, true, false); timeSinceBurst = Time.realtimeSinceStartup; fallToPosition = burstPosition; if (Physics.Raycast(burstPosition + Vector3.up * 0.75f, Vector3.down, ref rayHit, 10f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { fallToPosition = ((RaycastHit)(ref rayHit)).point; } fallToPosition = RoundManager.Instance.GetNavMeshPosition(fallToPosition, default(NavMeshHit), 1f, base.agentMask); if (!RoundManager.Instance.GotNavMeshPositionResult) { fallToPosition = RoundManager.Instance.GetNavMeshPosition(fallToPosition, default(NavMeshHit), 10f, base.agentMask); } base.serverPosition = fallToPosition; base.serverRotation = ((Component)this).transform.eulerAngles; if (kill && (Object)(object)player == (Object)(object)GameNetworkManager.Instance.localPlayerController) { if (!player.isPlayerDead) { player.KillPlayer(Vector3.zero, false, (CauseOfDeath)5, 0, default(Vector3), true); } else { player.overrideDontSpawnBody = true; player.overrideDropItems = true; } player.overrideGameOverSpectatePivot = base.eye; } playerScanNode = ((Component)this).gameObject.GetComponentInChildren(); playerScanNode.headerText = "Body of " + player.playerUsername; playerScanNode.subText = "Cause of death: Assimilation"; playerScanNode.maxRange = 0; hasBurst = true; if (fallToGroundCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(fallToGroundCoroutine); } fallToGroundCoroutine = ((MonoBehaviour)this).StartCoroutine(DoBurstAnimation()); } private IEnumerator DoBurstAnimation() { base.creatureAnimator.SetTrigger("Burst"); burstParticle.Play(true); burstSource.pitch = Random.Range(0.93f, 1.07f); burstSource2.PlayOneShot(burstSFX); WalkieTalkie.TransmitOneShotAudio(burstSource2, burstSFX, 1f); float num = Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)this).transform.position); if (num < 5f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else if (num < 14f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } float fallTimer = 0f; float fallTime = Mathf.Min(Vector3.Distance(((Component)this).transform.position, fallToPosition), 15f) * 0.1f; Vector3 startFallingPos = ((Component)this).transform.position; Random random = new Random(StartOfRound.Instance.randomMapSeed + 7); CadaverGrowthAI cadaverGrowthAI = Object.FindObjectOfType(); float animationTime = 1.7f; if ((Object)(object)cadaverGrowthAI != (Object)null && (Object)(object)burstPlayer != (Object)null && Object.op_Implicit((Object)(object)((EnemyAI)this).GetClosestPlayer(false, false, false)) && base.mostOptimalDistance < 7f && cadaverGrowthAI.playerInfections[burstPlayer.playerClientId].emittingSpores && random.Next(0, 100) < 40) { animationTime = 0.35f; } if (!((EnemyAI)this).IsInsideMineshaftElevator(((Component)this).transform.position) || RoundManager.Instance.currentMineshaftElevator.elevatorFinishedMoving) { while (fallTimer < fallTime) { fallTimer += Time.deltaTime; animationTime -= Time.deltaTime; ((Component)this).transform.position = Vector3.Lerp(startFallingPos, fallToPosition, Mathf.Clamp(fallCurve.Evaluate(fallTimer / (fallTime + 0.01f)), 0f, 1f)); yield return null; } ((Component)this).transform.position = fallToPosition; } if (animationTime > 0f) { yield return (object)new WaitForSeconds(animationTime); } yield return (object)new WaitForSeconds(1.5f); base.creatureAnimator.SetBool("SproutLegs", true); int rand = Random.Range(0, plantFeetHitClips.Count); base.creatureSFX.PlayOneShot(plantFeetHitClips[rand]); yield return (object)new WaitForSeconds(0.25f); breathingSFX.Play(); base.creatureSFX.Play(); base.inSpecialAnimation = false; base.creatureAnimator.SetBool("FinishBurst", true); base.exitVentAnimationTime = 0f; if (((NetworkBehaviour)this).IsOwner) { CheckForVeryClosePlayer(seeInstantly: true); } } public void SetSuit(int suitId) { Material suitMaterial = StartOfRound.Instance.unlockablesList.unlockables[suitId].suitMaterial; Material[] sharedMaterials = ((Renderer)thisSkinnedRenderer).sharedMaterials; sharedMaterials[0] = suitMaterial; ((Renderer)thisSkinnedRenderer).sharedMaterials = sharedMaterials; } public override void DoAIInterval() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) if (base.inSpecialAnimation) { return; } ((EnemyAI)this).DoAIInterval(); switch (base.currentBehaviourStateIndex) { case 0: if (!CheckForVeryClosePlayer()) { if (!lostPlayerInChase) { ((EnemyAI)this).SwitchToBehaviourState(1); } else if (!searchForPlayers.inProgress) { searchForPlayers.searchWidth = 80f; ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } } break; case 1: if (CheckForVeryClosePlayer()) { break; } if ((Object)(object)base.targetPlayer != (Object)null) { checkPathDistanceInterval -= base.AIIntervalTime; if (checkPathDistanceInterval < 0f) { Vector3 val = ((Component)base.targetPlayer).transform.position; if (Physics.Raycast(((Component)base.targetPlayer).transform.position, Vector3.down, ref hit, 15f, base.agentMask, (QueryTriggerInteraction)1)) { val = ((RaycastHit)(ref hit)).point; } if (((EnemyAI)this).GetPathDistance(val, ((Component)this).transform.position)) { distanceToTarget = base.pathDistance; isBehindObstacle = distanceToTarget - Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) > distanceToTarget / 5f; } else { distanceToTarget = Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position); isBehindObstacle = false; } if (distanceToTarget > 8.7f) { checkPathDistanceInterval = 0.5f; } else { checkPathDistanceInterval = 0f; } } } if (lostPlayerInChase) { base.movingTowardsTargetPlayer = false; base.agent.speed = 9f; if (!searchForPlayers.inProgress) { searchForPlayers.searchWidth = 18f; if (lastPositionOfSeenPlayer == Vector3.zero) { lastPositionOfSeenPlayer = ((Component)this).transform.position; } ((EnemyAI)this).StartSearch(lastPositionOfSeenPlayer, searchForPlayers); } if (lostPlayerTimer > 9f) { ((EnemyAI)this).SwitchToBehaviourState(0); } } else if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } break; case 2: break; } } private bool CheckForVeryClosePlayer(bool seeInstantly = false) { //IL_003b: 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_0057: 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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) float num = -1f; if (seeInstantly) { num = 6f; } int allPlayersInLineOfSightNonAlloc = ((EnemyAI)this).GetAllPlayersInLineOfSightNonAlloc(70f, 50, (Transform)null, num, -1); float num2 = 2000f; int num3 = -1; for (int i = 0; i < allPlayersInLineOfSightNonAlloc; i++) { Vector3 val = base.eye.position - ((Component)RoundManager.Instance.tempPlayersArray[i]).transform.position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num2) { num2 = sqrMagnitude; num3 = i; } } if (num3 != -1) { lostPlayerTimer = 0f; seePlayerMeter = Mathf.Min(seePlayerMeter + base.AIIntervalTime, 0.5f); if (seePlayerMeter > 0.25f || seeInstantly) { lastPositionOfSeenPlayer = ((Component)RoundManager.Instance.tempPlayersArray[num3]).transform.position; lostPlayerInChase = false; seePlayerMeter = 0f; if ((Object)(object)base.targetPlayer == (Object)null || (Object)(object)base.targetPlayer != (Object)(object)RoundManager.Instance.tempPlayersArray[num3]) { base.targetPlayer = RoundManager.Instance.tempPlayersArray[num3]; SetNewTargetPlayerRpc((int)RoundManager.Instance.tempPlayersArray[num3].playerClientId); ((EnemyAI)this).ChangeOwnershipOfEnemy(RoundManager.Instance.tempPlayersArray[num3].actualClientId); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); } return true; } } else { seePlayerMeter = Mathf.Max(seePlayerMeter - base.AIIntervalTime, 0f); lostPlayerTimer += base.AIIntervalTime; if (lostPlayerTimer > 6f) { lostPlayerInChase = true; } } return false; } [Rpc(/*Could not decode attribute arguments.*/)] public void SetNewTargetPlayerRpc(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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2948708928u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2948708928u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.targetPlayer = StartOfRound.Instance.allPlayerScripts[playerId]; lostPlayerInChase = false; lostPlayerTimer = 0f; lastPositionOfSeenPlayer = ((Component)base.targetPlayer).transform.position; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); } } } private void CalculateAnimationDirection(float maxSpeed = 1f) { //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_008d: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) if (((Vector3)(ref agentLocalVelocity)).sqrMagnitude > 0f) { base.creatureSFX.volume = Mathf.Lerp(base.creatureSFX.volume, 1f, Time.deltaTime * 10f); } else { base.creatureSFX.volume = Mathf.Lerp(base.creatureSFX.volume, 0f, Time.deltaTime * 10f); } agentLocalVelocity = animationContainer.InverseTransformDirection(Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, 1f) / (Time.deltaTime * 2f)); velX = Mathf.Lerp(velX, agentLocalVelocity.x, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("MoveX", Mathf.Clamp(velX, 0f - maxSpeed, maxSpeed)); velZ = Mathf.Lerp(velZ, agentLocalVelocity.z, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("MoveZ", Mathf.Clamp(velZ, 0f - maxSpeed, maxSpeed)); previousPosition = ((Component)this).transform.position; } public override void OnCollideWithPlayer(Collider other) { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (!(Time.realtimeSinceStartup - timeSinceHittingPlayer < 0.65f) && !base.isEnemyDead) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { timeSinceHittingPlayer = Time.realtimeSinceStartup; burstSource.PlayOneShot(bitePlayer); WalkieTalkie.TransmitOneShotAudio(burstSource, bitePlayer, 1f); val.DamagePlayer(30, true, true, (CauseOfDeath)6, 8, false, default(Vector3)); GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(1f, true); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncBitePlayerRpc() { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_0077: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1116532825u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1116532825u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; burstSource.PlayOneShot(bitePlayer); WalkieTalkie.TransmitOneShotAudio(burstSource, bitePlayer, 1f); } } } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (!base.isEnemyDead) { TakeDamage(stun: true); } } public void TakeDamage(bool stun = false) { if (stun && Time.realtimeSinceStartup - timeAtLastHitStun > 1.15f && base.stunNormalizedTimer <= 0.2f) { timeAtLastHitStun = Time.realtimeSinceStartup; } base.enemyHP--; if (base.enemyHP <= 0) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } public override void KillEnemy(bool destroy = false) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) base.removedPowerLevel = true; GameObject val = Object.Instantiate(killParticle, ((Component)this).transform.position, ((Component)this).transform.rotation, RoundManager.Instance.mapPropsContainer.transform); Transform physicsParentAtEnemyPosition = GetPhysicsParentAtEnemyPosition(); burstPlayer.SpawnDeadBody((int)burstPlayer.playerClientId, Vector3.zero, 5, burstPlayer, 11, physicsParentAtEnemyPosition, val.transform, default(Vector3)); if (((NetworkBehaviour)this).IsServer) { GameObject val2 = Object.Instantiate(StartOfRound.Instance.ragdollGrabbableObjectPrefab, StartOfRound.Instance.propsContainer); val2.GetComponent().Spawn(false); val2.GetComponent().bodyID = (int)burstPlayer.playerClientId; } if (Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)this).transform.position) < 8f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } ((EnemyAI)this).EnableEnemyMesh(false, true, true); foreach (MeshRenderer altEnemyMesh in AltEnemyMeshes) { ((Renderer)altEnemyMesh).enabled = false; } base.inSpecialAnimation = true; ((Behaviour)base.agent).enabled = false; base.agent.speed = 0f; base.overrideSettingEnemyMeshes = true; burstSource.Stop(); base.creatureSFX.Stop(); base.creatureVoice.Stop(); breathingSFX.Stop(); ((EnemyAI)this).KillEnemy(false); } private Transform GetPhysicsParentAtEnemyPosition() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) VehicleController val = Object.FindObjectOfType(); if ((Object)(object)val != (Object)null && !val.physicsRegion.disablePhysicsRegion && val.physicsRegion.physicsCollider.ClosestPoint(((Component)this).transform.position) == ((Component)this).transform.position) { return val.physicsRegion.physicsTransform; } MineshaftElevatorController val2 = Object.FindObjectOfType(); if ((Object)(object)val2 != (Object)null) { PlayerPhysicsRegion componentInChildren = ((Component)val2).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null && componentInChildren.physicsCollider.ClosestPoint(((Component)this).transform.position + Vector3.up * 0.05f) == ((Component)this).transform.position + Vector3.up * 0.05f) { return componentInChildren.physicsTransform; } } return null; } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncChompingAnimRpc(bool chomping) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1172172720u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref chomping, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1172172720u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; chestPlantVisible = chomping; base.creatureAnimator.SetBool("ChestVisible", chomping); base.creatureAnimator.SetBool("ChestBite", chomping); if (chomping && !burstSource.isPlaying) { burstSource.Play(); } else if (!chomping && burstSource.isPlaying) { burstSource.Stop(); } } } private void LateUpdate() { if (base.inSpecialAnimation) { ((EnemyAI)this).MoveWithMineshaftElevator(); } } public override void Update() { //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Invalid comparison between Unknown and I4 //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_0194: 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_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_0947: Unknown result type (might be due to invalid IL or missing references) //IL_07e9: Unknown result type (might be due to invalid IL or missing references) //IL_07ee: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_07fd: Unknown result type (might be due to invalid IL or missing references) //IL_080d: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_081d: Unknown result type (might be due to invalid IL or missing references) //IL_083b: Unknown result type (might be due to invalid IL or missing references) //IL_0840: Unknown result type (might be due to invalid IL or missing references) //IL_087c: Unknown result type (might be due to invalid IL or missing references) //IL_0880: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_088d: Unknown result type (might be due to invalid IL or missing references) //IL_0892: Unknown result type (might be due to invalid IL or missing references) //IL_08e1: Unknown result type (might be due to invalid IL or missing references) //IL_08e5: Unknown result type (might be due to invalid IL or missing references) //IL_08ed: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_08fc: Unknown result type (might be due to invalid IL or missing references) //IL_0901: Unknown result type (might be due to invalid IL or missing references) //IL_0907: Unknown result type (might be due to invalid IL or missing references) //IL_090c: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead || base.inSpecialAnimation) { return; } bool flag = Time.realtimeSinceStartup - timeAtLastHeardNoise < 1.5f; bool flag2 = Time.realtimeSinceStartup - timeAtLastHitStun < 0.75f; if ((flag && (lostPlayerInChase || seePlayerMeter < 0.07f)) || flag2 || base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; velX = Mathf.Lerp(velX, 0f, Time.deltaTime * 3f); velZ = Mathf.Lerp(velZ, 0f, Time.deltaTime * 3f); base.creatureAnimator.SetFloat("MoveX", velX); base.creatureAnimator.SetFloat("MoveZ", velZ); base.creatureAnimator.SetBool("stun", base.stunNormalizedTimer > 0f); base.creatureAnimator.SetBool("hitStunned", flag2 && base.stunNormalizedTimer <= 0f); if ((Object)(object)base.stunnedByPlayer != (Object)null) { flag = true; pingAttentionPos = ((Component)base.stunnedByPlayer).transform.position; } if (flag) { RoundManager.Instance.tempTransform.position = ((Component)this).transform.position; RoundManager.Instance.tempTransform.LookAt(pingAttentionPos); ((Component)this).transform.eulerAngles = new Vector3(0f, Mathf.LerpAngle(((Component)this).transform.eulerAngles.y, RoundManager.Instance.tempTransform.eulerAngles.y, Time.deltaTime * 22f), 0f); } return; } base.creatureAnimator.SetBool("hitStunned", false); base.creatureAnimator.SetBool("stun", false); CalculateAnimationDirection(); if (breathingSFX.isPlaying && Time.realtimeSinceStartup - timeSinceBurst > 10f) { breathingSFX.Stop(); playerScanNode.maxRange = 17; } int num = 18; if ((int)TimeOfDay.Instance.currentLevelWeather == 3) { num = 8; } if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.25f, 80f, num, 5f, -1)) { if (base.currentBehaviourStateIndex == 1 && !lostPlayerInChase) { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.8f, 0.7f); } else { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.8f, 0.3f); } } switch (base.currentBehaviourStateIndex) { case 0: if (previousBehaviourState != base.currentBehaviourStateIndex) { if (base.previousBehaviourStateIndex == 1 && searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } if (burstSource.isPlaying) { burstSource.Stop(); } previousBehaviourState = base.currentBehaviourStateIndex; } if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = 5f; if (chestPlantVisible) { chestPlantVisible = false; base.creatureAnimator.SetBool("ChestVisible", false); ChestBurstRpc(burst: false); } } break; case 1: { if (previousBehaviourState != base.currentBehaviourStateIndex) { previousBehaviourState = base.currentBehaviourStateIndex; } if (!((NetworkBehaviour)this).IsOwner || (Object)(object)base.targetPlayer == (Object)null || lostPlayerInChase) { break; } RoundManager.Instance.tempTransform.position = ((Component)this).transform.position; RoundManager.Instance.tempTransform.LookAt(((Component)base.targetPlayer).transform); ((Component)this).transform.eulerAngles = new Vector3(0f, Mathf.LerpAngle(((Component)this).transform.eulerAngles.y, RoundManager.Instance.tempTransform.eulerAngles.y, Time.deltaTime * 35f), 0f); float num2 = distanceToTarget; if (num2 < 3.6f) { base.agent.speed = 7f; base.movingTowardsTargetPlayer = true; base.agent.acceleration = Mathf.Lerp(base.agent.acceleration, 50f, Time.deltaTime * 12f); chestPlantVisible = true; base.creatureAnimator.SetBool("ChestVisible", true); if (!base.creatureAnimator.GetBool("ChestBite")) { base.creatureAnimator.SetBool("ChestBite", true); SyncChompingAnimRpc(chomping: true); } if (!burstSource.isPlaying) { burstSource.Play(); } break; } if (base.creatureAnimator.GetBool("ChestBite")) { base.creatureAnimator.SetBool("ChestBite", false); SyncChompingAnimRpc(chomping: false); } if (burstSource.isPlaying) { burstSource.Stop(); } if (chestPlantVisible) { if (num2 > 8f && Time.realtimeSinceStartup - timeAtLastChestBurst > 3f) { chestPlantVisible = false; base.creatureAnimator.SetBool("ChestVisible", false); ChestBurstRpc(burst: false); } } else if (num2 < 6f) { timeAtLastChestBurst = Time.realtimeSinceStartup; chestPlantVisible = true; base.creatureAnimator.SetBool("ChestVisible", true); base.creatureVoice.PlayOneShot(chestBurst); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, chestBurst, 1f); base.creatureVoice.clip = chestPlantRoars[Random.Range(0, chestPlantRoars.Length)]; base.creatureVoice.Play(); ChestBurstRpc(burst: true); } if (num2 > 18f || isBehindObstacle) { base.movingTowardsTargetPlayer = true; base.agent.speed = 10f; base.agent.acceleration = Mathf.Lerp(base.agent.acceleration, 120f, Time.deltaTime * 12f); break; } float num3 = 3f; if (base.pathDistance > 12f) { num3 = 6f; } base.agent.speed = Random.Range(7f, 18f); jitterMoveInterval -= Time.deltaTime; if (jitterMoveInterval < 0f) { jitterMoveInterval = Random.Range(0.1f, 0.3f); Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)this).transform.position + Vector3.up * 0.75f, ((Component)base.targetPlayer).transform.position - ((Component)this).transform.position); Vector3 point = ((Ray)(ref val)).GetPoint(Random.Range(0f, num2 / 2f)); float num4 = Random.Range(0f, Mathf.Clamp(num2 / num3, 4f, 15f)); int num5 = 1; if (Random.Range(0, 100) < 50) { num5 = -1; } if (Physics.Raycast(point, Vector3.Cross(((Ray)(ref val)).direction * (float)num5, Vector3.up), ref rayhit, num4, StartOfRound.Instance.collidersAndRoomMask, (QueryTriggerInteraction)1)) { num4 = Random.Range(0f, Mathf.Clamp(num2 / 3f, 4f, ((RaycastHit)(ref rayhit)).distance)); } Ray val2 = new Ray(point, Vector3.Cross(((Ray)(ref val)).direction * (float)num5, Vector3.up)); jitterDest = ((Ray)(ref val2)).GetPoint(num4); } base.agent.acceleration = Mathf.Lerp(base.agent.acceleration, 180f, Time.deltaTime * 12f); base.movingTowardsTargetPlayer = false; ((EnemyAI)this).SetDestinationToPosition(jitterDest, false); break; } case 2: if (previousBehaviourState != base.currentBehaviourStateIndex) { previousBehaviourState = base.currentBehaviourStateIndex; } break; } } [Rpc(/*Could not decode attribute arguments.*/)] public void ChestBurstRpc(bool burst) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(611549464u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref burst, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 611549464u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetBool("ChestVisible", burst); chestPlantVisible = burst; if (burst) { timeAtLastChestBurst = Time.realtimeSinceStartup; base.creatureVoice.PlayOneShot(chestBurst); base.creatureVoice.clip = chestPlantRoars[Random.Range(0, chestPlantRoars.Length)]; base.creatureVoice.Play(); } } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3351050978u, new RpcReceiveHandler(__rpc_handler_3351050978), "PingAttentionRpc"); ((NetworkBehaviour)this).__registerRpc(2948708928u, new RpcReceiveHandler(__rpc_handler_2948708928), "SetNewTargetPlayerRpc"); ((NetworkBehaviour)this).__registerRpc(1116532825u, new RpcReceiveHandler(__rpc_handler_1116532825), "SyncBitePlayerRpc"); ((NetworkBehaviour)this).__registerRpc(1172172720u, new RpcReceiveHandler(__rpc_handler_1172172720), "SyncChompingAnimRpc"); ((NetworkBehaviour)this).__registerRpc(611549464u, new RpcReceiveHandler(__rpc_handler_611549464), "ChestBurstRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3351050978(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 lookAtPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lookAtPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedEmployee)(object)target).PingAttentionRpc(lookAtPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2948708928(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 newTargetPlayerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newTargetPlayerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedEmployee)(object)target).SetNewTargetPlayerRpc(newTargetPlayerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1116532825(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; ((AssimilatedEmployee)(object)target).SyncBitePlayerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1172172720(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 chomping = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref chomping, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedEmployee)(object)target).SyncChompingAnimRpc(chomping); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_611549464(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 burst = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref burst, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedEmployee)(object)target).ChestBurstRpc(burst); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "AssimilatedEmployee"; } } public class AssimilatedGrowth : EnemyAI { public List GrowthTiles = new List(); public Random growthRandom; private int previousBehaviourState = -1; [Header("Growth Properties")] public float GrowthInterval = 3f; public AnimationCurve growthIntervalCurveOverDay; [Range(0f, 100f)] public float baseSpreadChance = 3f; public int TileCapacity = 40; [Range(0f, 100f)] public float GrowthChancePerInterval = 20f; [Space(5f)] [Header("Infect Properties")] public float InfectIntervalTime = 1f; [Range(0f, 2f)] public float ChanceToInfectMultiplier = 0.25f; [Range(0f, 2f)] public float InfectionSpeedMultiplier = 0.25f; [Range(0f, 2f)] public float BurstSpeedMultiplier = 0.25f; public GameObject[] plantPrefabs; private RaycastHit hit; public Tag RoomTileTag; public Tag TunnelTileTag; public Tag CaveTileTag; private float spreadInterval; public GameObject CadaverSporesParticle; public BatchAllMeshChildren[] plantBatchers; private int previousTileIndex; public int[,] moldPositions; public GameObject destroyPlantParticle; public AudioSource destroyAudio; public AudioSource plantAudio; private float cullIntervalTime = 0.75f; private float cullInterval; private float infectInterval; public PlayerInfection[] playerInfections; private int numberOfInfected; public GameObject backFlowersPrefab; private float showSignsMeter; public bool growingRecentPlant; public Vector3 recentPlantPosition; private float recentPlantSizeTarget = 1f; private (int batchNum, int positionIndex, int plantType) growingPlant; public GameObject bloomEnemyPrefab; public EnemyType bloomEnemyType; public AssimilatedEmployee[] bloomEnemies; private float timeLastMusicPlayed; public AudioSource bloomMusic; public GameObject faceSporesPrefab; public AudioSource sporeAmbienceSource; private float updateSporeAudioInterval; private float distToPlants = 100f; private bool growingInTiles; public GameObject scanNodePrefab; private const string sporesWarningText = "HEALTH RISK!\n\nAir filter overwhelmed by particulates"; private List particlesTempArray; private Random playerDeathChanceRandom; public GameObject crackDecal; public AudioClip[] healPlayerSFX; public float totalTimeSpentInPlants; private float growthBurstTimer; private bool inGrowthBurst; private float timeAtLastHealing; public AudioSource vinesInHeadAudio; public AudioClip[] vinesInHeadSFX; private bool hinderingLocalPlayer; private float setPoison; private float localPlayerImmunityTimer; private bool stoodInWeedsLastCheck; public void OnEnable() { ((UnityEvent)(object)StartOfRound.Instance.LocalPlayerTalkEvent).AddListener((UnityAction)OnLocalPlayerTalk); ((UnityEvent)(object)StartOfRound.Instance.LocalPlayerDieEvent).AddListener((UnityAction)OnLocalPlayerDie); } public void OnDisable() { ((UnityEvent)(object)StartOfRound.Instance.LocalPlayerTalkEvent).RemoveListener((UnityAction)OnLocalPlayerTalk); ((UnityEvent)(object)StartOfRound.Instance.LocalPlayerDieEvent).RemoveListener((UnityAction)OnLocalPlayerDie); if (hinderingLocalPlayer) { hinderingLocalPlayer = false; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; localPlayerController.isMovementHindered--; playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId].hinderingPlayerMovement = false; } setPoison = 0f; if (GameNetworkManager.Instance.localPlayerController.overridePoisonValue) { GameNetworkManager.Instance.localPlayerController.overridePoisonValue = false; } } public void OnLocalPlayerDie(PlayerControllerB player, int deathAnimation) { //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_00db: 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_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_016d: 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_019a: 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) switch (deathAnimation) { case -1: case 7: case 9: return; default: if ((Object)(object)player.enemyWaitingForBodyRagdoll != (Object)null && player.enemyWaitingForBodyRagdoll.enemyType.enemyName == "MouthDog") { return; } break; case 200: break; } if (playerInfections[player.playerClientId].infected && (playerInfections[player.playerClientId].bloomOnDeath || !((double)(playerInfections[player.playerClientId].infectionMeter + 0.15f) < playerDeathChanceRandom.NextDouble()))) { Vector3 val = ((Component)player).transform.position; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(((Component)player).transform.position, Vector3.down, ref val2, 10f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { val = ((RaycastHit)(ref val2)).point; } val = RoundManager.Instance.GetNavMeshPosition(val, default(NavMeshHit), 10f, base.agentMask); if (RoundManager.Instance.GotNavMeshPositionResult) { playerInfections[player.playerClientId].infected = false; numberOfInfected--; BurstFromPlayer(player, ((Component)player).transform.position, ((Component)player).transform.eulerAngles); SyncBurstFromPlayerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)player).transform.position, ((Component)player).transform.eulerAngles); } } } public void OnLocalPlayerTalk(float loudness) { if (GameNetworkManager.Instance.localPlayerController.isPlayerControlled) { PlayerInfection val = playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId]; if (val.infected && val.infectionMeter > 0.6f && (val.emittingSpores || Random.Range(0, 1000) < 10) && !((Object)(object)val.backFlowers == (Object)null)) { CoughSporesRpc(loudness, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void CoughSporesRpc(float loudness, 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_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_0091: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3885809940u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref loudness, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3885809940u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerInfection val4 = playerInfections[playerId]; if (!(StartOfRound.Instance.allPlayerScripts[playerId].LineOfSightToPositionAngle(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, 12, 0f, -1) < 30f)) { return; } float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[playerId]).transform.position); if (num < 6f) { HUDManager.Instance.DisplayStatusEffect("HEALTH RISK!\n\nAir filter overwhelmed by particulates"); } if ((float)Random.Range(0, 1000) < Mathf.Lerp(50f, 1f, Mathf.Clamp(num * num / 60f, 0f, 1f))) { bool flag = false; if (Random.Range(0, 100) < 70) { flag = true; } bool flag2 = flag || Random.Range(0, 100) < 40; InfectPlayer(GameNetworkManager.Instance.localPlayerController, flag, flag2); InfectPlayerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, flag, flag2); } } public bool GetAllPlantPositionsInRadius(Vector3 position, float radius, bool fillArray = false) { //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) //IL_0045: 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) bool result = false; int[] array = new int[plantBatchers.Length]; int length = moldPositions.GetLength(0); for (int i = 0; i < plantBatchers.Length; i++) { List batchedPositions = plantBatchers[i].batchedPositions; for (int j = 0; j < batchedPositions.Count; j++) { Vector3 val = batchedPositions[j] - position; if (!(((Vector3)(ref val)).sqrMagnitude <= radius * radius)) { continue; } result = true; if (fillArray) { moldPositions[array[i], i] = j; array[i]++; if (array[i] >= length) { return true; } } else { array[i]++; } } } if (fillArray) { for (int k = 0; k < plantBatchers.Length; k++) { for (int l = array[k]; l < length; l++) { moldPositions[l, k] = -1; } } } return result; } public void DestroyPlantAtPosition(Vector3 pos, bool playEffect = false) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) float radius = 1.5f; if (!GetAllPlantPositionsInRadius(pos, 1.5f, fillArray: true)) { return; } int length = moldPositions.GetLength(0); for (int i = 0; i < plantBatchers.Length; i++) { List batchedPositions = plantBatchers[i].batchedPositions; for (int j = 0; j < length && moldPositions[j, i] != -1; j++) { if (playEffect) { Vector3 val = batchedPositions[moldPositions[j, i]] + Vector3.up * 0.5f; Object.Instantiate(destroyPlantParticle, val, Quaternion.identity, (Transform)null); destroyAudio.Stop(); ((Component)destroyAudio).transform.position = val; destroyAudio.Play(); RoundManager.Instance.PlayAudibleNoise(((Component)destroyAudio).transform.position, 6f, 0.5f, 0, false, 99611); } RemoveWeedFromTile(plantBatchers[i].batchedPositionTiles[moldPositions[j, i]], pos, radius); } } int[] array = new int[40]; for (int k = 0; k < plantBatchers.Length; k++) { List batchedPositions2 = plantBatchers[k].batchedPositions; for (int l = 0; l < length; l++) { array[l] = moldPositions[l, k]; } Array.Sort(array, (int a, int b) => b.CompareTo(a)); for (int num = 0; num < length; num++) { moldPositions[num, k] = array[num]; if (moldPositions[num, k] < 0 || moldPositions[num, k] >= batchedPositions2.Count) { break; } plantBatchers[k].DestroyWeedAtIndexInMatrixList(moldPositions[num, k]); } } } private void RemoveWeedFromTile(int tileIndex, Vector3 destroyAtPos, float radius) { //IL_0049: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_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_01d1: 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_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) TileWithGrowth obj = GrowthTiles[tileIndex]; obj.plantsInTile--; GrowthTiles[tileIndex].particlesContainer.GetComponentsInChildren(true, particlesTempArray); Vector3 val; for (int num = particlesTempArray.Count - 1; num >= 0; num--) { val = destroyAtPos + Vector3.up * 0.75f - particlesTempArray[num].position; if (((Vector3)(ref val)).sqrMagnitude <= radius * radius) { Object.Destroy((Object)(object)((Component)particlesTempArray[num]).gameObject); } } GrowthTiles[tileIndex].scanNodesContainer.GetComponentsInChildren(true, particlesTempArray); for (int num2 = particlesTempArray.Count - 1; num2 >= 0; num2--) { val = destroyAtPos + Vector3.up * 0.35f - particlesTempArray[num2].position; if (((Vector3)(ref val)).sqrMagnitude <= radius * radius) { Object.Destroy((Object)(object)((Component)particlesTempArray[num2]).gameObject); } } if (growingRecentPlant && growingPlant.positionIndex < plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum].Count) { Matrix4x4 val2 = plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex]; val = ((Matrix4x4)(ref val2)).GetPosition() - destroyAtPos; if (((Vector3)(ref val)).sqrMagnitude <= radius * radius) { growingPlant = (batchNum: -1, positionIndex: -1, plantType: -1); growingRecentPlant = false; } } GrowthTiles[tileIndex].plantPositions.Remove(destroyAtPos); for (int i = 0; i < GrowthTiles[tileIndex].plantPositions.Count; i++) { val = GrowthTiles[tileIndex].plantPositions[i] - destroyAtPos; if (((Vector3)(ref val)).sqrMagnitude <= radius * radius) { GrowthTiles[tileIndex].plantPositions.RemoveAt(i); } } if (GrowthTiles[tileIndex].plantsInTile <= 0) { GrowthTiles[tileIndex].eradicated = true; GrowthTiles[tileIndex].eradicatedAtTime = Time.realtimeSinceStartup; IEnumerable adjacentTiles = GrowthTiles[tileIndex].tile.GetAdjacentTiles(); List list = new List(); foreach (Tile item in adjacentTiles) { list.Add(item); } for (int j = 0; j < list.Count; j++) { for (int k = 0; k < GrowthTiles.Count; k++) { if ((Object)(object)GrowthTiles[k].tile == (Object)(object)list[j]) { GrowthTiles[k].cannotSpread = false; } } } } spreadInterval = Mathf.Min(spreadInterval + 2f, 12f); } public override void Start() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown if (Object.FindObjectsByType((FindObjectsSortMode)0).Length > 1) { base.isEnemyDead = true; base.inSpecialAnimation = true; if (((NetworkBehaviour)this).IsServer) { Object.Destroy((Object)(object)((Component)this).gameObject); } return; } ((EnemyAI)this).Start(); particlesTempArray = new List(TileCapacity); bloomEnemies = new AssimilatedEmployee[StartOfRound.Instance.allPlayerScripts.Length]; plantBatchers = ((Component)this).gameObject.GetComponents(); moldPositions = new int[40, plantBatchers.Length]; playerInfections = (PlayerInfection[])(object)new PlayerInfection[StartOfRound.Instance.allPlayerScripts.Length]; for (int i = 0; i < playerInfections.Length; i++) { playerInfections[i] = new PlayerInfection(); } for (int j = 0; j < plantBatchers.Length; j++) { int length = moldPositions.GetLength(0); for (int k = 0; k < length; k++) { moldPositions[k, j] = -1; } } growthRandom = new Random(StartOfRound.Instance.randomMapSeed + 11); playerDeathChanceRandom = new Random(StartOfRound.Instance.randomMapSeed + 12); if (((NetworkBehaviour)this).IsOwner) { GetRandomTileToStart(); } } private void GetRandomTileToStart() { //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Expected O, but got Unknown //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) RuntimeDungeon val = Object.FindObjectOfType(); if ((Object)(object)val == (Object)null || (Object)(object)val.Generator.CurrentDungeon == (Object)null || val.Generator.CurrentDungeon.AllTiles.Count <= 0) { if (((NetworkBehaviour)this).IsServer) { Object.Destroy((Object)(object)((Component)this).gameObject); } return; } List list = new List(); List list2 = new List(); for (int i = 0; i < val.Generator.CurrentDungeon.MainPathTiles.Count; i++) { if ((RoundManager.Instance.currentDungeonType == 4 && val.Generator.CurrentDungeon.AllTiles[i].Tags.Tags.Contains(CaveTileTag)) || val.Generator.CurrentDungeon.AllTiles[i].Tags.Tags.Contains(RoomTileTag)) { list.Add(val.Generator.CurrentDungeon.AllTiles[i]); } else { list2.Add(val.Generator.CurrentDungeon.AllTiles[i]); } } bool flag = true; List list3; if (growthRandom.Next(0, 100) < 30 || list.Count == 0) { list3 = list2; flag = false; if (RoundManager.Instance.currentDungeonType == 0 || (RoundManager.Instance.currentDungeonType == 3 && (Object)(object)list3[0] == (Object)(object)RoundManager.Instance.dungeonGenerator.Generator.CurrentDungeon.MainPathTiles[0])) { list3.RemoveAt(0); } } else { if ((Object)(object)list[list.Count - 1] == (Object)(object)val.Generator.CurrentDungeon.MainPathTiles[val.Generator.CurrentDungeon.MainPathTiles.Count - 1]) { list.RemoveAt(list.Count - 1); if (list.Count == 0) { list3 = list2; flag = false; } } list3 = list; } if (list3.Count == 0) { if (((NetworkBehaviour)this).IsServer) { Object.Destroy((Object)(object)((Component)this).gameObject); } } else { int num = (flag ? growthRandom.Next(0, list3.Count) : growthRandom.Next(0, list3.Count / 2)); GrowthTiles.Add(new TileWithGrowth(list3[num], TileCapacity, CaveTileTag, RoomTileTag, TunnelTileTag, Vector3.zero + Vector3.down * 30f)); SyncAddInitialGrowthTileRpc(num, Vector3.zero + Vector3.down * 30f, flag); } } private Transform FindChildWithTag(string tag, Transform inTransform) { Transform[] componentsInChildren = ((Component)inTransform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if (((Component)componentsInChildren[i]).CompareTag(tag)) { return componentsInChildren[i]; } } return null; } public void CullParticlesForTiles() { //IL_0010: 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_0085: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) bool flag = ((Component)StartOfRound.Instance.activeCamera).transform.position.y < -90f; Vector3 val = default(Vector3); for (int i = 0; i < GrowthTiles.Count; i++) { if ((Object)(object)GrowthTiles[i].particlesContainer == (Object)null || (Object)(object)GrowthTiles[i].plantsContainer == (Object)null) { continue; } Bounds bounds = GrowthTiles[i].tile.Bounds; float x = ((Bounds)(ref bounds)).center.x; float y = ((Component)StartOfRound.Instance.activeCamera).transform.position.y; bounds = GrowthTiles[i].tile.Bounds; ((Vector3)(ref val))..ctor(x, y, ((Bounds)(ref bounds)).center.z); bool flag2 = false; float y2 = ((Component)StartOfRound.Instance.activeCamera).transform.position.y; bounds = GrowthTiles[i].tile.Bounds; if (!(y2 < ((Bounds)(ref bounds)).min.y)) { float y3 = ((Component)StartOfRound.Instance.activeCamera).transform.position.y; bounds = GrowthTiles[i].tile.Bounds; if (!(y3 > ((Bounds)(ref bounds)).max.y)) { goto IL_015e; } } flag2 = true; goto IL_015e; IL_015e: if (!flag || flag2) { if (GrowthTiles[i].plantsContainer.activeSelf) { GrowthTiles[i].plantsContainer.SetActive(false); } if (GrowthTiles[i].particlesContainer.activeSelf) { GrowthTiles[i].particlesContainer.SetActive(false); } continue; } float num = Vector3.Distance(val, ((Component)StartOfRound.Instance.activeCamera).transform.position); bounds = GrowthTiles[i].tile.Bounds; float x2 = ((Bounds)(ref bounds)).size.x; bounds = GrowthTiles[i].tile.Bounds; float num2 = Mathf.Max(x2, ((Bounds)(ref bounds)).size.z); if (num > num2 + 16f) { if (GrowthTiles[i].plantsContainer.activeSelf) { GrowthTiles[i].plantsContainer.SetActive(false); } if (GrowthTiles[i].particlesContainer.activeSelf) { GrowthTiles[i].particlesContainer.SetActive(false); } continue; } if (!GrowthTiles[i].plantsContainer.activeSelf) { GrowthTiles[i].plantsContainer.SetActive(true); } if (!GrowthTiles[i].particlesContainer.activeSelf) { if (num < num2 + 6f) { GrowthTiles[i].particlesContainer.SetActive(true); } } else if (num > num2 + 8f) { GrowthTiles[i].particlesContainer.SetActive(false); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncSpawnPlantRpc(int plantId, int tileIndex, Vector3 spawnPosition, Quaternion spawnRotation, float randomSize, bool spawnScanNode, bool spawnDecal) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: 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_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_020e: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: 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_025f: Expected O, but got Unknown //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Expected O, but got Unknown //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Expected O, but got Unknown //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(691312177u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, plantId); BytePacker.WriteValueBitPacked(val2, tileIndex); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref spawnPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref spawnRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref randomSize, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref spawnScanNode, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref spawnDecal, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 691312177u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (GrowthTiles.Count > tileIndex) { Bounds bounds; if ((Object)(object)GrowthTiles[tileIndex].plantsContainer == (Object)null) { GameObject val4 = new GameObject("PlantsContainer"); Transform transform = val4.transform; bounds = GrowthTiles[tileIndex].tile.Bounds; transform.position = ((Bounds)(ref bounds)).center; val4.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[tileIndex].plantsContainer = val4; } else { GameObject plantsContainer = GrowthTiles[tileIndex].plantsContainer; } GameObject val5 = Object.Instantiate(plantPrefabs[plantId], spawnPosition, spawnRotation, (Transform)null); GrowthTiles[tileIndex].plantPositions.Add(spawnPosition); val5.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); if ((Object)(object)GrowthTiles[tileIndex].particlesContainer == (Object)null) { GameObject val6 = new GameObject("SporesContainer"); Transform transform2 = val6.transform; bounds = GrowthTiles[tileIndex].tile.Bounds; transform2.position = ((Bounds)(ref bounds)).center; val6.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[tileIndex].particlesContainer = val6; } GameObject val7 = Object.Instantiate(CadaverSporesParticle, val5.transform.position + Vector3.up * 0.75f, Quaternion.identity, (Transform)null); val7.transform.localScale = Vector3.one; val7.transform.SetParent(GrowthTiles[tileIndex].particlesContainer.transform, true); if ((Object)(object)GrowthTiles[tileIndex].scanNodesContainer == (Object)null) { GameObject val8 = new GameObject("ScanNodesContainer"); Transform transform3 = val8.transform; bounds = GrowthTiles[tileIndex].tile.Bounds; transform3.position = ((Bounds)(ref bounds)).center; val8.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[tileIndex].scanNodesContainer = val8; } if (spawnScanNode) { Object.Instantiate(scanNodePrefab, val7.transform.position + Vector3.up * 0.35f, Quaternion.identity, (Transform)null).transform.SetParent(GrowthTiles[tileIndex].scanNodesContainer.transform, true); } if ((Object)(object)GrowthTiles[tileIndex].decalsContainer == (Object)null) { GameObject val9 = new GameObject("DecalsContainer"); Transform transform4 = val9.transform; bounds = GrowthTiles[tileIndex].tile.Bounds; transform4.position = ((Bounds)(ref bounds)).center; val9.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[tileIndex].decalsContainer = val9; } if (spawnDecal) { Object.Instantiate(crackDecal, val7.transform.position + Vector3.up * 0.35f, Quaternion.Euler(0f, Random.Range(-360f, 360f), 0f), (Transform)null).transform.SetParent(GrowthTiles[tileIndex].scanNodesContainer.transform, true); } QuickFinishGrowingPlant(); (int, int) tuple = plantBatchers[plantId].AddToBatchedChildren(val5.GetComponent(), true, tileIndex); int item = tuple.Item1; int item2 = tuple.Item2; growingPlant = (batchNum: item, positionIndex: item2, plantType: plantId); recentPlantSizeTarget = randomSize * 7.75f; growingRecentPlant = true; recentPlantPosition = spawnPosition; ((Component)plantAudio).transform.position = spawnPosition; plantAudio.pitch = Random.Range(0.8f, 1.2f); plantAudio.Play(); TileWithGrowth obj = GrowthTiles[tileIndex]; obj.plantsInTile++; } } public void GrowInTiles() { //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: 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_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04aa: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_056c: Unknown result type (might be due to invalid IL or missing references) //IL_0573: Expected O, but got Unknown //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0619: Unknown result type (might be due to invalid IL or missing references) //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06b7: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_0758: Unknown result type (might be due to invalid IL or missing references) //IL_0762: Unknown result type (might be due to invalid IL or missing references) //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_076c: Unknown result type (might be due to invalid IL or missing references) //IL_0780: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e7: Expected O, but got Unknown //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07db: Expected O, but got Unknown //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_07fd: Unknown result type (might be due to invalid IL or missing references) //IL_085e: Unknown result type (might be due to invalid IL or missing references) //IL_0865: Expected O, but got Unknown //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0883: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Unknown result type (might be due to invalid IL or missing references) //IL_0914: Unknown result type (might be due to invalid IL or missing references) //IL_0919: Unknown result type (might be due to invalid IL or missing references) //IL_091e: Unknown result type (might be due to invalid IL or missing references) //IL_0e53: Unknown result type (might be due to invalid IL or missing references) //IL_0e58: Unknown result type (might be due to invalid IL or missing references) //IL_0e62: Unknown result type (might be due to invalid IL or missing references) //IL_0e67: Unknown result type (might be due to invalid IL or missing references) //IL_0e6c: Unknown result type (might be due to invalid IL or missing references) //IL_098a: Unknown result type (might be due to invalid IL or missing references) //IL_099c: Unknown result type (might be due to invalid IL or missing references) //IL_09a1: Unknown result type (might be due to invalid IL or missing references) //IL_09a6: Unknown result type (might be due to invalid IL or missing references) //IL_09f3: Unknown result type (might be due to invalid IL or missing references) //IL_09f8: Unknown result type (might be due to invalid IL or missing references) //IL_0a02: Unknown result type (might be due to invalid IL or missing references) //IL_0a07: Unknown result type (might be due to invalid IL or missing references) //IL_0a0c: Unknown result type (might be due to invalid IL or missing references) //IL_0ae8: Unknown result type (might be due to invalid IL or missing references) //IL_0af1: Unknown result type (might be due to invalid IL or missing references) //IL_0b62: Unknown result type (might be due to invalid IL or missing references) //IL_0b64: Unknown result type (might be due to invalid IL or missing references) //IL_0b74: Unknown result type (might be due to invalid IL or missing references) //IL_0a57: Unknown result type (might be due to invalid IL or missing references) //IL_0a5c: Unknown result type (might be due to invalid IL or missing references) //IL_0a66: Unknown result type (might be due to invalid IL or missing references) //IL_0a6b: Unknown result type (might be due to invalid IL or missing references) //IL_0a89: Unknown result type (might be due to invalid IL or missing references) //IL_0a9e: Unknown result type (might be due to invalid IL or missing references) //IL_0ab2: Unknown result type (might be due to invalid IL or missing references) //IL_0ec9: Unknown result type (might be due to invalid IL or missing references) //IL_0ece: Unknown result type (might be due to invalid IL or missing references) //IL_0f2d: Unknown result type (might be due to invalid IL or missing references) //IL_0f2f: Unknown result type (might be due to invalid IL or missing references) //IL_0f39: Expected O, but got Unknown //IL_1000: Unknown result type (might be due to invalid IL or missing references) bool flag = false; bool flag2 = false; List list = new List(); int num = 0; for (int i = previousTileIndex; i < GrowthTiles.Count; i++) { num = i; if (flag) { growingInTiles = false; previousTileIndex = i; return; } if (flag2) { previousTileIndex = i; return; } int num2 = GrowthTiles[i].tileCapacity; if (RoundManager.Instance.currentDungeonType == 4) { if (GrowthTiles[i].tile.Tags.Tags.Contains(CaveTileTag)) { num2 = TileCapacity / 4; } } else if (!GrowthTiles[i].tile.Tags.Tags.Contains(RoomTileTag) && (RoundManager.Instance.currentDungeonType != 1 || !GrowthTiles[i].tile.Tags.Tags.Contains(TunnelTileTag))) { num2 = TileCapacity / 4; } float num3 = growthRandom.Next(0, 100); if (GrowthTiles[i].plantsInTile < num2 && num3 < GrowthChancePerInterval && !GrowthTiles[i].eradicated) { Bounds bounds; Vector3 val3; if (GrowthTiles[i].lastPlantGrownPosition == Vector3.zero + Vector3.down * 30f) { Transform val = FindChildWithTag("AINode", ((Component)GrowthTiles[i].tile).gameObject.transform); Vector3 val2; if ((Object)(object)val != (Object)null) { val2 = val.position; } else { RoundManager instance = RoundManager.Instance; bounds = GrowthTiles[i].tile.Bounds; Vector3 center = ((Bounds)(ref bounds)).center; bounds = GrowthTiles[i].tile.Bounds; val2 = instance.GetRandomNavMeshPositionInBoxPredictable(center, ((Bounds)(ref bounds)).extents.x * 2f, default(NavMeshHit), growthRandom, -1, 1f); } val3 = val2; } else { val3 = GrowthTiles[i].lastPlantGrownPosition; } float num4 = ((growthRandom.Next(0, 100) >= 25) ? 3f : 5f); RoundManager instance2 = RoundManager.Instance; Vector3 val4 = val3; bounds = GrowthTiles[i].tile.Bounds; float x = ((Bounds)(ref bounds)).center.x; bounds = GrowthTiles[i].tile.Bounds; float num5 = x - ((Bounds)(ref bounds)).extents.x; bounds = GrowthTiles[i].tile.Bounds; float x2 = ((Bounds)(ref bounds)).center.x; bounds = GrowthTiles[i].tile.Bounds; float num6 = x2 + ((Bounds)(ref bounds)).extents.x; bounds = GrowthTiles[i].tile.Bounds; float z = ((Bounds)(ref bounds)).center.z; bounds = GrowthTiles[i].tile.Bounds; float num7 = z - ((Bounds)(ref bounds)).extents.z; bounds = GrowthTiles[i].tile.Bounds; float z2 = ((Bounds)(ref bounds)).center.z; bounds = GrowthTiles[i].tile.Bounds; float num8 = z2 + ((Bounds)(ref bounds)).extents.z; bounds = GrowthTiles[i].tile.Bounds; float y = ((Bounds)(ref bounds)).center.y; bounds = GrowthTiles[i].tile.Bounds; float num9 = y - ((Bounds)(ref bounds)).extents.y; bounds = GrowthTiles[i].tile.Bounds; float y2 = ((Bounds)(ref bounds)).center.y; bounds = GrowthTiles[i].tile.Bounds; Vector3 randomNavMeshPositionInBoxWithLimits = instance2.GetRandomNavMeshPositionInBoxWithLimits(val4, num5, num6, num7, num8, num9, y2 + ((Bounds)(ref bounds)).extents.y, num4, default(NavMeshHit), growthRandom, StartOfRound.Instance.collidersAndRoomMaskAndDefault, 3f); if (randomNavMeshPositionInBoxWithLimits == Vector3.zero) { continue; } Vector3 val5 = Vector3.zero; if (Physics.Raycast(randomNavMeshPositionInBoxWithLimits + Vector3.up * 0.2f, Vector3.down, ref hit, 3f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { float num10 = Vector3.Angle(Vector3.up, ((RaycastHit)(ref hit)).normal); if (num10 > 75f) { continue; } if (num10 > 30f) { val5 = ((RaycastHit)(ref hit)).normal; } } int num11 = growthRandom.Next(0, plantPrefabs.Length); if ((Object)(object)GrowthTiles[i].plantsContainer == (Object)null) { GameObject val6 = new GameObject("PlantsContainer"); Transform transform = val6.transform; bounds = GrowthTiles[i].tile.Bounds; transform.position = ((Bounds)(ref bounds)).center; val6.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[i].plantsContainer = val6; } else { GameObject plantsContainer = GrowthTiles[i].plantsContainer; } GameObject val7 = Object.Instantiate(plantPrefabs[num11], randomNavMeshPositionInBoxWithLimits, Quaternion.Euler(val5.x, (float)growthRandom.Next(-180, 180), val5.z), (Transform)null); float num12 = Mathf.Clamp((float)(growthRandom.NextDouble() * 0.6000000238418579), 0.35f, 1f) + 0.75f; GrowthTiles[i].plantPositions.Add(randomNavMeshPositionInBoxWithLimits); val7.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); TileWithGrowth obj = GrowthTiles[i]; obj.plantsInTile++; GrowthTiles[i].lastPlantGrownPosition = randomNavMeshPositionInBoxWithLimits; if ((Object)(object)GrowthTiles[i].particlesContainer == (Object)null) { GameObject val8 = new GameObject("SporesContainer"); Transform transform2 = val8.transform; bounds = GrowthTiles[i].tile.Bounds; transform2.position = ((Bounds)(ref bounds)).center; val8.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[i].particlesContainer = val8; } GameObject val9 = Object.Instantiate(CadaverSporesParticle, val7.transform.position + Vector3.up * 0.75f, Quaternion.identity, (Transform)null); val9.transform.localScale = Vector3.one; val9.transform.SetParent(GrowthTiles[i].particlesContainer.transform, true); if ((Object)(object)GrowthTiles[i].scanNodesContainer == (Object)null) { GameObject val10 = new GameObject("ScanNodesContainer"); Transform transform3 = val10.transform; bounds = GrowthTiles[i].tile.Bounds; transform3.position = ((Bounds)(ref bounds)).center; val10.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[i].scanNodesContainer = val10; } if ((Object)(object)GrowthTiles[i].decalsContainer == (Object)null) { GameObject val11 = new GameObject("DecalsContainer"); Transform transform4 = val11.transform; bounds = GrowthTiles[i].tile.Bounds; transform4.position = ((Bounds)(ref bounds)).center; val11.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[i].decalsContainer = val11; } GrowthTiles[i].scanNodesContainer.GetComponentsInChildren(true, particlesTempArray); bool flag3 = false; bool flag4 = false; Vector3 val12; for (int num13 = particlesTempArray.Count - 1; num13 >= 0; num13--) { val12 = val9.transform.position - particlesTempArray[num13].position; if (((Vector3)(ref val12)).sqrMagnitude <= 9f) { flag3 = true; break; } } GrowthTiles[i].decalsContainer.GetComponentsInChildren(true, particlesTempArray); for (int num14 = particlesTempArray.Count - 1; num14 >= 0; num14--) { val12 = val9.transform.position - particlesTempArray[num14].position; if (((Vector3)(ref val12)).sqrMagnitude <= 36f) { flag4 = true; break; } } if (!flag3) { Object.Instantiate(scanNodePrefab, val9.transform.position + Vector3.up * 0.35f, Quaternion.identity, (Transform)null).transform.SetParent(GrowthTiles[i].scanNodesContainer.transform, true); } if (!flag4) { GameObject val13 = Object.Instantiate(crackDecal, val9.transform.position + Vector3.up * 0.35f, Quaternion.Euler(90f, Random.Range(-360f, 360f), 0f), (Transform)null); Transform transform5 = val13.transform; transform5.localScale *= Random.Range(0.7f, 1f); val13.transform.SetParent(GrowthTiles[i].scanNodesContainer.transform, true); } SyncSpawnPlantRpc(num11, i, randomNavMeshPositionInBoxWithLimits, val7.transform.rotation, num12, !flag3, !flag4); QuickFinishGrowingPlant(); (int, int) tuple = plantBatchers[num11].AddToBatchedChildren(val7.GetComponent(), true, i); int item = tuple.Item1; int item2 = tuple.Item2; growingPlant = (batchNum: item, positionIndex: item2, plantType: num11); recentPlantSizeTarget = num12 * 7.75f; growingRecentPlant = true; recentPlantPosition = randomNavMeshPositionInBoxWithLimits; ((Component)plantAudio).transform.position = randomNavMeshPositionInBoxWithLimits; plantAudio.pitch = Random.Range(0.8f, 1.2f); plantAudio.Play(); flag = true; } if (GrowthTiles[i].cannotSpread || GrowthTiles[i].plantsInTile < 7) { continue; } float num15 = Mathf.Clamp(Mathf.Lerp(-12f, 14f, (float)GrowthTiles[i].plantsInTile / (float)num2), baseSpreadChance, 100f); if (GrowthTiles.Count >= 6) { num15 *= 0.66f; } if ((float)growthRandom.NextDouble() * 100f > num15) { continue; } flag2 = true; IEnumerable adjacentTiles = GrowthTiles[i].tile.GetAdjacentTiles(); list?.Clear(); foreach (Tile item3 in adjacentTiles) { list.Add(item3); } bool flag5 = false; bool flag6 = false; for (int num16 = list.Count - 1; num16 >= 0; num16--) { for (int j = 0; j < GrowthTiles.Count; j++) { if (!((Object)(object)GrowthTiles[j].tile == (Object)(object)list[num16])) { continue; } if (GrowthTiles[j].eradicated) { if (Time.realtimeSinceStartup - GrowthTiles[j].eradicatedAtTime < 45f) { list.RemoveAt(num16); flag6 = true; } else { flag5 = true; } } else { list.RemoveAt(num16); } break; } } if (list.Count == 0) { if (!flag6) { GrowthTiles[i].cannotSpread = true; } continue; } int index = growthRandom.Next(0, list.Count); bool flag7 = false; if (flag5) { for (int k = 0; k < GrowthTiles.Count; k++) { if ((Object)(object)GrowthTiles[k].tile == (Object)(object)list[index]) { GrowthTiles[k].eradicated = false; flag7 = true; break; } } } Vector3 val14 = Vector3.zero + Vector3.down * 30f; for (int l = 0; l < list[index].UsedDoorways.Count; l++) { if ((Object)(object)list[index].UsedDoorways[l].ConnectedDoorway.Tile == (Object)(object)GrowthTiles[i].tile) { val14 = ((Component)list[index].UsedDoorways[l]).transform.position; break; } } if (!flag7) { GrowthTiles.Add(new TileWithGrowth(list[index], TileCapacity, CaveTileTag, RoomTileTag, TunnelTileTag, val14)); RuntimeDungeon val15 = Object.FindObjectOfType(); if ((Object)(object)val15 == (Object)null || (Object)(object)val15.Generator.CurrentDungeon == (Object)null || val15.Generator.CurrentDungeon.AllTiles.Count <= 0) { return; } int num17 = -1; for (int m = 0; m < val15.Generator.CurrentDungeon.AllTiles.Count; m++) { if ((Object)(object)val15.Generator.CurrentDungeon.AllTiles[m] == (Object)(object)list[index]) { num17 = m; break; } } if (num17 == -1) { return; } SyncAddGrowthTileRpc(num17, val14); continue; } int num18 = -1; for (int n = 0; n < GrowthTiles.Count; n++) { if ((Object)(object)GrowthTiles[n].tile == (Object)(object)list[index]) { num18 = n; break; } } if (num18 == -1) { return; } SyncRemoveEradicationFromTileRpc(num18); } if (num == GrowthTiles.Count - 1) { growingInTiles = false; previousTileIndex = 0; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncRemoveEradicationFromTileRpc(int tileIndex) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(880997476u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, tileIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 880997476u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (tileIndex < GrowthTiles.Count) { GrowthTiles[tileIndex].eradicated = false; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncAddGrowthTileRpc(int tileAtIndex, Vector3 doorPos) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_0142: 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_014d: Expected O, but got Unknown NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2568924199u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, tileAtIndex); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref doorPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2568924199u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RuntimeDungeon val4 = Object.FindObjectOfType(); if (!((Object)(object)val4 == (Object)null) && !((Object)(object)val4.Generator.CurrentDungeon == (Object)null) && val4.Generator.CurrentDungeon.AllTiles.Count > 0) { GrowthTiles.Add(new TileWithGrowth(val4.Generator.CurrentDungeon.AllTiles[tileAtIndex], TileCapacity, CaveTileTag, RoomTileTag, TunnelTileTag, doorPos)); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncAddInitialGrowthTileRpc(int tileAtIndex, Vector3 doorPos, bool gotRoomTile) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Expected O, but got Unknown NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3037977897u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, tileAtIndex); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref doorPos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref gotRoomTile, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3037977897u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RuntimeDungeon val4 = Object.FindObjectOfType(); if ((Object)(object)val4 == (Object)null || (Object)(object)val4.Generator.CurrentDungeon == (Object)null || val4.Generator.CurrentDungeon.AllTiles.Count <= 0) { return; } List list = new List(); List list2 = new List(); for (int i = 0; i < val4.Generator.CurrentDungeon.MainPathTiles.Count; i++) { if ((RoundManager.Instance.currentDungeonType == 4 && val4.Generator.CurrentDungeon.AllTiles[i].Tags.Tags.Contains(CaveTileTag)) || val4.Generator.CurrentDungeon.AllTiles[i].Tags.Tags.Contains(RoomTileTag)) { list.Add(val4.Generator.CurrentDungeon.AllTiles[i]); } else { list2.Add(val4.Generator.CurrentDungeon.AllTiles[i]); } } if (RoundManager.Instance.currentDungeonType == 0 || (RoundManager.Instance.currentDungeonType == 3 && (Object)(object)list2[0] == (Object)(object)RoundManager.Instance.dungeonGenerator.Generator.CurrentDungeon.MainPathTiles[0])) { list2.RemoveAt(0); } if (gotRoomTile && (Object)(object)list[list.Count - 1] == (Object)(object)val4.Generator.CurrentDungeon.MainPathTiles[val4.Generator.CurrentDungeon.MainPathTiles.Count - 1]) { list.RemoveAt(list.Count - 1); if (list.Count == 0) { return; } } if (gotRoomTile) { if (tileAtIndex < list.Count) { GrowthTiles.Add(new TileWithGrowth(list[tileAtIndex], TileCapacity, CaveTileTag, RoomTileTag, TunnelTileTag, doorPos)); } } else if (tileAtIndex < list2.Count) { GrowthTiles.Add(new TileWithGrowth(list2[tileAtIndex], TileCapacity, CaveTileTag, RoomTileTag, TunnelTileTag, doorPos)); } } public static void Shuffle(MeshRenderer[] array) { for (int num = array.Length - 1; num > 0; num--) { int num2 = Random.Range(0, num + 1); MeshRenderer val = array[num]; array[num] = array[num2]; array[num2] = val; } } private void IncreaseBackFlowers(int playerId) { //IL_011e: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } if ((Object)(object)playerInfections[playerId].backFlowers == (Object)null) { playerInfections[playerId].backFlowers = Object.Instantiate(backFlowersPrefab, (Transform)null, true); playerInfections[playerId].backFlowers.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform); playerInfections[playerId].backFlowerRenderers = playerInfections[playerId].backFlowers.GetComponentsInChildren(); Shuffle(playerInfections[playerId].backFlowerRenderers); if ((Object)(object)playerInfections[playerId].backFlowersScanNode == (Object)null) { playerInfections[playerId].backFlowersScanNode = Object.Instantiate(scanNodePrefab, playerInfections[playerId].backFlowers.transform, true); playerInfections[playerId].backFlowersScanNode.transform.localPosition = new Vector3(0f, 0.18f, -0.3f); } playerInfections[playerId].backFlowersScanNode.SetActive(true); } int num = 0; int num2 = Random.Range(0, 4); for (int i = 0; i < playerInfections[playerId].backFlowerRenderers.Length; i++) { if (!((Renderer)playerInfections[playerId].backFlowerRenderers[i]).enabled) { ((Renderer)playerInfections[playerId].backFlowerRenderers[i]).enabled = true; num++; if (num >= num2) { break; } } } } [Rpc(/*Could not decode attribute arguments.*/)] public void IncreaseBackFlowersRpc(int playerId, float infectionMeter) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1640007265u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref infectionMeter, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1640007265u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; playerInfections[playerId].infectionMeter = infectionMeter; if (playerInfections[playerId].infectionMeter > 0.55f) { playerInfections[playerId].bloomOnDeath = true; } IncreaseBackFlowers(playerId); } } public void InfectPlayers() { //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0145: 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_0244: 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_0328: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.localPlayerController.isPlayerDead || !GameNetworkManager.Instance.localPlayerController.isInsideFactory || (Object)(object)StartOfRound.Instance.occlusionCuller.currentTile == (Object)null) { return; } Tile currentTile = StartOfRound.Instance.occlusionCuller.currentTile; bool infected = playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId].infected; bool flag = false; bool flag2 = false; int index = -1; for (int i = 0; i < GrowthTiles.Count; i++) { if ((Object)(object)GrowthTiles[i].tile == (Object)(object)currentTile && !GrowthTiles[i].eradicated && GrowthTiles[i].plantsInTile > 0) { flag = true; flag2 = true; index = i; break; } } float num = 0f; if (flag) { float num2 = 1000f; int num3 = -1; float num4 = 0f; for (int j = 0; j < GrowthTiles[index].plantPositions.Count; j++) { Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController).transform.position - GrowthTiles[index].plantPositions[j]; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num2) { num2 = sqrMagnitude; num3 = j; } if (sqrMagnitude < 100f) { num4 += 1f; } } num = Mathf.Clamp(Mathf.Lerp(2f, 16f, num4 / (float)TileCapacity), 0f, 100f); num *= ChanceToInfectMultiplier; if (!infected) { num *= Mathf.Lerp(1f, 0.75f, (float)numberOfInfected / (float)StartOfRound.Instance.livingPlayers); } if (num3 != -1) { float num5 = Vector3.Distance(GrowthTiles[index].plantPositions[num3], ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); num *= Mathf.Lerp(3f, 0.015f, Mathf.Clamp(num5 / 10f, 0f, 1f)); if (num5 < 8f && sporeAmbienceSource.isPlaying) { sporeAmbienceSource.volume = Mathf.MoveTowards(sporeAmbienceSource.volume, 0f, Time.deltaTime); } } } bool flag3 = false; for (int k = 0; k < playerInfections.Length; k++) { if (k == (int)GameNetworkManager.Instance.localPlayerController.playerClientId || !playerInfections[k].infected) { continue; } float num6 = Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[k]).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); if (num6 < 7f) { if (!flag && !flag3) { flag3 = true; num = 1.25f; } float num7 = 0.35f; if (flag2) { num7 = 1f; } num *= Mathf.Clamp(Mathf.Lerp(2f, 0.35f, Mathf.Clamp(num6 / 7f, 0f, 1f)), num7, 100f); } } if (num >= 1.5f && flag) { bool flag4 = false; if (num >= 1.9f) { if (stoodInWeedsLastCheck) { localPlayerImmunityTimer += InfectIntervalTime; totalTimeSpentInPlants += InfectIntervalTime; if (StartOfRound.Instance.connectedPlayersAmount == 0) { flag4 = true; if (localPlayerImmunityTimer >= 7f) { HUDManager.Instance.DisplayStatusEffect("HEALTH RISK!\nAir filter overwhelmed by particulates;\n\nFilter inoperative!"); } else { HUDManager.Instance.DisplayStatusEffect($"HEALTH RISK!\nAir filter overwhelmed by particulates;\n\nFilter quality: {Mathf.RoundToInt(Mathf.Lerp(0f, 100f, Mathf.Abs(localPlayerImmunityTimer - 7f) / 7f))}%"); } } } stoodInWeedsLastCheck = true; } if (!flag4) { HUDManager.Instance.DisplayStatusEffect("HEALTH RISK!\n\nAir filter overwhelmed by particulates"); } } else if (stoodInWeedsLastCheck) { stoodInWeedsLastCheck = false; if (playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId].infected) { totalTimeSpentInPlants = Mathf.Max(0f, totalTimeSpentInPlants - InfectIntervalTime * 0.25f); } } if (!infected && flag) { if (GameNetworkManager.Instance.localPlayerController.health == 100) { num *= 0.75f; } else if (GameNetworkManager.Instance.localPlayerController.health <= 60) { num *= 1.2f; } if (GameNetworkManager.Instance.localPlayerController.criticallyInjured && stoodInWeedsLastCheck && num >= 1.9f) { num *= 1.5f; } if ((StartOfRound.Instance.connectedPlayersAmount != 0 || !(localPlayerImmunityTimer < 7f)) && (StartOfRound.Instance.connectedPlayersAmount <= 0 || !(localPlayerImmunityTimer <= 4f)) && Random.Range(0f, 100f) < num) { bool flag5 = Random.Range(0, 100) < 60; bool flag6 = flag5 || Random.Range(0, 100) < 40; InfectPlayer(GameNetworkManager.Instance.localPlayerController, flag5, flag6); InfectPlayerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, flag5, flag6); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void AddToTimeSpentInPlantsRpc() { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_0077: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1146260010u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1146260010u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; totalTimeSpentInPlants += infectInterval; } } } public void InfectPlayer(PlayerControllerB playerScript, bool severe, bool emittingSpores = false) { if (!playerInfections[playerScript.playerClientId].infected && playerScript.isPlayerControlled) { if ((Object)(object)playerScript == (Object)(object)GameNetworkManager.Instance.localPlayerController) { totalTimeSpentInPlants = 0f; } if (severe) { GameObject val = Object.Instantiate(faceSporesPrefab, (Transform)null, true); val.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform); } totalTimeSpentInPlants = 0f; numberOfInfected++; playerInfections[playerScript.playerClientId].infected = true; playerInfections[playerScript.playerClientId].severe = severe; playerInfections[playerScript.playerClientId].emittingSpores = emittingSpores; if (((NetworkBehaviour)this).IsServer) { CreateBloomEnemyOnStandby(); } } } private void CreateBloomEnemyOnStandby() { //IL_0054: 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) int num = -1; for (int i = 0; i < bloomEnemies.Length; i++) { if ((Object)(object)bloomEnemies[i] == (Object)null) { num = i; break; } } if (num != -1) { RoundManager.Instance.SpawnEnemyGameObject(new Vector3(1200f, -300f, 0f), 0f, -1, bloomEnemyType); } } [Rpc(/*Could not decode attribute arguments.*/)] public void InfectPlayerRpc(int playerId, bool severe, bool emitSpores = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00f6: 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) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1818019527u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref severe, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref emitSpores, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1818019527u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB playerScript = StartOfRound.Instance.allPlayerScripts[playerId]; InfectPlayer(playerScript, severe, emitSpores); } } } private void CheckForLivingPlayers() { for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (!StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled && playerInfections[i].infected) { playerInfections[i].infected = false; numberOfInfected--; } } } public void BurstFromPlayer(PlayerControllerB playerScript, Vector3 burstPosition, Vector3 burstRotation) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0235: 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_01dd: Unknown result type (might be due to invalid IL or missing references) int num = -1; Vector3 position = ((Component)playerScript).transform.position; for (int i = 0; i < bloomEnemies.Length; i++) { if (!((Object)(object)bloomEnemies[i] == (Object)null) && !bloomEnemies[i].hasBurst) { bloomEnemies[i].BurstForth(playerScript, kill: true, burstPosition, burstRotation); if ((Object)(object)playerInfections[playerScript.playerClientId].backFlowers != (Object)null) { Object.Destroy((Object)(object)playerInfections[playerScript.playerClientId].backFlowers); } num = i; break; } } if (num == -1) { return; } for (int j = 0; j < StartOfRound.Instance.allPlayerScripts.Length; j++) { if ((Object)(object)StartOfRound.Instance.allPlayerScripts[j] == (Object)(object)playerScript) { playerInfections[j].infected = false; numberOfInfected--; } } if (Time.realtimeSinceStartup - timeLastMusicPlayed > 10f && Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, position) < 10f) { timeLastMusicPlayed = Time.realtimeSinceStartup; bloomMusic.Play(); } if (StartOfRound.Instance.livingPlayers > 1) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; PlayerInfection val = playerInfections[localPlayerController.playerClientId]; if ((Object)(object)localPlayerController != (Object)(object)playerScript && localPlayerController.isPlayerControlled && val.infected && val.infectionMeter > 0.85f && Vector3.Distance(((Component)localPlayerController).transform.position, ((Component)bloomEnemies[num]).transform.position) < 14f) { BurstFromPlayer(localPlayerController, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); SyncBurstFromPlayerRpc((int)localPlayerController.playerClientId, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncBurstFromPlayerRpc(int playerId, Vector3 playerPosition, Vector3 playerRotation) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: 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_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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1853216436u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerRotation); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1853216436u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; BurstFromPlayer(StartOfRound.Instance.allPlayerScripts[playerId], playerPosition, playerRotation); } } } private void ProgressPlayerInfections() { //IL_00f4: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < playerInfections.Length; i++) { if (!playerInfections[i].infected) { continue; } if (!StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled) { playerInfections[i].infected = false; numberOfInfected--; } else { if ((Object)(object)StartOfRound.Instance.allPlayerScripts[i] != (Object)(object)GameNetworkManager.Instance.localPlayerController) { continue; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (playerInfections[i].infectionMeter >= 1f) { if (playerInfections[i].burstMeter >= 1f) { playerInfections[i].infected = false; numberOfInfected--; BurstFromPlayer(localPlayerController, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); SyncBurstFromPlayerRpc((int)localPlayerController.playerClientId, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); continue; } localPlayerController.poison = Mathf.Lerp(localPlayerController.poison, 0f, Time.deltaTime * 0.3f); if (playerInfections[i].burstMeter >= 0.9f) { if (!StartOfRound.Instance.shipIsLeaving) { if (StartOfRound.Instance.livingPlayers <= 1) { HUDManager.Instance.DisplayStatusEffect("HIGH FEVER DETECTED!!!\nFOREIGN BODIES DETECTED!!!\nIRREGULAR BRAINWAVE DETECTED!!!"); PlayerInfection obj = playerInfections[i]; obj.burstMeter += Time.deltaTime * 0.0055f; } else { PlayerInfection obj2 = playerInfections[i]; obj2.burstMeter += Time.deltaTime * 0.058f; } if (StartOfRound.Instance.connectedPlayersAmount > 0 && !hinderingLocalPlayer) { hinderingLocalPlayer = true; PlayerControllerB obj3 = StartOfRound.Instance.allPlayerScripts[i]; obj3.isMovementHindered++; playerInfections[i].hinderingPlayerMovement = true; } HUDManager.Instance.cadaverFilter = Mathf.Lerp(0f, 1f, (playerInfections[i].burstMeter - 0.9f) / 0.1f); SoundManager.Instance.alternateEarsRinging = true; SoundManager.Instance.earsRingingTimer = 1f; } continue; } float num; if (StartOfRound.Instance.connectedPlayersAmount > 0) { if (StartOfRound.Instance.livingPlayers == 1) { num = 0.75f; } else { float num2 = 2000f; for (int j = 0; j < StartOfRound.Instance.allPlayerScripts.Length; j++) { if (!((Object)(object)StartOfRound.Instance.allPlayerScripts[j] == (Object)(object)GameNetworkManager.Instance.localPlayerController)) { float num3 = Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); if (num3 < num2) { num2 = num3; } } } num = 1f; num = Mathf.Lerp(3f, 0.015f, Mathf.Clamp(num2 / 30f, 0f, 1f)); } } else { num = 1.25f; } PlayerInfection obj4 = playerInfections[i]; obj4.burstMeter += Time.deltaTime * num * BurstSpeedMultiplier; continue; } if (playerInfections[i].healing > 0) { PlayerInfection obj5 = playerInfections[i]; obj5.infectionMeter -= Time.deltaTime * 0.08f * (float)playerInfections[i].healing; HUDManager.Instance.DisplayStatusEffect("FIGHTING INFECTION!\nReduction in fever"); if (playerInfections[i].infectionMeter <= 0f) { playerInfections[i].infectionMeter = 0f; CurePlayer(i); CurePlayerRpc(i); } continue; } float num4 = 1f; bool flag = false; if (!StartOfRound.Instance.allPlayerScripts[i].isInsideFactory && TimeOfDay.Instance.normalizedTimeOfDay < 0.6f && !Physics.Linecast(((Component)TimeOfDay.Instance.sunDirect).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, StartOfRound.Instance.collidersRoomDefaultAndFoliage, (QueryTriggerInteraction)1)) { flag = true; } if (flag) { num4 *= 1.15f; } if (GameNetworkManager.Instance.localPlayerController.NearOtherPlayers(15f)) { num4 = ((!(playerInfections[i].infectionMeter > 0.925f)) ? (num4 * 0.7f) : (num4 * 1.5f)); } num4 *= Mathf.Lerp(1f, 0.85f, (float)numberOfInfected / (float)StartOfRound.Instance.livingPlayers); num4 *= 1f + totalTimeSpentInPlants / 18f; if (localPlayerController.health <= 40) { num4 *= 1.15f; } else if (localPlayerController.health == 100) { num4 *= 0.85f; } bool flag2 = StartOfRound.Instance.connectedPlayersAmount == 0; float num5 = Time.deltaTime * InfectionSpeedMultiplier * num4 * playerInfections[i].multiplier; if (flag2) { num5 *= 0.45f; } if (Time.realtimeSinceStartup - timeAtLastHealing < 0.7f) { continue; } playerInfections[i].infectionMeter = Mathf.Clamp(playerInfections[i].infectionMeter + num5, 0f, 1f); showSignsMeter += num5; if (playerInfections[i].infectionMeter > 0.35f && !flag2) { playerInfections[i].bloomOnDeath = true; } if (localPlayerController.overridePoisonValue) { localPlayerController.poison = Mathf.Lerp(localPlayerController.poison, setPoison, Time.deltaTime * 0.7f); } if (StartOfRound.Instance.connectedPlayersAmount == 0) { if (showSignsMeter > 0.05f) { showSignsMeter = 0f; DisplayFeverStatusEffect(i); if (playerInfections[i].severe && playerInfections[i].infectionMeter > 0.6f && Random.Range(0, 100) < 50) { vinesInHeadAudio.pitch = Random.Range(0.8f, 1.2f); vinesInHeadAudio.PlayOneShot(vinesInHeadSFX[Random.Range(0, vinesInHeadSFX.Length)], Random.Range(0.3f, 1f)); } } } else if (showSignsMeter > 0.05f) { if (playerInfections[i].severe && playerInfections[i].infectionMeter > 0.8f && Random.Range(0, 100) < 50) { vinesInHeadAudio.PlayOneShot(vinesInHeadSFX[Random.Range(0, vinesInHeadSFX.Length)], Random.Range(0.3f, 1f)); } showSignsMeter = 0f; float num6 = Mathf.Lerp(5f, 50f, Mathf.Clamp(playerInfections[i].infectionMeter / 0.9f, 0f, 1f)); if (Random.Range(0f, 100f) < num6) { IncreaseBackFlowers(i); IncreaseBackFlowersRpc(i, playerInfections[i].infectionMeter); } else { SyncInfectionMeterRpc((int)localPlayerController.playerClientId, playerInfections[i].infectionMeter); } } } } } private void DisplayFeverStatusEffect(int infectionId, float infectionThreshold = 0.8f) { if (playerInfections[infectionId].infectionMeter > infectionThreshold) { float num = (playerInfections[infectionId].infectionMeter - infectionThreshold) / (1f - infectionThreshold); HUDManager.Instance.DisplayStatusEffect($"HIGH FEVER DETECTED!\nREACHING {Mathf.RoundToInt(Mathf.Lerp(101f, 112f, num))}°F"); GameNetworkManager.Instance.localPlayerController.overridePoisonValue = true; setPoison = Mathf.Lerp(0f, 0.4f, num); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncInfectionMeterRpc(int playerId, float infectionMeter) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_0095: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2782851386u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref infectionMeter, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2782851386u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; playerInfections[playerId].infectionMeter = infectionMeter; if (playerInfections[playerId].infectionMeter > 0.55f) { playerInfections[playerId].bloomOnDeath = true; } } } public void HealInfection(int infectionId, float healAmount) { PlayerInfection val = playerInfections[infectionId]; int clipIndex = Random.Range(0, healPlayerSFX.Length); HealPlayerSporeEffect(infectionId, clipIndex); val.infectionMeter -= healAmount; timeAtLastHealing = Time.realtimeSinceStartup; totalTimeSpentInPlants = Mathf.Clamp(totalTimeSpentInPlants - totalTimeSpentInPlants / 4f, 0f, 100f); if (val.infectionMeter <= 0f) { CurePlayer(infectionId); CurePlayerRpc(infectionId); } else { HealInfectionSyncRpc(infectionId, healAmount, clipIndex); } } private void HealPlayerSporeEffect(int infectionId, int clipIndex) { PlayerInfection val = playerInfections[infectionId]; AudioClip val2 = healPlayerSFX[clipIndex]; StartOfRound.Instance.allPlayerScripts[infectionId].itemAudio.PlayOneShot(val2, 1f); WalkieTalkie.TransmitOneShotAudio(StartOfRound.Instance.allPlayerScripts[infectionId].itemAudio, val2, 1f); if (infectionId == (int)GameNetworkManager.Instance.localPlayerController.playerClientId) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } } [Rpc(/*Could not decode attribute arguments.*/)] public void HealInfectionSyncRpc(int infectionId, float healAmount, int clipIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_0095: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: 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) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2102983690u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, infectionId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref healAmount, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, clipIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2102983690u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerInfection val4 = playerInfections[infectionId]; HealPlayerSporeEffect(infectionId, clipIndex); val4.infectionMeter -= healAmount; } } } public void CurePlayer(int playerId) { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) playerInfections[playerId].infected = false; playerInfections[playerId].infectionMeter = 0f; playerInfections[playerId].burstMeter = 0f; playerInfections[playerId].severe = false; playerInfections[playerId].emittingSpores = false; StartOfRound.Instance.allPlayerScripts[playerId].overridePoisonValue = false; if (playerInfections[playerId].backFlowerRenderers != null) { for (int i = 0; i < playerInfections[playerId].backFlowerRenderers.Length; i++) { ((Renderer)playerInfections[playerId].backFlowerRenderers[i]).enabled = false; } playerInfections[playerId].backFlowersScanNode.SetActive(false); Vector3 position = ((Component)playerInfections[playerId].backFlowerRenderers[0]).transform.position; Object.Instantiate(destroyPlantParticle, position, Quaternion.identity, (Transform)null); destroyAudio.Stop(); ((Component)destroyAudio).transform.position = position; destroyAudio.Play(); } if (playerInfections[playerId].hinderingPlayerMovement) { StartOfRound.Instance.allPlayerScripts[playerId].isMovementHindered = Mathf.Max(StartOfRound.Instance.allPlayerScripts[playerId].isMovementHindered - 1, 0); playerInfections[playerId].hinderingPlayerMovement = false; } } [Rpc(/*Could not decode attribute arguments.*/)] public void CurePlayerRpc(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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2821126661u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2821126661u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CurePlayer(playerId); } } } public override void DoAIInterval() { ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead) { return; } switch (base.currentBehaviourStateIndex) { case 0: { if (inGrowthBurst) { if (growthBurstTimer > 4f) { inGrowthBurst = false; } else { growthBurstTimer += base.AIIntervalTime; } } else if (growthBurstTimer > 25f) { growthBurstTimer = 0f; inGrowthBurst = true; } else if (TimeOfDay.Instance.normalizedTimeOfDay < 0.2f) { growthBurstTimer += base.AIIntervalTime * 0.66f; } else { growthBurstTimer += base.AIIntervalTime; } float num = Mathf.Clamp(growthIntervalCurveOverDay.Evaluate(TimeOfDay.Instance.normalizedTimeOfDay) * GrowthInterval, 0.25f, 12f); if (inGrowthBurst) { num = 0.15f; } if (growingInTiles || spreadInterval > num) { growingInTiles = true; spreadInterval = 0f; GrowInTiles(); } else { spreadInterval += base.AIIntervalTime; } break; } } } public override void Update() { //IL_009f: 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) ((EnemyAI)this).Update(); if (!base.isEnemyDead) { if (cullInterval > cullIntervalTime) { cullInterval = 0f; CullParticlesForTiles(); } else { cullInterval += Time.deltaTime; } if (infectInterval > InfectIntervalTime) { infectInterval = 0f; InfectPlayers(); } else { infectInterval += Time.deltaTime; } ProgressPlayerInfections(); base.destination = ((Component)this).transform.position; } } public void UpdateInfectionMeshes() { //IL_009f: 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) for (int i = 0; i < playerInfections.Length; i++) { if (!playerInfections[i].infected) { if (!StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled && (Object)(object)playerInfections[i].backFlowers != (Object)null) { Object.Destroy((Object)(object)playerInfections[i].backFlowers); } } else if ((Object)(object)playerInfections[i].backFlowers != (Object)null) { playerInfections[i].backFlowers.transform.position = StartOfRound.Instance.allPlayerScripts[i].bodyParts[5].position; playerInfections[i].backFlowers.transform.rotation = StartOfRound.Instance.allPlayerScripts[i].bodyParts[5].rotation; } } } private void UpdateSporeAmbience() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) if (!GameNetworkManager.Instance.localPlayerController.isInsideFactory) { sporeAmbienceSource.volume = 0f; } if (updateSporeAudioInterval > 1f) { updateSporeAudioInterval = 0f; if ((Object)(object)StartOfRound.Instance.occlusionCuller.currentTile == (Object)null) { return; } if (((Component)StartOfRound.Instance.audioListener).transform.position.y > -90f) { distToPlants = 100f; return; } Tile currentTile = StartOfRound.Instance.occlusionCuller.currentTile; int num = -1; for (int i = 0; i < GrowthTiles.Count; i++) { if ((Object)(object)GrowthTiles[i].tile == (Object)(object)currentTile && !GrowthTiles[i].eradicated && GrowthTiles[i].plantsInTile > 0) { num = i; break; } } if (num == -1) { distToPlants = 100f; return; } float num2 = 1000f; int num3 = -1; for (int j = 0; j < GrowthTiles[num].plantPositions.Count; j++) { Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController).transform.position - GrowthTiles[num].plantPositions[j]; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num2) { num2 = sqrMagnitude; num3 = j; } } if (num3 != -1) { distToPlants = Vector3.Distance(GrowthTiles[num].plantPositions[num3], ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } else { updateSporeAudioInterval += Time.deltaTime; } if (distToPlants < 8f) { if (!sporeAmbienceSource.isPlaying) { sporeAmbienceSource.Play(); } sporeAmbienceSource.volume = Mathf.Lerp(sporeAmbienceSource.volume, Mathf.Lerp(1f, 0f, distToPlants / 7f), Time.deltaTime * 0.25f); } else { sporeAmbienceSource.volume = Mathf.MoveTowards(sporeAmbienceSource.volume, 0f, Time.deltaTime * 0.5f); if (sporeAmbienceSource.isPlaying && sporeAmbienceSource.volume <= 0f) { sporeAmbienceSource.Stop(); } } } public void LateUpdate() { //IL_0105: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) UpdateSporeAmbience(); UpdateInfectionMeshes(); if (!growingRecentPlant) { return; } if (growingPlant.positionIndex >= plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum].Count) { growingRecentPlant = false; return; } float num = Mathf.Lerp(12f, 4f, growthIntervalCurveOverDay.Evaluate(TimeOfDay.Instance.normalizedTimeOfDay) * GrowthInterval / 8f); plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex] = SprayPaintItem.ResizeMatrix(plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex], num, false); if (SprayPaintItem.ExtractScaleFromMatrix(plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex]).x > recentPlantSizeTarget) { growingRecentPlant = false; } } private void QuickFinishGrowingPlant() { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) if (growingRecentPlant && growingPlant.plantType != -1) { plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex] = SprayPaintItem.SetMatrixScale(plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex], recentPlantSizeTarget); growingRecentPlant = false; } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3885809940u, new RpcReceiveHandler(__rpc_handler_3885809940), "CoughSporesRpc"); ((NetworkBehaviour)this).__registerRpc(691312177u, new RpcReceiveHandler(__rpc_handler_691312177), "SyncSpawnPlantRpc"); ((NetworkBehaviour)this).__registerRpc(880997476u, new RpcReceiveHandler(__rpc_handler_880997476), "SyncRemoveEradicationFromTileRpc"); ((NetworkBehaviour)this).__registerRpc(2568924199u, new RpcReceiveHandler(__rpc_handler_2568924199), "SyncAddGrowthTileRpc"); ((NetworkBehaviour)this).__registerRpc(3037977897u, new RpcReceiveHandler(__rpc_handler_3037977897), "SyncAddInitialGrowthTileRpc"); ((NetworkBehaviour)this).__registerRpc(1640007265u, new RpcReceiveHandler(__rpc_handler_1640007265), "IncreaseBackFlowersRpc"); ((NetworkBehaviour)this).__registerRpc(1146260010u, new RpcReceiveHandler(__rpc_handler_1146260010), "AddToTimeSpentInPlantsRpc"); ((NetworkBehaviour)this).__registerRpc(1818019527u, new RpcReceiveHandler(__rpc_handler_1818019527), "InfectPlayerRpc"); ((NetworkBehaviour)this).__registerRpc(1853216436u, new RpcReceiveHandler(__rpc_handler_1853216436), "SyncBurstFromPlayerRpc"); ((NetworkBehaviour)this).__registerRpc(2782851386u, new RpcReceiveHandler(__rpc_handler_2782851386), "SyncInfectionMeterRpc"); ((NetworkBehaviour)this).__registerRpc(2102983690u, new RpcReceiveHandler(__rpc_handler_2102983690), "HealInfectionSyncRpc"); ((NetworkBehaviour)this).__registerRpc(2821126661u, new RpcReceiveHandler(__rpc_handler_2821126661), "CurePlayerRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3885809940(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_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float loudness = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref loudness, default(ForPrimitives)); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedGrowth)(object)target).CoughSporesRpc(loudness, playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_691312177(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int plantId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref plantId); int tileIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref tileIndex); Vector3 spawnPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnPosition); Quaternion spawnRotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnRotation); float randomSize = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref randomSize, default(ForPrimitives)); bool spawnScanNode = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnScanNode, default(ForPrimitives)); bool spawnDecal = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnDecal, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedGrowth)(object)target).SyncSpawnPlantRpc(plantId, tileIndex, spawnPosition, spawnRotation, randomSize, spawnScanNode, spawnDecal); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_880997476(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 tileIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref tileIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedGrowth)(object)target).SyncRemoveEradicationFromTileRpc(tileIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2568924199(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int tileAtIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref tileAtIndex); Vector3 doorPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref doorPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedGrowth)(object)target).SyncAddGrowthTileRpc(tileAtIndex, doorPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3037977897(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int tileAtIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref tileAtIndex); Vector3 doorPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref doorPos); bool gotRoomTile = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref gotRoomTile, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedGrowth)(object)target).SyncAddInitialGrowthTileRpc(tileAtIndex, doorPos, gotRoomTile); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1640007265(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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); float infectionMeter = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref infectionMeter, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedGrowth)(object)target).IncreaseBackFlowersRpc(playerId, infectionMeter); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1146260010(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; ((AssimilatedGrowth)(object)target).AddToTimeSpentInPlantsRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1818019527(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); bool severe = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref severe, default(ForPrimitives)); bool emitSpores = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref emitSpores, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedGrowth)(object)target).InfectPlayerRpc(playerId, severe, emitSpores); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1853216436(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 playerPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerPosition); Vector3 playerRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerRotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedGrowth)(object)target).SyncBurstFromPlayerRpc(playerId, playerPosition, playerRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2782851386(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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); float infectionMeter = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref infectionMeter, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedGrowth)(object)target).SyncInfectionMeterRpc(playerId, infectionMeter); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2102983690(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int infectionId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref infectionId); float healAmount = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref healAmount, default(ForPrimitives)); int clipIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((AssimilatedGrowth)(object)target).HealInfectionSyncRpc(infectionId, healAmount, clipIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2821126661(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; ((AssimilatedGrowth)(object)target).CurePlayerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "AssimilatedGrowth"; } } namespace WesleysInteriorTools { [BepInPlugin("MagicWesley.WesleysInteriorTools", "Wesleys Interior Tools", "1.0.0")] public class WesleysInteriorToolsPlugin : BaseUnityPlugin { internal static readonly Harmony Harmony = new Harmony("MagicWesley.WesleysInteriorTools"); public static ConfigEntry EnableTrials; public static ConfigEntry TrialMoonsOnly; public static ConfigEntry SecondaryObjectivesEnabled; public static ConfigEntry SecondaryDisableTrials; public static ConfigEntry SecondaryProgressSounds; public static ConfigEntry SecondarySoloRewardMultiplier; public static ConfigEntry SecondaryVeryEasyMultiplier; public static ConfigEntry SecondaryEasyMultiplier; public static ConfigEntry SecondaryMediumMultiplier; public static ConfigEntry SecondaryHardMultiplier; public static ConfigEntry SecondaryBadRewardValue; public static ConfigEntry SecondaryMediumRewardValue; public static ConfigEntry SecondaryGoodRewardValue; public static ConfigEntry SpawnOutsideNutcrackers; public static ConfigEntry LessNauseatingCalist; internal static ManualLogSource TheWhispers; public static JourneysSaveData CurrentSave { get; internal set; } private void Awake() { TheWhispers = Logger.CreateLogSource("The whispers"); Type[] array = new Type[60] { typeof(OptionalObjectiveController), typeof(SpecialJester), typeof(RadioDecoder), typeof(ButtonSpamObjective), typeof(AutopsyObjective), typeof(Medallion), typeof(ActionFigureBoard), typeof(ActionFigureItem), typeof(SequenceLever), typeof(SequenceLeversController), typeof(CitadelEventController), typeof(WaterPumpDevice), typeof(WaterPumpDevicesController), typeof(CrossButton), typeof(CrossButtonPuzzleController), typeof(PressureValve), typeof(PressureValvePuzzleController), typeof(CuttableWire), typeof(WirePuzzleController), typeof(Compactor), typeof(MoldSpikes), typeof(WeirdPuzzleSwitchBoard), typeof(WeirdPuzzleSwitchButton), typeof(PressureMachine), typeof(PressureMachineController), typeof(RoachKing), typeof(HitZapChanceCalculator), typeof(HyxAngerManagementIssues), typeof(AssimilatedGrowth), typeof(AssimilatedEmployee), typeof(BreakingIce), typeof(Elevator), typeof(Exterminator), typeof(WeatherObjectContainer), typeof(FlowMachineController), typeof(FlowMachineLever), typeof(FaultyKnob), typeof(FactoryCraftingStation), typeof(CodepadController), typeof(FogReducerItem), typeof(PesticideSprinklerItem), typeof(KnobsPuzzleController), typeof(VaultObjective), typeof(LassomanCrystalEvent), typeof(LassomanPaintingController), typeof(MoveableBook), typeof(BookPuzzleController), typeof(DinerPuzzleController), typeof(Chandelier), typeof(TriangulationSpot), typeof(TriangulationDeviceItem), typeof(CacheSpawner), typeof(TicketInsertTool), typeof(DayCounterEvent), typeof(CrashPoint), typeof(ProximityBomb), typeof(SecurityMonitors), typeof(Arachnohead), typeof(ArachnoheadWires), typeof(ElevatorSnatcher) }; Type[] array2 = array; foreach (Type type in array2) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array3 = methods; foreach (MethodInfo methodInfo in array3) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } EnableTrials = ((BaseUnityPlugin)this).Config.Bind("Trials", "Enable trials", true, "Enable the trials on moons or interiors"); TrialMoonsOnly = ((BaseUnityPlugin)this).Config.Bind("Trials", "Only on trial moons", true, "Enable the trials only on moons tagged with *Trials* "); SecondaryObjectivesEnabled = ((BaseUnityPlugin)this).Config.Bind("Secondary objectives", "Enable secondaries", true, "Enable the secondary objectives in interiors"); SecondaryDisableTrials = ((BaseUnityPlugin)this).Config.Bind("Secondary objectives", "Disable with trials", true, "Disable the secondaries when the interior has a trial present"); SecondaryProgressSounds = ((BaseUnityPlugin)this).Config.Bind("Secondary objectives", "Progress sounds", true, "Whether the secondary objectives play global sounds upon objective completion"); SecondarySoloRewardMultiplier = ((BaseUnityPlugin)this).Config.Bind("Secondary objectives", "Solo reward multiplier", 1.17f, "Value multiplier for the secondary objective rewards while playing alone (stacks on top of other multipliers)"); SecondaryVeryEasyMultiplier = ((BaseUnityPlugin)this).Config.Bind("Secondary objectives", "Very easy reward multiplier", 0.6f, "Value multiplier for secondary objectives which are marked as very easy"); SecondaryEasyMultiplier = ((BaseUnityPlugin)this).Config.Bind("Secondary objectives", "Easy reward multiplier", 1f, "Value multiplier for secondary objectives which are marked as easy"); SecondaryMediumMultiplier = ((BaseUnityPlugin)this).Config.Bind("Secondary objectives", "Medium reward multiplier", 1.15f, "Value multiplier for secondary objectives which are marked as medium"); SecondaryHardMultiplier = ((BaseUnityPlugin)this).Config.Bind("Secondary objectives", "Hard reward multiplier", 1.4f, "Value multiplier for secondary objectives which are marked as hard"); SecondaryBadRewardValue = ((BaseUnityPlugin)this).Config.Bind("Secondary objectives", "Bad reward value", 160, "Value of the 'bad' reward item"); SecondaryMediumRewardValue = ((BaseUnityPlugin)this).Config.Bind("Secondary objectives", "medium reward value", 270, "Value of the 'medium' reward item"); SecondaryGoodRewardValue = ((BaseUnityPlugin)this).Config.Bind("Secondary objectives", "Good reward value", 420, "Value of the 'good' reward item"); SpawnOutsideNutcrackers = ((BaseUnityPlugin)this).Config.Bind("Toy store", "Spawn outside nutcrackers", true, "Spawn nutcrackers outside when toy store is present"); LessNauseatingCalist = ((BaseUnityPlugin)this).Config.Bind("Calist", "Motionsickness reducer", false, "Movie: Iron lung, 0:00s, first sentence."); Harmony.PatchAll(typeof(WesleysInteriorToolsPlugin)); Harmony.PatchAll(typeof(SavePatches)); } public static float GetSecondarySoloRewardMultiplier() { return SecondarySoloRewardMultiplier.Value; } public static bool GetMotionSicknessValue() { return LessNauseatingCalist.Value; } public static float GetSecondaryMultiplier(int rewardType) { return rewardType switch { 0 => SecondaryEasyMultiplier.Value, 1 => SecondaryMediumMultiplier.Value, 2 => SecondaryHardMultiplier.Value, 3 => SecondaryVeryEasyMultiplier.Value, _ => 0f, }; } public static int GetSecondaryRewardValue(int rewardType) { return rewardType switch { 0 => SecondaryBadRewardValue.Value, 1 => SecondaryMediumRewardValue.Value, 2 => SecondaryGoodRewardValue.Value, _ => 0, }; } public static bool GetObjectiveSoundValue() { return SecondaryProgressSounds.Value; } public static int GetTrialValue() { if (EnableTrials.Value) { if (TrialMoonsOnly.Value) { return 2; } return 1; } return 0; } public static int GetSecondaryValue() { if (SecondaryObjectivesEnabled.Value) { if (SecondaryDisableTrials.Value) { return 2; } return 1; } return 0; } public static bool GetNutcrackerValue() { return SpawnOutsideNutcrackers.Value; } } } namespace WesleysInteriorTools.Save { public class JourneysSaveData : ModDataContainer { private List _InsertedTrialTickets; private List _CraftingItems; private List _CacheSpawnedLocations; private List _TriangulatableMoonsDefault; private List _TriangulatableMoonsList; private List _ScrapCrashes; private List _MoonsVisited; private int _FabricatorDoor; private int _ShipState; private int _DaysPassed; private int _CrashDay; private int _CurrentDaysPassed; private int _ShipApproachState; private bool _ShipCrashed; public void InitData() { if (_MoonsVisited == null) { _MoonsVisited = new List(); } if (_CraftingItems == null) { _CraftingItems = new List { 0, 0, 0, 0, 0, 0, 0, 0 }; } if (_ScrapCrashes == null) { _ScrapCrashes = new List { false, false, false, false, false, false, false, false, false, false, false, false }; } if (_TriangulatableMoonsDefault == null) { _TriangulatableMoonsDefault = new List(); } if (_TriangulatableMoonsList == null) { _TriangulatableMoonsList = new List(); } if (_InsertedTrialTickets == null) { _InsertedTrialTickets = new List { false, false, false, false, false }; } if (_CacheSpawnedLocations == null) { _CacheSpawnedLocations = new List { 0, 0, 0, 0 }; } if (_CrashDay == 0) { _CrashDay = 999; } } public bool CheckAllTickets() { return !_InsertedTrialTickets.Contains(item: false); } public bool GetTicketInserted(int value) { return _InsertedTrialTickets[value]; } public void SetTicketInserted(int value) { _InsertedTrialTickets[value] = true; } public int GetCrashDay() { return _CrashDay; } public void SetCrashDay(int value) { if (_CrashDay == 999) { _CrashDay = value; } } public void TryAddMoonToList(string moonName) { if (!_MoonsVisited.Contains(moonName)) { _MoonsVisited.Add(moonName); } } public List GetVisitedMoonsList() { return _MoonsVisited; } public int GetShipApproachState() { return _ShipApproachState; } public void SetShipApproachState(int value) { _ShipApproachState = value; } public void UpdateDayCounter(int days) { if (days != _CurrentDaysPassed) { if (days < _CurrentDaysPassed) { _DaysPassed++; } else { int num = days - _CurrentDaysPassed; _DaysPassed += num; } _CurrentDaysPassed = days; } } public int GetDaysPassed() { return _DaysPassed; } public bool GetScrapCrashedState(int value) { return _ScrapCrashes[value]; } public void SetScrapCrashed(int value) { _ScrapCrashes[value] = true; } public bool GetShipCrashed() { return _ShipCrashed; } public void SetShipCrashed(bool value) { _ShipCrashed = value; } public int GetCacheSpawned(int value) { return _CacheSpawnedLocations[value]; } public void SetCacheSpawned(int value) { _CacheSpawnedLocations[value] = 1; } public void SetShipState(int value) { if (_ShipState == 0) { _ShipState = value; } } public int GetShipState() { return _ShipState; } public int[] GetTriangulatedMoonsDefaultList() { int[] array = new int[_TriangulatableMoonsDefault.Count]; for (int i = 0; i < array.Length; i++) { array[i] = _TriangulatableMoonsDefault[i]; } return array; } public void SetMoonTriangulated(TriangulateEnums.TriangulateMoon moon) { if (_TriangulatableMoonsList.Contains((int)moon)) { _TriangulatableMoonsList.Remove((int)moon); } } public int GetTriangulationState(TriangulateEnums.TriangulateMoon moon) { bool flag = false; bool flag2 = false; if (_TriangulatableMoonsDefault.Contains((int)moon)) { flag = true; } if (_TriangulatableMoonsList.Contains((int)moon)) { flag2 = true; } if (flag && !flag2) { return 1; } if (!flag) { return 2; } return 0; } public void SetTriangulatedMoonsDefault(int[] moons) { for (int i = 0; i < moons.Length; i++) { _TriangulatableMoonsDefault.Add(moons[i]); } } public void SetTriangulatedMoonsList() { _TriangulatableMoonsList.AddRange(_TriangulatableMoonsDefault); } public List GetTriangulatedMoonsList() { return _TriangulatableMoonsList; } public bool CheckIfAllTriangulated() { if (_TriangulatableMoonsDefault != null && _TriangulatableMoonsDefault.Count > 0 && _TriangulatableMoonsList.Count == 0) { return true; } return false; } public void UpdateItemValue(int item, int value) { if (item < _CraftingItems.Count) { _CraftingItems[item] += value; } } public int GetItemValue(int item) { if (item >= _CraftingItems.Count) { return 0; } return _CraftingItems[item]; } public int GetFabricationDoor() { return _FabricatorDoor; } public void SetFabricationdoorOpen() { _FabricatorDoor = 1; } public List GetCraftingList() { return _CraftingItems; } public void Reset() { if (_TriangulatableMoonsList.Count > 0) { _TriangulatableMoonsList = new List(); _TriangulatableMoonsList.AddRange(_TriangulatableMoonsDefault); } if (_InsertedTrialTickets.Contains(item: false)) { _InsertedTrialTickets = new List { false, false, false, false, false }; } ((ModDataContainer)this).Save(); } } } namespace WesleysInteriorTools.Patches { internal class SavePatches { [HarmonyPatch(typeof(StartOfRound), "Start")] [HarmonyPrefix] internal static void LoadFile(StartOfRound __instance) { if (((NetworkBehaviour)__instance).IsHost || ((NetworkBehaviour)__instance).IsServer) { WesleysInteriorToolsPlugin.CurrentSave = new JourneysSaveData(); ((ModDataContainer)WesleysInteriorToolsPlugin.CurrentSave).Load(); WesleysInteriorToolsPlugin.CurrentSave.InitData(); } } [HarmonyPatch(typeof(GameNetworkManager), "SaveGameValues")] [HarmonyPrefix] internal static void SaveFile(GameNetworkManager __instance) { if (__instance.isHostingGame || (WesleysInteriorToolsPlugin.CurrentSave != null && StartOfRound.Instance.inShipPhase)) { ((ModDataContainer)WesleysInteriorToolsPlugin.CurrentSave).Save(); } } [HarmonyPatch(typeof(GameNetworkManager), "ResetSavedGameValues")] [HarmonyPrefix] internal static void ResetFile(GameNetworkManager __instance) { if (__instance.isHostingGame || WesleysInteriorToolsPlugin.CurrentSave != null) { WesleysInteriorToolsPlugin.CurrentSave.Reset(); } } } } namespace WesleysInteriorTools.Items { internal class CustomShotgun : GrabbableObject { public int gunCompatibleAmmoID = 1410; public bool isReloading; public int shellsLoaded; public Animator gunAnimator; public AudioSource gunAudio; public AudioSource gunShootAudio; public AudioSource gunBulletsRicochetAudio; private Coroutine gunCoroutine; public AudioClip[] gunShootSFX; public AudioClip gunReloadSFX; public AudioClip gunReloadFinishSFX; public AudioClip noAmmoSFX; public AudioClip gunSafetySFX; public AudioClip switchSafetyOnSFX; public AudioClip switchSafetyOffSFX; public bool safetyOn; private float misfireTimer = 30f; private bool hasHitGroundWithSafetyOff = true; private int ammoSlotToUse = -1; private bool localClientSendingShootGunRPC; private PlayerControllerB previousPlayerHeldBy; public ParticleSystem gunShootParticle; public Transform shotgunRayPoint; public MeshRenderer shotgunShellLeft; public MeshRenderer shotgunShellRight; public MeshRenderer shotgunShellInHand; public Transform shotgunShellInHandTransform; private RaycastHit[] enemyColliders; private EnemyAI heldByEnemy; public override void Start() { ((GrabbableObject)this).Start(); misfireTimer = 30f; hasHitGroundWithSafetyOff = true; } public override int GetItemDataToSave() { ((GrabbableObject)this).GetItemDataToSave(); return shellsLoaded; } public override void LoadItemSaveData(int saveData) { ((GrabbableObject)this).LoadItemSaveData(saveData); safetyOn = true; shellsLoaded = saveData; } public override void Update() { ((GrabbableObject)this).Update(); if (!((NetworkBehaviour)this).IsOwner || shellsLoaded <= 0 || isReloading || (Object)(object)heldByEnemy != (Object)null || base.isPocketed) { return; } if (base.hasHitGround && !safetyOn && !hasHitGroundWithSafetyOff && !base.isHeld) { if (Random.Range(0, 100) < 5) { ShootGunAndSync(heldByPlayer: false); } hasHitGroundWithSafetyOff = true; } else if (!safetyOn && misfireTimer <= 0f && !StartOfRound.Instance.inShipPhase) { if (Random.Range(0, 100) < 4) { ShootGunAndSync(base.isHeld); } if (Random.Range(0, 100) < 5) { misfireTimer = 2f; } else { misfireTimer = Random.Range(28f, 50f); } } else if (!safetyOn) { misfireTimer -= Time.deltaTime; } } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); previousPlayerHeldBy = base.playerHeldBy; previousPlayerHeldBy.equippedUsableItemQE = true; hasHitGroundWithSafetyOff = false; } public override void GrabItemFromEnemy(EnemyAI enemy) { ((GrabbableObject)this).GrabItemFromEnemy(enemy); heldByEnemy = enemy; hasHitGroundWithSafetyOff = false; } public override void DiscardItemFromEnemy() { ((GrabbableObject)this).DiscardItemFromEnemy(); heldByEnemy = null; } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!isReloading) { if (shellsLoaded == 0) { StartReloadGun(); } else if (safetyOn) { gunAudio.PlayOneShot(gunSafetySFX); } else if (((NetworkBehaviour)this).IsOwner) { ShootGunAndSync(heldByPlayer: true); } } } public void ShootGunAndSync(bool heldByPlayer) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_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_008f: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) Vector3 shotgunPosition; Vector3 forward; if (!heldByPlayer) { shotgunPosition = shotgunRayPoint.position; forward = shotgunRayPoint.forward; } else { shotgunPosition = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position - ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.up * 0.45f; forward = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward; } Debug.Log((object)"Calling shoot gun...."); ShootGun(shotgunPosition, forward); Debug.Log((object)"Calling shoot gun and sync"); localClientSendingShootGunRPC = true; ShootGunServerRpc(shotgunPosition, forward); } [ServerRpc(RequireOwnership = false)] public void ShootGunServerRpc(Vector3 shotgunPosition, Vector3 shotgunForward) { //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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) 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(3041755134u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref shotgunPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref shotgunForward); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3041755134u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ShootGunClientRpc(shotgunPosition, shotgunForward); } } } [ClientRpc] public void ShootGunClientRpc(Vector3 shotgunPosition, Vector3 shotgunForward) { //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_010e: 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) 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(1672687608u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref shotgunPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref shotgunForward); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1672687608u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Shoot gun client rpc received"); if (localClientSendingShootGunRPC) { localClientSendingShootGunRPC = false; Debug.Log((object)"localClientSendingShootGunRPC was true"); } else { ShootGun(shotgunPosition, shotgunForward); } } } public void ShootGun(Vector3 shotgunPosition, Vector3 shotgunForward) { //IL_00d9: 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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012a: 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_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_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) isReloading = false; bool flag = false; if (base.isHeld && (Object)(object)base.playerHeldBy != (Object)null && (Object)(object)base.playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController) { base.playerHeldBy.playerBodyAnimator.SetTrigger("ShootShotgun"); flag = true; } RoundManager.PlayRandomClip(gunShootAudio, gunShootSFX, true, 1f, 1840, 1000); WalkieTalkie.TransmitOneShotAudio(gunShootAudio, gunShootSFX[0], 1f); gunShootParticle.Play(true); shellsLoaded = Mathf.Clamp(shellsLoaded - 1, 0, 1); PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null) { return; } float num = Vector3.Distance(((Component)localPlayerController).transform.position, ((Component)shotgunRayPoint).transform.position); bool flag2 = false; int num2 = 0; float num3 = 0f; Vector3 val = localPlayerController.playerCollider.ClosestPoint(shotgunPosition); if (!flag && !Physics.Linecast(shotgunPosition, val, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && Vector3.Angle(shotgunForward, val - shotgunPosition) < 30f) { flag2 = true; } if (num < 5f) { num3 = 0.8f; HUDManager.Instance.ShakeCamera((ScreenShakeType)1); num2 = 100; } if (num < 15f) { num3 = 0.5f; HUDManager.Instance.ShakeCamera((ScreenShakeType)1); num2 = 70; } else if (num < 23f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); num2 = 20; } else if (num < 30f) { num2 = 10; } if (num3 > 0f && SoundManager.Instance.timeSinceEarsStartedRinging > 16f) { ((MonoBehaviour)this).StartCoroutine(delayedEarsRinging(num3)); } Ray val2 = default(Ray); ((Ray)(ref val2))..ctor(shotgunPosition, shotgunForward); RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(val2, ref val3, 30f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { ((Component)gunBulletsRicochetAudio).transform.position = ((Ray)(ref val2)).GetPoint(((RaycastHit)(ref val3)).distance - 0.5f); gunBulletsRicochetAudio.Play(); } if (flag2) { localPlayerController.DamagePlayer(num2, true, true, (CauseOfDeath)7, 0, false, shotgunRayPoint.forward * 30f); } if (!((NetworkBehaviour)this).IsOwner) { return; } if (enemyColliders == null) { enemyColliders = (RaycastHit[])(object)new RaycastHit[10]; } ((Ray)(ref val2))..ctor(shotgunPosition - shotgunForward * 10f, shotgunForward); int num4 = Physics.SphereCastNonAlloc(val2, 5f, enemyColliders, 15f, 524288, (QueryTriggerInteraction)2); List list = new List(); IHittable val4 = default(IHittable); for (int i = 0; i < num4; i++) { if (!Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref enemyColliders[i])).transform).GetComponent())) { continue; } EnemyAI mainScript = ((Component)((RaycastHit)(ref enemyColliders[i])).transform).GetComponent().mainScript; if ((Object)(object)heldByEnemy != (Object)null && (Object)(object)heldByEnemy == (Object)(object)mainScript) { continue; } if (((RaycastHit)(ref enemyColliders[i])).distance == 0f) { Debug.Log((object)"Spherecast started inside enemy collider"); } else if (!Physics.Linecast(shotgunPosition, ((RaycastHit)(ref enemyColliders[i])).point, ref val3, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && ((Component)((RaycastHit)(ref enemyColliders[i])).transform).TryGetComponent(ref val4)) { float num5 = Vector3.Distance(shotgunPosition, ((RaycastHit)(ref enemyColliders[i])).point); int num6 = ((num5 < 12f) ? 4 : ((!(num5 < 20f)) ? 2 : 3)); EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref enemyColliders[i])).collider).GetComponent(); if ((!((Object)(object)component != (Object)null) || (!((Object)(object)component.mainScript == (Object)null) && !list.Contains(component.mainScript))) && val4.Hit(num6, shotgunForward, base.playerHeldBy, true, -1) && (Object)(object)component != (Object)null) { list.Add(component.mainScript); } } } } private IEnumerator delayedEarsRinging(float effectSeverity) { yield return (object)new WaitForSeconds(0.6f); SoundManager.Instance.earsRingingTimer = effectSeverity; } public override void ItemInteractLeftRight(bool right) { ((GrabbableObject)this).ItemInteractLeftRight(right); if ((Object)(object)base.playerHeldBy == (Object)null) { return; } Debug.Log((object)$"r/l activate: {right}"); if (!right) { if (safetyOn) { safetyOn = false; gunAudio.PlayOneShot(switchSafetyOffSFX); WalkieTalkie.TransmitOneShotAudio(gunAudio, switchSafetyOffSFX, 1f); SetSafetyControlTip(); } else { safetyOn = true; gunAudio.PlayOneShot(switchSafetyOnSFX); WalkieTalkie.TransmitOneShotAudio(gunAudio, switchSafetyOnSFX, 1f); SetSafetyControlTip(); } base.playerHeldBy.playerBodyAnimator.SetTrigger("SwitchGunSafety"); } else if (!isReloading && shellsLoaded < 1) { StartReloadGun(); } } public override void SetControlTipsForItem() { string[] toolTips = base.itemProperties.toolTips; if (toolTips.Length <= 2) { Debug.LogError((object)"Shotgun control tips array length is too short to set tips!"); return; } if (safetyOn) { toolTips[2] = "Turn safety off: [Q]"; } else { toolTips[2] = "Turn safety on: [Q]"; } HUDManager.Instance.ChangeControlTipMultiple(toolTips, true, base.itemProperties); } private void SetSafetyControlTip() { string text = ((!safetyOn) ? "Turn safety on: [Q]" : "Turn safety off: [Q]"); if (((NetworkBehaviour)this).IsOwner) { HUDManager.Instance.ChangeControlTip(3, text, false); } } private void StartReloadGun() { if (ReloadedGun()) { if (((NetworkBehaviour)this).IsOwner) { if (gunCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gunCoroutine); } gunCoroutine = ((MonoBehaviour)this).StartCoroutine(reloadGunAnimation()); } } else { gunAudio.PlayOneShot(noAmmoSFX); } } [ServerRpc] public void ReloadGunEffectsServerRpc(bool start = true) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((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(1390201959u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref start, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1390201959u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ReloadGunEffectsClientRpc(start); } } [ClientRpc] public void ReloadGunEffectsClientRpc(bool start = true) { //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(291846330u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref start, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 291846330u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { if (start) { gunAudio.PlayOneShot(gunReloadSFX); WalkieTalkie.TransmitOneShotAudio(gunAudio, gunReloadSFX, 1f); gunAnimator.SetBool("Reloading", true); isReloading = true; } else { shellsLoaded = Mathf.Clamp(shellsLoaded + 1, 0, 1); gunAudio.PlayOneShot(gunReloadFinishSFX); gunAnimator.SetBool("Reloading", false); isReloading = false; } } } private IEnumerator reloadGunAnimation() { isReloading = true; if (shellsLoaded <= 0) { base.playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun", true); ((Renderer)shotgunShellLeft).enabled = false; ((Renderer)shotgunShellRight).enabled = false; } yield return (object)new WaitForSeconds(0.3f); gunAudio.PlayOneShot(gunReloadSFX); gunAnimator.SetBool("Reloading", true); ReloadGunEffectsServerRpc(); yield return (object)new WaitForSeconds(0.95f); ((Renderer)shotgunShellInHand).enabled = true; shotgunShellInHandTransform.SetParent(base.playerHeldBy.leftHandItemTarget); shotgunShellInHandTransform.localPosition = new Vector3(-0.0555f, 0.1469f, -0.0655f); shotgunShellInHandTransform.localEulerAngles = new Vector3(-1.956f, 143.856f, -16.427f); yield return (object)new WaitForSeconds(0.95f); base.playerHeldBy.DestroyItemInSlotAndSync(ammoSlotToUse); ammoSlotToUse = -1; shellsLoaded = Mathf.Clamp(shellsLoaded + 1, 0, 1); ((Renderer)shotgunShellLeft).enabled = true; if (shellsLoaded == 2) { ((Renderer)shotgunShellRight).enabled = true; } ((Renderer)shotgunShellInHand).enabled = false; shotgunShellInHandTransform.SetParent(((Component)this).transform); yield return (object)new WaitForSeconds(0.45f); gunAudio.PlayOneShot(gunReloadFinishSFX); gunAnimator.SetBool("Reloading", false); base.playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun", false); base.playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun2", false); isReloading = false; ReloadGunEffectsServerRpc(start: false); } private bool ReloadedGun() { int num = FindAmmoInInventory(); if (num == -1) { Debug.Log((object)"not reloading"); return false; } Debug.Log((object)"reloading!"); ammoSlotToUse = num; return true; } private int FindAmmoInInventory() { for (int i = 0; i < base.playerHeldBy.ItemSlots.Length; i++) { if (!((Object)(object)base.playerHeldBy.ItemSlots[i] == (Object)null)) { GrabbableObject obj = base.playerHeldBy.ItemSlots[i]; GunAmmo val = (GunAmmo)(object)((obj is GunAmmo) ? obj : null); if ((Object)(object)val != (Object)null && val.ammoType == gunCompatibleAmmoID) { return i; } } } if ((Object)(object)base.playerHeldBy.ItemOnlySlot != (Object)null) { GrabbableObject itemOnlySlot = base.playerHeldBy.ItemOnlySlot; GunAmmo val2 = (GunAmmo)(object)((itemOnlySlot is GunAmmo) ? itemOnlySlot : null); if ((Object)(object)val2 != (Object)null && val2.ammoType == gunCompatibleAmmoID) { return 50; } } return -1; } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); StopUsingGun(); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); StopUsingGun(); } private void StopUsingGun() { previousPlayerHeldBy.equippedUsableItemQE = false; if (isReloading) { if (gunCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gunCoroutine); } gunAnimator.SetBool("Reloading", false); gunAudio.Stop(); if ((Object)(object)previousPlayerHeldBy != (Object)null) { previousPlayerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun", false); previousPlayerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun2", false); } ((Renderer)shotgunShellInHand).enabled = false; shotgunShellInHandTransform.SetParent(((Component)this).transform); isReloading = false; } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3041755134u, new RpcReceiveHandler(__rpc_handler_3041755134), "ShootGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(1672687608u, new RpcReceiveHandler(__rpc_handler_1672687608), "ShootGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(1390201959u, new RpcReceiveHandler(__rpc_handler_1390201959), "ReloadGunEffectsServerRpc"); ((NetworkBehaviour)this).__registerRpc(291846330u, new RpcReceiveHandler(__rpc_handler_291846330), "ReloadGunEffectsClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3041755134(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 shotgunPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunPosition); Vector3 shotgunForward = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomShotgun)(object)target).ShootGunServerRpc(shotgunPosition, shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1672687608(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 shotgunPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunPosition); Vector3 shotgunForward = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomShotgun)(object)target).ShootGunClientRpc(shotgunPosition, shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1390201959(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { bool start = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref start, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomShotgun)(object)target).ReloadGunEffectsServerRpc(start); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_291846330(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 start = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref start, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomShotgun)(object)target).ReloadGunEffectsClientRpc(start); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CustomShotgun"; } } internal class FailsafeFloppyDisc : GrabbableObject { public ExtendedLevelLocker LevelLocker; public void FailsafeDiscUsed() { UseFailSafeServerRpc(); } [ServerRpc(RequireOwnership = false)] private void UseFailSafeServerRpc() { //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(3844853926u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3844853926u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; List list = new List(); list.AddRange(WesleysInteriorToolsPlugin.CurrentSave.GetVisitedMoonsList()); bool flag = WesleysInteriorToolsPlugin.CurrentSave.GetShipState() == 0; foreach (string item in list) { if (!(item == "ResearcherScene") || flag) { UnlockFailsafeMoonsClientRpc(item); } } } [ClientRpc] private void UnlockFailsafeMoonsClientRpc(string moon) { //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(1801758241u, val2, (RpcDelivery)0); bool flag = moon != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(moon, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1801758241u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LevelLocker.sceneName = moon; LevelLocker.SetLevelHidden(false); LevelLocker.SetLevelLocked(false); WesleysInteriorToolsPlugin.TheWhispers.LogDebug((object)("Failsafe moon unlocked : " + moon)); } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3844853926u, new RpcReceiveHandler(__rpc_handler_3844853926), "UseFailSafeServerRpc"); ((NetworkBehaviour)this).__registerRpc(1801758241u, new RpcReceiveHandler(__rpc_handler_1801758241), "UnlockFailsafeMoonsClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3844853926(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; ((FailsafeFloppyDisc)(object)target).UseFailSafeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1801758241(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 moon = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref moon, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((FailsafeFloppyDisc)(object)target).UnlockFailsafeMoonsClientRpc(moon); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FailsafeFloppyDisc"; } } internal class FogReducerItem : GrabbableObject { public bool RadarVisible; public GameObject RadarDot; public float FogReducerDistance = 0f; public float FogReducerDistanceMax = 90f; private Vector3 FogSize = Vector3.zero; public bool FogReducerEnabled; public AudioSource ReducerLoopSfx; public AudioSource ReducerSfx; public ParticleSystem DeFogParticles; public AudioClip ReducerEnableClip; public AudioClip ReducerDisableClip; public Animator FogReducerAnimator; public LocalVolumetricFog LocalFog; public override void Start() { ((GrabbableObject)this).Start(); ((Behaviour)LocalFog).enabled = false; } public override void Update() { //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (FogReducerEnabled) { if (!((Behaviour)LocalFog).enabled) { ((Behaviour)LocalFog).enabled = true; } FogReducerDistance = Mathf.Lerp(FogReducerDistance, FogReducerDistanceMax, Time.deltaTime * 0.2f); } else { if (((Behaviour)LocalFog).enabled && FogReducerDistance < 0.5f) { ((Behaviour)LocalFog).enabled = false; } FogReducerDistance = Mathf.Lerp(FogReducerDistance, 0f, Time.deltaTime * 0.5f); } FogSize.x = FogReducerDistance; FogSize.y = FogReducerDistance; FogSize.z = FogReducerDistance; LocalFog.parameters.size = FogSize; } private void OnEnable() { } private void OnDisable() { if (RadarVisible) { RemoveReducerFromRadar(); } } private void RemoveReducerFromRadar() { StartOfRound.Instance.mapScreen.RemoveTargetFromRadar(((Component)this).transform); } private void AddReducerToRadar() { string text = StartOfRound.Instance.mapScreen.AddTransformAsTargetToRadar(((Component)this).transform, "Clear skies", true); if (!string.IsNullOrEmpty(text)) { ((Component)this).gameObject.GetComponentInChildren().headerText = text; } StartOfRound.Instance.mapScreen.SyncOrderOfRadarBoostersInList(); } public void EnableFogReducer(bool enable) { FogReducerAnimator.SetBool("enabled", enable); RadarDot.SetActive(enable); FogReducerEnabled = enable; if (enable) { AddReducerToRadar(); ReducerLoopSfx.Play(); ReducerSfx.PlayOneShot(ReducerEnableClip); DeFogParticles.Play(); } else { ReducerLoopSfx.Stop(); ReducerSfx.PlayOneShot(ReducerDisableClip); DeFogParticles.Stop(); } RadarVisible = enable; } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); EnableFogReducer(used); } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); base.isBeingUsed = false; EnableFogReducer(enable: false); } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "FogReducerItem"; } } internal class GlassOfWaterItem : GrabbableObject { private PlayerControllerB PreviousPlayerController; private float DrinkingTime = 0f; public float HealInterval = 2f; private float DrinkingVolume; private bool Healing; public List SteamIds; private Coroutine UseWaterCoroutine; public AudioSource AudioSource; public AudioSource DrinkingAudioSource; public AudioClip LowerWater; public AudioClip RaiseWater; public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown) { base.isBeingUsed = true; UseWaterCoroutine = ((MonoBehaviour)this).StartCoroutine(UseHealingWaterCoroutine()); PreviousPlayerController = base.playerHeldBy; } else { base.isBeingUsed = false; if (UseWaterCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(UseWaterCoroutine); PreviousPlayerController.activatingItem = false; Healing = false; AudioSource.Stop(); AudioSource.PlayOneShot(LowerWater); DrinkingTime = 0f; } } if (((NetworkBehaviour)this).IsOwner) { PreviousPlayerController.activatingItem = buttonDown; PreviousPlayerController.playerBodyAnimator.SetBool("useTZPItem", buttonDown); } } public override void Update() { if (Healing) { if ((Object)(object)PreviousPlayerController == (Object)null || !base.isHeld) { Healing = false; } if (DrinkingTime < HealInterval) { DrinkingTime += Time.deltaTime; } else { DrinkingTime = 0f; if (PreviousPlayerController.health < 100) { PlayerControllerB previousPlayerController = PreviousPlayerController; previousPlayerController.health++; } } if (DrinkingVolume < 1f) { DrinkingVolume += Time.deltaTime; } if (!DrinkingAudioSource.isPlaying) { DrinkingAudioSource.Play(); } } else if (DrinkingVolume > 0f) { DrinkingVolume -= Time.deltaTime * 4f; } else if (DrinkingAudioSource.isPlaying) { DrinkingAudioSource.Stop(); } DrinkingAudioSource.volume = DrinkingVolume; ((GrabbableObject)this).Update(); } private IEnumerator UseHealingWaterCoroutine() { AudioSource.PlayOneShot(RaiseWater); yield return (object)new WaitForSeconds(0.8f); Healing = true; yield return (object)new WaitForSeconds(1f); CheckSteamId(); } private void CheckSteamId() { //IL_007e: 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) string text = PreviousPlayerController.playerSteamId.ToString(); bool flag = false; foreach (string steamId in SteamIds) { if (steamId == text) { flag = true; break; } } if (flag) { int num = Random.Range(0, StartOfRound.Instance.playerRagdolls.Count); PreviousPlayerController.KillPlayer(Vector3.zero, true, (CauseOfDeath)5, num, default(Vector3), false); } } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); if ((Object)(object)base.playerHeldBy != (Object)null) { PreviousPlayerController = base.playerHeldBy; } } public override void DiscardItem() { PreviousPlayerController.playerBodyAnimator.SetBool("useTZPItem", false); AudioSource.Stop(); DrinkingTime = 0f; Healing = false; if ((Object)(object)PreviousPlayerController != (Object)null) { PreviousPlayerController.activatingItem = false; } ((GrabbableObject)this).DiscardItem(); } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "GlassOfWaterItem"; } } internal class HealthEmitterItem : GrabbableObject { public bool SporeEmitterEnabled; public bool RunOutOfFuel; public float SporeEmitterFuel = 30f; public int HealthIncreaseAmount = 5; public float HealthIncreaseImpulseTimer = 1f; private float HealthIncreaseImpulseTime = 0f; public AudioSource EmitterLoopSfx; public AudioSource EmitterSfx; public ParticleSystem EmitterParticles; public AudioClip EmitterEnabledClip; public AudioClip EmitterDisabledClip; public Animator EmitterAnimator; public bool IsDiy = false; private bool DiyUsed = false; public override void Start() { ((GrabbableObject)this).Start(); } public override void Update() { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (RunOutOfFuel || !SporeEmitterEnabled || !(SporeEmitterFuel > 0f)) { return; } SporeEmitterFuel -= Time.deltaTime; if (SporeEmitterFuel <= 0f) { RunOutOfFuel = true; if (((NetworkBehaviour)this).IsServer) { DisableEmitterClientRpc(); } } if (GameNetworkManager.Instance.localPlayerController.isPlayerDead) { return; } float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position); if (num > 3f) { return; } if (HealthIncreaseImpulseTime < HealthIncreaseImpulseTimer) { HealthIncreaseImpulseTime += Time.deltaTime; return; } HealthIncreaseImpulseTime = 0f; if (GameNetworkManager.Instance.localPlayerController.health >= 100) { return; } if (GameNetworkManager.Instance.localPlayerController.criticallyInjured) { if (GameNetworkManager.Instance.localPlayerController.health >= 20) { GameNetworkManager.Instance.localPlayerController.MakeCriticallyInjured(false); } HUDManager.Instance.UpdateHealthUI(GameNetworkManager.Instance.localPlayerController.health, false); } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; localPlayerController.health += HealthIncreaseAmount; } private void OnEnable() { } private void OnDisable() { } [ClientRpc] private void DisableEmitterClientRpc() { //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(356544802u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 356544802u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; EmitterLoopSfx.Stop(); if (!IsDiy) { EmitterSfx.PlayOneShot(EmitterDisabledClip); EmitterAnimator.SetBool("enabled", false); } EmitterParticles.Stop(); SporeEmitterEnabled = false; RunOutOfFuel = true; } } public void EnableEmitter(bool enable) { if (RunOutOfFuel || DiyUsed) { return; } EmitterAnimator.SetBool("enabled", enable); SporeEmitterEnabled = enable; if (enable) { if (IsDiy) { DiyUsed = true; } EmitterLoopSfx.Play(); EmitterSfx.PlayOneShot(EmitterEnabledClip); EmitterParticles.Play(); } else { EmitterLoopSfx.Stop(); EmitterSfx.PlayOneShot(EmitterDisabledClip); EmitterParticles.Stop(); } } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); EnableEmitter(used); } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); base.isBeingUsed = false; if (SporeEmitterEnabled) { EnableEmitter(enable: false); } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(356544802u, new RpcReceiveHandler(__rpc_handler_356544802), "DisableEmitterClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_356544802(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; ((HealthEmitterItem)(object)target).DisableEmitterClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "HealthEmitterItem"; } } internal class PesticideSprinklerItem : GrabbableObject { public bool AllowSprinklerUse = false; public InteractTrigger Trigger; public BoxCollider TriggerCollider; public bool Spraying = false; public bool OutOfFuel = false; public float Fuel = 100f; public float FuelDecrease = 0f; public float AffectedDistance = 12f; public float SprayImpulse = 2f; public int ImpulseCount = 8; private int ImpulseCounted = 0; public float ShroudSprayMultiplier = 2f; public float CadaverSprayMultipier = 2f; private float SprayImpulseTimer = 0f; public float ImpulseCountTimer = 0.2f; private float ImpulseCountTime = 0f; public ParticleSystem SprinklerParticlesFull; public ParticleSystem SprinklerParticlesEmpty; public AudioSource SprinklerLoopSfx; public AudioSource SprinklerLoopEmptySfx; public AudioSource SprinklerSfx; public AudioClip EnableClip; public AudioClip DisableClip; public Animator SprinklerAnimator; [Header("Weed stuff")] private MoldSpreadManager moldManager; private (int batchNum, int positionIndex) killingWeed; private (int batchNum, int positionIndex, int plantType) killingCadaverPlant; private CadaverGrowthAI cadaverGrowthAI; public static Matrix4x4 ResizeMatrix(Matrix4x4 yourMatrix, float shrinkSpeed, bool shrink = true) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_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_003a: 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_00c3: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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_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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) Matrix4x4 val = yourMatrix; Vector3 val2 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(3)); Vector3 val3 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(0)); Vector3 val4 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(1)); Vector3 val5 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(2)); float magnitude = ((Vector3)(ref val3)).magnitude; float magnitude2 = ((Vector3)(ref val4)).magnitude; float magnitude3 = ((Vector3)(ref val5)).magnitude; float num = ((!shrink) ? (1f + shrinkSpeed * Time.deltaTime) : (1f - shrinkSpeed * Time.deltaTime)); magnitude = Mathf.Clamp(magnitude * num, 0.001f, 10f); magnitude2 = Mathf.Clamp(magnitude2 * num, 0.001f, 10f); magnitude3 = Mathf.Clamp(magnitude3 * num, 0.001f, 10f); val3 = ((Vector3)(ref val3)).normalized * magnitude; val4 = ((Vector3)(ref val4)).normalized * magnitude2; val5 = ((Vector3)(ref val5)).normalized * magnitude3; Matrix4x4 identity = Matrix4x4.identity; ((Matrix4x4)(ref identity)).SetColumn(0, Vector4.op_Implicit(val3)); ((Matrix4x4)(ref identity)).SetColumn(1, Vector4.op_Implicit(val4)); ((Matrix4x4)(ref identity)).SetColumn(2, Vector4.op_Implicit(val5)); ((Matrix4x4)(ref identity)).SetColumn(3, Vector4.op_Implicit(val2)); return identity; } public static Vector3 ExtractScaleFromMatrix(Matrix4x4 matrix) { //IL_0001: 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_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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) Vector3 val = new Vector3(matrix.m00, matrix.m10, matrix.m20); float magnitude = ((Vector3)(ref val)).magnitude; val = new Vector3(matrix.m01, matrix.m11, matrix.m21); float magnitude2 = ((Vector3)(ref val)).magnitude; val = new Vector3(matrix.m02, matrix.m12, matrix.m22); float magnitude3 = ((Vector3)(ref val)).magnitude; return new Vector3(magnitude, magnitude2, magnitude3); } public override void Start() { ((GrabbableObject)this).Start(); killingWeed.batchNum = -1; killingCadaverPlant.batchNum = -1; } private void OnEnable() { } private void OnDisable() { SetAllowSprinklerInteract(allow: false); EnableSprinkler(enable: false); } public override void Update() { ((GrabbableObject)this).Update(); } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); SetAllowSprinklerInteract(allow: false); if (Spraying) { EnableSprinkler(enable: false); } } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); SetAllowSprinklerInteract(allow: true); } public override void GrabItem() { SetAllowSprinklerInteract(allow: false); SwitchSprinklerServerRpc(forceOff: true); } private void SetAllowSprinklerInteract(bool allow) { AllowSprinklerUse = allow; Trigger.interactable = AllowSprinklerUse; ((Collider)TriggerCollider).enabled = allow; } private void EnableSprinkler(bool enable) { SprinklerAnimator.SetBool("enabled", enable); Spraying = enable; if (enable) { if (OutOfFuel) { SprinklerParticlesEmpty.Play(); SprinklerLoopEmptySfx.Play(); } else { SprinklerParticlesFull.Play(); SprinklerLoopSfx.Play(); } SprinklerSfx.PlayOneShot(EnableClip); } else { if (OutOfFuel) { SprinklerParticlesEmpty.Stop(); SprinklerLoopEmptySfx.Stop(); } else { SprinklerLoopSfx.Stop(); SprinklerParticlesFull.Stop(); } SprinklerSfx.PlayOneShot(DisableClip); } } public void SwitchSprinkler() { SwitchSprinklerServerRpc(forceOff: false); } [ServerRpc(RequireOwnership = false)] private void SwitchSprinklerServerRpc(bool forceOff) { //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.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2970992945u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref forceOff, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2970992945u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!forceOff) { if (!Spraying) { SwitchSprinklerClientRpc(enable: true); } else { SwitchSprinklerClientRpc(enable: false); } } else if (Spraying) { SwitchSprinklerClientRpc(enable: false); } } [ClientRpc] private void SwitchSprinklerClientRpc(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) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3932007815u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enable, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3932007815u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; EnableSprinkler(enable); } } } public override void LateUpdate() { ((GrabbableObject)this).LateUpdate(); if (!Spraying || OutOfFuel) { return; } if (SprayImpulseTimer < SprayImpulse) { SprayImpulseTimer += Time.deltaTime; } else if (ImpulseCounted < ImpulseCount) { if (ImpulseCountTime < ImpulseCountTimer) { ImpulseCountTime += Time.deltaTime; } else { ImpulseCountTime = 0f; ImpulseCounted++; AttemptSprayWeedImpulse(); Fuel -= FuelDecrease; } } else { ImpulseCounted = 0; SprayImpulseTimer = 0f; } if (((NetworkBehaviour)this).IsServer && Fuel <= 0f) { FuelEmptyClientRpc(); } } [ClientRpc] private void FuelEmptyClientRpc() { //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(2872219766u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2872219766u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (Spraying) { SprinklerParticlesFull.Stop(); SprinklerParticlesEmpty.Play(); SprinklerLoopSfx.Stop(); SprinklerLoopEmptySfx.Play(); } OutOfFuel = true; } } private void AttemptSprayWeedImpulse() { //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: 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_0228: 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_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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) DoPlantKillImpulse(); Matrix4x4 val2; if (killingCadaverPlant.batchNum != -1) { if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI == (Object)null) { killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); } Matrix4x4 val = cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex]; if (ExtractScaleFromMatrix(val).x < 3f && ((NetworkBehaviour)this).IsOwner) { val2 = cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex]; Vector3 position = ((Matrix4x4)(ref val2)).GetPosition(); KillCadaverPlantRpc(position); cadaverGrowthAI.DestroyPlantAtPosition(position, true); killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); } else { cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex] = ResizeMatrix(val, CadaverSprayMultipier); } } else if (killingWeed.batchNum != -1) { Matrix4x4 val3 = moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex]; if (ExtractScaleFromMatrix(val3).x < 0.5f && ((NetworkBehaviour)this).IsOwner) { val2 = moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex]; Vector3 position2 = ((Matrix4x4)(ref val2)).GetPosition(); KillWeedRpc(position2); moldManager.DestroyMoldAtPosition(position2, true); killingWeed = (batchNum: -1, positionIndex: -1); } else { moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex] = ResizeMatrix(val3, ShroudSprayMultiplier); } } TrySprayingWeedKillerOnLocalPlayer(); } [Rpc(/*Could not decode attribute arguments.*/)] public void KillWeedRpc(Vector3 destroyAtPos) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(52628896u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref destroyAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 52628896u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingWeed = (batchNum: -1, positionIndex: -1); moldManager.DestroyMoldAtPosition(destroyAtPos, true); } } } private void TrySprayingWeedKillerOnLocalPlayer() { //IL_005b: 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) if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI != (Object)null && cadaverGrowthAI.playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId].infected && Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < AffectedDistance) { HealPlayerInfection(cadaverGrowthAI.playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId]); } } private void HealPlayerInfection(PlayerInfection infection) { //IL_0090: 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_0034: 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_0066: 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) PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (infection.burstMeter > 0f) { cadaverGrowthAI.BurstFromPlayer(GameNetworkManager.Instance.localPlayerController, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); cadaverGrowthAI.SyncBurstFromPlayerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); } else { GameNetworkManager.Instance.localPlayerController.DamagePlayer(8, true, true, (CauseOfDeath)5, 0, false, default(Vector3)); cadaverGrowthAI.HealInfection((int)localPlayerController.playerClientId, 0.1f); } } [Rpc(/*Could not decode attribute arguments.*/)] public void KillCadaverPlantRpc(Vector3 destroyAtPos) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2394757228u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref destroyAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2394757228u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); cadaverGrowthAI.DestroyPlantAtPosition(destroyAtPos, true); } } private void DoPlantKillImpulse() { if (!StartOfRound.Instance.inShipPhase) { if (base.isInFactory) { CheckForCadaverPlantsInSprayPath(); } else { CheckForWeedsInSprayPath(); } } } private bool CheckForCadaverPlantsInSprayPath() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_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_0089: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_014d: 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) if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI == (Object)null || ((EnemyAI)cadaverGrowthAI).isEnemyDead) { return false; } Vector3 position = ((Component)this).transform.position; float num = Random.Range(0f, AffectedDistance / 2f); Vector3 val = ((Component)this).transform.position + Random.onUnitSphere * num; NavMeshHit val2 = default(NavMeshHit); if (NavMesh.SamplePosition(val, ref val2, 30f, -1)) { position = ((NavMeshHit)(ref val2)).position; } if (cadaverGrowthAI.GetAllPlantPositionsInRadius(position, AffectedDistance, true)) { float num2 = 2000f; int num3 = 0; int num4 = -1; for (int i = 0; i < cadaverGrowthAI.plantBatchers.Length; i++) { int length = cadaverGrowthAI.moldPositions.GetLength(0); for (int j = 0; j < length && cadaverGrowthAI.moldPositions[j, i] != -1; j++) { if (!cadaverGrowthAI.growingRecentPlant || !(cadaverGrowthAI.plantBatchers[i].batchedPositions[cadaverGrowthAI.moldPositions[j, i]] == cadaverGrowthAI.recentPlantPosition)) { float num5 = Vector3.Distance(position, cadaverGrowthAI.plantBatchers[i].batchedPositions[cadaverGrowthAI.moldPositions[j, i]]); if (num5 < num2) { num2 = num5; num3 = j; num4 = i; } } } } if (num4 == -1) { return false; } killingCadaverPlant = cadaverGrowthAI.plantBatchers[num4].GetWeedPositionInMatrixListForCadaverPlants(cadaverGrowthAI.moldPositions[num3, num4], num4); SyncKillingCadaverPlantRpc(killingCadaverPlant.batchNum, killingCadaverPlant.positionIndex, killingCadaverPlant.plantType); return true; } return false; } private bool CheckForWeedsInSprayPath() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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) if ((Object)(object)moldManager == (Object)null) { moldManager = Object.FindObjectOfType(); } if ((Object)(object)moldManager == (Object)null) { return false; } Vector3 position = ((Component)this).transform.position; float num = Random.Range(0f, AffectedDistance / 2f); Vector3 val = ((Component)this).transform.position + Random.onUnitSphere * num; NavMeshHit val2 = default(NavMeshHit); if (NavMesh.SamplePosition(val, ref val2, 30f, -1)) { position = ((NavMeshHit)(ref val2)).position; } int allMoldPositionsInRadius = moldManager.GetAllMoldPositionsInRadius(position, AffectedDistance, true); if (allMoldPositionsInRadius > 0) { float num2 = 2000f; int num3 = 0; for (int i = 0; i < allMoldPositionsInRadius; i++) { float num4 = Vector3.Distance(position, moldManager.grassInstancer.batchedPositions[moldManager.moldPositions[i]]); if (num4 < num2) { num2 = num4; num3 = i; } } killingWeed = moldManager.grassInstancer.GetWeedPositionInMatrixList(moldManager.moldPositions[num3]); SyncKillingWeedRpc(killingWeed.batchNum, killingWeed.positionIndex); return true; } return false; } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncKillingCadaverPlantRpc(int batchNum, int positionIndex, int plantType) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2267963596u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, batchNum); BytePacker.WriteValueBitPacked(val2, positionIndex); BytePacker.WriteValueBitPacked(val2, plantType); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2267963596u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingCadaverPlant = (batchNum: batchNum, positionIndex: positionIndex, plantType: plantType); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncKillingWeedRpc(int batchNum, int positionIndex) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_00bf: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3099750651u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, batchNum); BytePacker.WriteValueBitPacked(val2, positionIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3099750651u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingWeed = (batchNum: batchNum, positionIndex: positionIndex); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2970992945u, new RpcReceiveHandler(__rpc_handler_2970992945), "SwitchSprinklerServerRpc"); ((NetworkBehaviour)this).__registerRpc(3932007815u, new RpcReceiveHandler(__rpc_handler_3932007815), "SwitchSprinklerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2872219766u, new RpcReceiveHandler(__rpc_handler_2872219766), "FuelEmptyClientRpc"); ((NetworkBehaviour)this).__registerRpc(52628896u, new RpcReceiveHandler(__rpc_handler_52628896), "KillWeedRpc"); ((NetworkBehaviour)this).__registerRpc(2394757228u, new RpcReceiveHandler(__rpc_handler_2394757228), "KillCadaverPlantRpc"); ((NetworkBehaviour)this).__registerRpc(2267963596u, new RpcReceiveHandler(__rpc_handler_2267963596), "SyncKillingCadaverPlantRpc"); ((NetworkBehaviour)this).__registerRpc(3099750651u, new RpcReceiveHandler(__rpc_handler_3099750651), "SyncKillingWeedRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_2970992945(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 forceOff = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref forceOff, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PesticideSprinklerItem)(object)target).SwitchSprinklerServerRpc(forceOff); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3932007815(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; ((PesticideSprinklerItem)(object)target).SwitchSprinklerClientRpc(enable); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2872219766(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; ((PesticideSprinklerItem)(object)target).FuelEmptyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_52628896(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 destroyAtPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((PesticideSprinklerItem)(object)target).KillWeedRpc(destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2394757228(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 destroyAtPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((PesticideSprinklerItem)(object)target).KillCadaverPlantRpc(destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2267963596(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int batchNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref batchNum); int positionIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref positionIndex); int plantType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref plantType); target.__rpc_exec_stage = (__RpcExecStage)1; ((PesticideSprinklerItem)(object)target).SyncKillingCadaverPlantRpc(batchNum, positionIndex, plantType); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3099750651(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int batchNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref batchNum); int positionIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref positionIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((PesticideSprinklerItem)(object)target).SyncKillingWeedRpc(batchNum, positionIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PesticideSprinklerItem"; } } internal class PlushieItem : GrabbableObject { public AudioSource noiseAudio; public AudioSource noiseAudioFar; [Space(3f)] public AudioClip[] noiseSFX; public AudioClip[] noiseSFXFar; [Space(3f)] public float noiseRange; public float maxLoudness; public float minLoudness; public float minPitch; public float maxPitch; private Random noisemakerRandom; public Animator triggerAnimator; [Header("Plushie stuff")] public List Personalities; public List IdleAnimationStrings; private int Personality = -1; private float IdleAnimationTime; public float IdleAnimationTimer = 12f; public override void Start() { ((GrabbableObject)this).Start(); noisemakerRandom = new Random(StartOfRound.Instance.randomMapSeed + 85); } public override void Update() { ((GrabbableObject)this).Update(); if (base.isHeld && !triggerAnimator.GetBool("held")) { triggerAnimator.SetBool("held", true); } else if (!base.isHeld && triggerAnimator.GetBool("held")) { triggerAnimator.SetBool("held", false); } if (((NetworkBehaviour)this).IsServer && !base.isHeld) { if (IdleAnimationTime < IdleAnimationTimer) { IdleAnimationTime += Time.deltaTime; return; } IdleAnimationTime = 0f; PlayIdleAnimation(); } } private void PlayIdleAnimation() { string text = ""; int index = Random.Range(0, IdleAnimationStrings.Count); text = IdleAnimationStrings[index]; PlayIdleAnimationClientRpc(text); } [ClientRpc] private void PlayIdleAnimationClientRpc(string animationString) { //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(27893783u, val2, (RpcDelivery)0); bool flag = animationString != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(animationString, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 27893783u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; triggerAnimator.SetTrigger(animationString); } } public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (((NetworkBehaviour)this).IsServer) { if (Personality == -1) { UpdatePersonalityClientRpc(Personality = Random.Range(0, Personalities.Count)); } } else { UpdatePersonalityServerRpc(); } } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); } [ServerRpc(RequireOwnership = false)] private void UpdatePersonalityServerRpc() { //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(1994967715u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1994967715u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (Personality != -1) { UpdatePersonalityClientRpc(Personality); } } } [ClientRpc] private void UpdatePersonalityClientRpc(int personality) { //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(2487601845u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, personality); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2487601845u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Personality = personality; triggerAnimator.SetInteger("personality", personality); } } } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_0131: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null)) { int num = noisemakerRandom.Next(0, noiseSFX.Length); float num2 = (float)noisemakerRandom.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f; float pitch = (float)noisemakerRandom.Next((int)(minPitch * 100f), (int)(maxPitch * 100f)) / 100f; noiseAudio.pitch = pitch; noiseAudio.PlayOneShot(noiseSFX[num], num2); if ((Object)(object)noiseAudioFar != (Object)null) { noiseAudioFar.pitch = pitch; noiseAudioFar.PlayOneShot(noiseSFXFar[num], num2); } if ((Object)(object)triggerAnimator != (Object)null) { triggerAnimator.SetTrigger("playAnim"); } WalkieTalkie.TransmitOneShotAudio(noiseAudio, noiseSFX[num], num2); RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num2, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); if (minLoudness >= 0.6f && (Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.timeSinceMakingLoudNoise = 0f; } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(27893783u, new RpcReceiveHandler(__rpc_handler_27893783), "PlayIdleAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(1994967715u, new RpcReceiveHandler(__rpc_handler_1994967715), "UpdatePersonalityServerRpc"); ((NetworkBehaviour)this).__registerRpc(2487601845u, new RpcReceiveHandler(__rpc_handler_2487601845), "UpdatePersonalityClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_27893783(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 animationString = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationString, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((PlushieItem)(object)target).PlayIdleAnimationClientRpc(animationString); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1994967715(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; ((PlushieItem)(object)target).UpdatePersonalityServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2487601845(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 personality = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref personality); target.__rpc_exec_stage = (__RpcExecStage)1; ((PlushieItem)(object)target).UpdatePersonalityClientRpc(personality); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PlushieItem"; } } internal class StimItem : GrabbableObject { public int UsesSync = 2; public int Uses = 2; public AudioSource StimSfx; public AudioClip StimClip; public bool HealthStim; public override void Start() { ((GrabbableObject)this).Start(); SyncUsesServerRpc(remove: false); } private void OnEnable() { } private void OnDisable() { } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); SetTooltip(); } public override void GrabItem() { ((GrabbableObject)this).GrabItem(); SetTooltip(); } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (Uses > 0) { UseStim(); } } private void UseStim() { SyncUsesServerRpc(remove: true); if (HealthStim) { for (int i = 0; i < 75; i++) { if (base.playerHeldBy.health < 125) { PlayerControllerB playerHeldBy = base.playerHeldBy; playerHeldBy.health++; } } } else { base.playerHeldBy.drunknessInertia = 18f; ((MonoBehaviour)this).StartCoroutine(DrunkenNessSpeedCoroutine()); base.playerHeldBy.increasingDrunknessThisFrame = true; base.playerHeldBy.sprintMeter = 2f; } if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)base.playerHeldBy) { HUDManager.Instance.flashFilter = 0.5f; } } private void SetTooltip() { if (!((Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)(object)base.playerHeldBy)) { string text = "Uses"; text = ((Uses > 0) ? $"{Uses} uses left" : "No uses left"); HUDManager.Instance.ChangeControlTip(2, text, false); } } private IEnumerator DrunkenNessSpeedCoroutine() { base.playerHeldBy.drunknessSpeed = 8f; yield return (object)new WaitForSeconds(0.3f); base.playerHeldBy.drunknessSpeed = 0.4f; } [ServerRpc(RequireOwnership = false)] private void SyncUsesServerRpc(bool remove) { //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.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1346136982u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref remove, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1346136982u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (remove) { UsesSync--; } SyncUsesClientRpc(UsesSync, remove); } } [ClientRpc] private void SyncUsesClientRpc(int uses, bool remove) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(794697975u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, uses); ((FastBufferWriter)(ref val)).WriteValueSafe(ref remove, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 794697975u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Uses = uses; if (remove) { SetTooltip(); StimSfx.PlayOneShot(StimClip); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1346136982u, new RpcReceiveHandler(__rpc_handler_1346136982), "SyncUsesServerRpc"); ((NetworkBehaviour)this).__registerRpc(794697975u, new RpcReceiveHandler(__rpc_handler_794697975), "SyncUsesClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_1346136982(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 remove = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref remove, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((StimItem)(object)target).SyncUsesServerRpc(remove); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_794697975(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int uses = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref uses); bool remove = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref remove, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((StimItem)(object)target).SyncUsesClientRpc(uses, remove); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "StimItem"; } } internal class TriangulationDeviceItem : GrabbableObject { private bool Searching; private bool TriangulationSpotFound; public TriangulationSpot Spot; private Vector3 SpotLocation; public AudioSource TriangulationSfx; public AudioClip TriangulationSfxClip; public MeshRenderer LampRenderer; public Material LedMaterialOn; public Material LedMaterialOff; public float SearchTimerMin = 0.2f; public float SearchTimerMultiplier = 4f; public AnimationCurve BeepSpeedCurve; private float BeepTime; public override void GrabItem() { ((GrabbableObject)this).GrabItem(); StartSearchingWithDevice(value: true); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); StartSearchingWithDevice(value: true); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); StartSearchingWithDevice(value: false); } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); StartSearchingWithDevice(value: false); } public override void Update() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (Searching && TriangulationSpotFound && (Object)(object)Spot != (Object)null && !Spot.IsOccupied) { float num = Vector3.Distance(((Component)this).transform.position, SpotLocation); float num2 = SearchTimerMin * (num / SearchTimerMultiplier); if (BeepTime < num2) { BeepTime += Time.deltaTime; return; } ((MonoBehaviour)this).StartCoroutine(DistanceBeepCoroutine()); BeepTime = 0f; } } private void StartSearchingWithDevice(bool value) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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) Searching = value; if (value) { if ((Object)(object)Spot == (Object)null && Object.op_Implicit((Object)(object)Object.FindAnyObjectByType())) { Spot = Object.FindAnyObjectByType(); } if ((Object)(object)Spot != (Object)null) { SpotLocation = ((Component)Spot).transform.position; TriangulationSpotFound = true; } } else { Spot = null; SpotLocation = Vector3.zero; Searching = false; TriangulationSpotFound = false; } } private IEnumerator DistanceBeepCoroutine() { ((Renderer)LampRenderer).material = LedMaterialOn; TriangulationSfx.PlayOneShot(TriangulationSfxClip); yield return (object)new WaitForSeconds(0.1f); ((Renderer)LampRenderer).material = LedMaterialOff; } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "TriangulationDeviceItem"; } } } namespace WesleysInteriorTools.Features { internal class ActionFigure { public int Health = 0; public bool Dead = false; } internal class Move { public int Id; public string Name; public int Weight; public int MaxPlayed; public int CurrentlyPlayed; public string TriggerDisplayText; public string FigureAnimationTrigger; public float MoveHealthDisplayTime; public Texture2D CardImage; public Move(int id, string name, int weight, int maxPlayed, string triggerDisplayText, string figureAnimationTrigger, float moveHealthDisplayTime, Texture2D cardImage) { Id = id; Name = name; Weight = weight; MaxPlayed = maxPlayed; TriggerDisplayText = triggerDisplayText; FigureAnimationTrigger = figureAnimationTrigger; MoveHealthDisplayTime = moveHealthDisplayTime; CardImage = cardImage; } } internal class ActionFigureBoard : NetworkBehaviour { public NetworkObject NetworkObject; [Header("Board figure placement")] [SerializeField] private Transform FigurePositionA; [SerializeField] private Transform FigurePositionB; private ActionFigureItem FigureItemA; private ActionFigureItem FigureItemB; [SerializeField] private InteractTrigger ActionfigurePlaceTriggerA; [SerializeField] private InteractTrigger ActionfigurePlaceTriggerB; [SerializeField] private ActionFigure FigureA; [SerializeField] private ActionFigure FigureB; [Header("Board game management")] [SerializeField] private InteractTrigger GameStartTrigger; [SerializeField] private List MoveTriggersA; [SerializeField] private List MoveTriggersB; [SerializeField] private List StealTriggersA; [SerializeField] private List StealTriggersB; [Header("Board game visuals")] [SerializeField] private List AttackCardTextures; [SerializeField] private Texture2D AttackDefaultCardTexture; [SerializeField] private Texture2D AttackBlindedTexture; [SerializeField] private Transform CardStackTransform; [SerializeField] private List CardsA; [SerializeField] private List CardsRevealA; [SerializeField] private List CardTransformsA; [SerializeField] private List CardsB; [SerializeField] private List CardsRevealB; [SerializeField] private List CardTransformsB; [SerializeField] private List RenderersA; [SerializeField] private List CardRevealRenderersA; [SerializeField] private List RenderersB; [SerializeField] private List CardRevealRenderersB; [SerializeField] private List HealthTokenTransformsA; [SerializeField] private List HealthTokenTransformsB; [SerializeField] private Transform DefenseTokenTransformA; [SerializeField] private Transform DefenseTokenTransformB; [SerializeField] private Transform PowerTokenTransformA; [SerializeField] private Transform PowerTokenTransformB; [SerializeField] private Transform VisionTokenTransformA; [SerializeField] private Transform VisionTokenTransformB; [SerializeField] private AnimationCurve CardMoveCurve; [SerializeField] private Light CardStealLightA; [SerializeField] private Light CardStealLightB; [SerializeField] private AudioSource TableSfx; [SerializeField] private AudioSource TableMusicSfx; [SerializeField] private List TableMusicTracks; private int CurrentTrack; [SerializeField] private AudioSource RadioSfx; [SerializeField] private AudioClip CardSlideClip; [SerializeField] private AudioClip CardFlipClip; [SerializeField] private AudioClip CardRevealClip; [SerializeField] private AudioClip CardStealLightClipOn; [SerializeField] private AudioClip CardStealLightClipOff; [SerializeField] private AudioClip ToxicRoundClip; [SerializeField] private AudioClip BattleStartClip; [SerializeField] private AudioClip BattleEndClip; private PlayerControllerB PlayerA; private PlayerControllerB PlayerB; private List Moves = new List(); private bool InBattle = false; private float BattleEndCountdown = 0f; private int roundCounter = 0; private int ChosenMoveA = 0; private int ChosenCardA = 0; private int ChosenStealMoveA = 0; private int ChosenStealCardA = 0; private int ChosenMoveB = 0; private int ChosenCardB = 0; private int ChosenStealMoveB = 0; private int ChosenStealCardB = 0; private float CalculateTimer = 0f; private bool CalculateImpulse = false; private int LocalPlayerAid = 0; private int LocalPlayerBid = 0; private int[] PlayerMovesA = new int[4] { -1, -1, -1, -1 }; private int[] PlayerMovesB = new int[4] { -1, -1, -1, -1 }; private float JustPlacedTimer = 0f; private int AdditionalDamageA = 0; private int AdditionalDamageB = 0; private int ExtraDefenceRoundCounterA = 0; private int ExtraDefenceRoundCounterB = 0; private int ViewCardsRoundCounterA = 0; private int ViewCardsRoundCounterB = 0; private int BlindedRoundsCounterA = 0; private int BlindedRoundsCounterB = 0; private bool ToxicRound = false; private int CardResetRoundCounter = 0; private bool CardStealSequenceA = false; private bool CardStealSequenceB = false; private bool RemoveCardsImpulse = false; private int PreviousHealthA = 0; private int PreviousHealthB = 0; private bool Synced = false; private bool FigureASynced = false; private bool FigureBSynced = false; private bool CanStartGame = true; private float StartCooldown = 0f; private void Awake() { GameStartTrigger.interactable = false; SetMoveInteracts(value: false, 2); SetStealInteracts(value: false, 0); SetStealInteracts(value: false, 1); DisplayCurrentHealth(0, 0, 0); DisplayCurrentHealth(0, 0, 1); HideAllSpecialTokens(); ((MonoBehaviour)this).StartCoroutine(RevealCardsCoroutine(0, hide: true)); ((MonoBehaviour)this).StartCoroutine(RevealCardsCoroutine(1, hide: true)); Moves.Add(new Move(0, "attack", 40, 50, "Play Punch : [E]", "BattleAttack", 2f, AttackCardTextures[0])); Moves.Add(new Move(1, "Block", 40, 50, "Play Block : [E]", "BattleBlock", 2f, AttackCardTextures[1])); Moves.Add(new Move(2, "Blast", 10, 50, "Play Blast : [E]", "BattleBlast", 2f, AttackCardTextures[2])); Moves.Add(new Move(3, "Power", 5, 5, "Play Power : [E]", "BattlePower", 2f, AttackCardTextures[3])); Moves.Add(new Move(4, "Snatch", 8, 5, "Play Steal : [E]", "BattleSnatch", 2f, AttackCardTextures[4])); Moves.Add(new Move(5, "Heal", 4, 3, "Play Heal : [E]", "BattleHeal", 2f, AttackCardTextures[5])); Moves.Add(new Move(6, "Clear", 3, 2, "Play Clear : [E]", "BattleClear", 2f, AttackCardTextures[6])); Moves.Add(new Move(7, "Nuke", 2, 1, "Play Explode : [E]", "BattleNuke", 2.5f, AttackCardTextures[7])); Moves.Add(new Move(8, "Defend", 5, 2, "Play Defense : [E]", "BattleDefend", 2f, AttackCardTextures[8])); Moves.Add(new Move(9, "Vision", 8, 2, "Play Vision : [E]", "BattleVision", 2f, AttackCardTextures[9])); Moves.Add(new Move(10, "SuperHeal", 1, 1, "Play Super Heal : [E]", "BattleSuperHeal", 2f, AttackCardTextures[10])); Moves.Add(new Move(11, "Blind", 5, 2, "Play Blind : [E]", "BattleBlind", 2f, AttackCardTextures[11])); } [ServerRpc(RequireOwnership = false)] private void CheckSyncServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2156591399u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2156591399u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ulong objectIdA = 0uL; ulong objectIdB = 0uL; if ((Object)(object)FigureItemA != (Object)null) { objectIdA = ((NetworkBehaviour)FigureItemA).NetworkObject.NetworkObjectId; } if ((Object)(object)FigureItemB != (Object)null) { objectIdB = ((NetworkBehaviour)FigureItemB).NetworkObject.NetworkObjectId; } SetValuesOnClientRpc(objectIdA, objectIdB, InBattle, CurrentTrack); } } private void Update() { if (!Synced && NetworkObject.IsSpawned && StartOfRound.Instance.localClientHasControl) { CheckSyncServerRpc(); } if (JustPlacedTimer > 0f) { JustPlacedTimer -= Time.deltaTime; return; } if ((Object)(object)FigureItemA != (Object)null && (Object)(object)((Component)FigureItemA).GetComponentInParent() == (Object)null) { FigureItemA = null; FigureA = null; GameStartTrigger.interactable = false; ActionfigurePlaceTriggerA.interactable = true; } if ((Object)(object)FigureItemB != (Object)null && (Object)(object)((Component)FigureItemB).GetComponentInParent() == (Object)null) { FigureItemB = null; FigureB = null; GameStartTrigger.interactable = false; ActionfigurePlaceTriggerB.interactable = true; } if (CalculateImpulse) { if (CalculateTimer > 0f) { CalculateTimer -= Time.deltaTime; } else { RemoveCardsFromTableClientRpc(ChosenCardA, ChosenCardB); CalculateMoves(); CalculateImpulse = false; } } if (!((NetworkBehaviour)this).IsServer) { return; } if (InBattle) { if (PlayerA.isPlayerDead) { PreviousHealthA = FigureA.Health; PreviousHealthB = FigureB.Health; DisplayMovesClientRpc(figureADead: true, figureBDead: false, -2, -2, 0, 0, PreviousHealthA, PreviousHealthB); EndGameServerRpc(1); } if (PlayerB.isPlayerDead) { PreviousHealthA = FigureA.Health; PreviousHealthB = FigureB.Health; DisplayMovesClientRpc(figureADead: false, figureBDead: true, -2, -2, 0, 0, PreviousHealthA, PreviousHealthB); EndGameServerRpc(2); } } if (!CanStartGame) { if (StartCooldown > 0f) { StartCooldown -= Time.deltaTime; } else { CanStartGame = true; } } if (BattleEndCountdown > 0f) { BattleEndCountdown -= Time.deltaTime; } else if (InBattle) { PreviousHealthA = FigureA.Health; PreviousHealthB = FigureB.Health; DisplayMovesClientRpc(figureADead: true, figureBDead: true, -2, -2, 0, 0, PreviousHealthA, PreviousHealthB); EndGameServerRpc(0); } } [ClientRpc] private void SetValuesOnClientRpc(ulong objectIdA, ulong objectIdB, bool inBattle, int track) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(132064951u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, objectIdA); BytePacker.WriteValueBitPacked(val, objectIdB); ((FastBufferWriter)(ref val)).WriteValueSafe(ref inBattle, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, track); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 132064951u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (objectIdA != 0L && ((NetworkBehaviour)this).NetworkManager.SpawnManager.SpawnedObjects.TryGetValue(objectIdA, out var value)) { ActionFigureItem component = ((Component)value).GetComponent(); if ((Object)(object)component != (Object)null) { FigureItemA = component; } } if (objectIdB != 0L && ((NetworkBehaviour)this).NetworkManager.SpawnManager.SpawnedObjects.TryGetValue(objectIdB, out var value2)) { ActionFigureItem component2 = ((Component)value2).GetComponent(); if ((Object)(object)component2 != (Object)null) { FigureItemB = component2; } } if ((Object)(object)FigureItemA != (Object)null) { FigureItemA.GrabbableObject.floorYRot = 180; ((Component)FigureItemA).gameObject.transform.eulerAngles = ((Component)FigurePositionA).transform.eulerAngles; ((Component)FigureItemA).gameObject.transform.position = ((Component)FigurePositionA).transform.position; } if ((Object)(object)FigureItemB != (Object)null) { FigureItemB.GrabbableObject.floorYRot = 0; ((Component)FigureItemB).gameObject.transform.eulerAngles = ((Component)FigurePositionB).transform.eulerAngles; ((Component)FigureItemB).gameObject.transform.position = ((Component)FigurePositionB).transform.position; } if (!inBattle) { return; } AnimatorStateInfo currentAnimatorStateInfo; if ((Object)(object)FigureItemA != (Object)null && !FigureASynced) { currentAnimatorStateInfo = FigureItemA.Animator.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("NoAnim")) { FigureItemA.Animator.SetTrigger("BattleStart"); } FigureASynced = true; ((MonoBehaviour)this).StartCoroutine(SwitchBattleMusic(enable: true, startSound: false, victorySound: false, track)); DisplayCurrentHealth(4, 0, 0); DisplayCurrentHealth(4, 0, 1); SetBoardInteractables(end: false); ActionfigurePlaceTriggerA.interactable = false; ActionfigurePlaceTriggerB.interactable = false; } if ((Object)(object)FigureItemB != (Object)null && !FigureBSynced) { currentAnimatorStateInfo = FigureItemB.Animator.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("NoAnim")) { FigureItemB.Animator.SetTrigger("BattleStart"); } FigureBSynced = true; ActionfigurePlaceTriggerA.interactable = false; ActionfigurePlaceTriggerB.interactable = false; } GameStartTrigger.interactable = false; if ((Object)(object)FigureItemB != (Object)null && (Object)(object)FigureItemA != (Object)null) { FigureItemA.GrabbableObject.grabbable = false; ((Collider)FigureItemA.Collider).enabled = false; FigureItemB.GrabbableObject.grabbable = false; ((Collider)FigureItemB.Collider).enabled = false; } } public void PlaceActionFigureA(PlayerControllerB player) { if (player.isHoldingObject && !player.isGrabbingObjectAnimation && (Object)(object)player.currentlyHeldObjectServer != (Object)null) { PlaceActionFigureServerRpc(((NetworkBehaviour)player.currentlyHeldObjectServer).NetworkObjectId, (int)player.playerClientId, 0); } } public void PlaceActionFigureB(PlayerControllerB player) { if (player.isHoldingObject && !player.isGrabbingObjectAnimation && (Object)(object)player.currentlyHeldObjectServer != (Object)null) { PlaceActionFigureServerRpc(((NetworkBehaviour)player.currentlyHeldObjectServer).NetworkObjectId, (int)player.playerClientId, 1); } } [ServerRpc(RequireOwnership = false)] public void PlaceActionFigureServerRpc(ulong objectId, int player, int figureId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2062153304u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, objectId); BytePacker.WriteValueBitPacked(val, player); BytePacker.WriteValueBitPacked(val, figureId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2062153304u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (figureId == 0) { LocalPlayerAid = player; } else { LocalPlayerBid = player; } if (!NetworkObject.IsSpawned || !((NetworkBehaviour)this).NetworkManager.SpawnManager.SpawnedObjects.TryGetValue(objectId, out var value)) { return; } ActionFigureItem component = ((Component)value).GetComponent(); if (!((Object)(object)component == (Object)null)) { JustPlacedTimer = 0.5f; if (figureId == 0) { FigureItemA = component; } else { FigureItemB = component; } PlaceActionFigureClientRpc(objectId, player, figureId); } } [ClientRpc] public void PlaceActionFigureClientRpc(ulong objectId, int player, int figureId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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_01c9: 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_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3197825868u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, objectId); BytePacker.WriteValueBitPacked(val, player); BytePacker.WriteValueBitPacked(val, figureId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3197825868u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (figureId == 0) { LocalPlayerAid = player; } else { LocalPlayerBid = player; } if (!((NetworkBehaviour)this).NetworkManager.SpawnManager.SpawnedObjects.TryGetValue(objectId, out var value)) { return; } ActionFigureItem component = ((Component)value).GetComponent(); if ((Object)(object)component == (Object)null) { return; } JustPlacedTimer = 0.5f; Vector3 zero = Vector3.zero; if (figureId == 0) { zero = FigurePositionA.localPosition; component.GrabbableObject.floorYRot = 180; ((Component)component).gameObject.transform.eulerAngles = Vector3.zero; FigureItemA = component; } else { zero = FigurePositionB.localPosition; component.GrabbableObject.floorYRot = 0; ((Component)component).gameObject.transform.eulerAngles = Vector3.zero; FigureItemB = component; } CheckFigureItems(); if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId == player) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (localPlayerController.isHoldingObject && !localPlayerController.isGrabbingObjectAnimation && !((Object)(object)localPlayerController.currentlyHeldObjectServer == (Object)null)) { localPlayerController.DiscardHeldObject(true, NetworkObject, zero, false); } } } private void CheckFigureItems() { if ((Object)(object)FigureItemA != (Object)null && (Object)(object)FigureItemB != (Object)null) { GameStartTrigger.interactable = true; ActionfigurePlaceTriggerA.interactable = false; ActionfigurePlaceTriggerB.interactable = false; } } public void StartGame() { StartGameServerRpc(); } private void SetBoardInteractables(bool end) { if ((Object)(object)FigureItemA != (Object)null) { FigureItemA.GrabbableObject.grabbable = end; ((Collider)FigureItemA.Collider).enabled = end; } if ((Object)(object)FigureItemB != (Object)null) { FigureItemB.GrabbableObject.grabbable = end; ((Collider)FigureItemB.Collider).enabled = end; } GameStartTrigger.interactable = end; } private void SetMoveInteracts(bool value, int player) { if (player == 0 || player == 2) { foreach (InteractTrigger item in MoveTriggersA) { item.interactable = value; } } if (player != 1 && player != 2) { return; } foreach (InteractTrigger item2 in MoveTriggersB) { item2.interactable = value; } } private void SetStealInteracts(bool value, int player) { if (player == 0) { foreach (InteractTrigger item in StealTriggersA) { item.interactable = value; } } if (player != 1) { return; } foreach (InteractTrigger item2 in StealTriggersB) { item2.interactable = value; } } [ServerRpc(RequireOwnership = false)] private void StartGameServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3090219821u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3090219821u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!CanStartGame) { return; } PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val3 in allPlayerScripts) { if ((int)val3.playerClientId == LocalPlayerAid) { PlayerA = val3; } if ((int)val3.playerClientId == LocalPlayerBid) { PlayerB = val3; } } if (!PlayerA.isPlayerDead && !PlayerB.isPlayerDead) { CheckSyncServerRpc(); if ((Object)(object)FigureItemA == (Object)null || (Object)(object)FigureItemB == (Object)null) { EndGameServerRpc(0); return; } BattleEndCountdown = 240f; roundCounter = 0; InBattle = true; int[] playerMovesA = new int[4] { -1, -1, -1, -1 }; int[] playerMovesB = new int[4] { -1, -1, -1, -1 }; PlayerMovesA = playerMovesA; PlayerMovesB = playerMovesB; ActionFigure actionFigure = new ActionFigure(); ActionFigure actionFigure2 = new ActionFigure(); actionFigure.Health = FigureItemA.Health; actionFigure.Dead = false; FigureA = actionFigure; actionFigure2.Health = FigureItemB.Health; actionFigure2.Dead = false; FigureB = actionFigure2; AdditionalDamageA = 0; AdditionalDamageB = 0; CardStealSequenceA = false; CardStealSequenceB = false; BlindedRoundsCounterA = 0; BlindedRoundsCounterB = 0; ChosenStealCardA = -1; ChosenStealCardB = -1; ChosenStealMoveA = -1; ChosenStealMoveB = -1; ResetCardCaps(); CurrentTrack = Random.Range(0, TableMusicTracks.Count); StartGameClientRpc(FigureA.Health, FigureB.Health, CurrentTrack); NextRound(); } } [ClientRpc] private void StartGameClientRpc(int healthA, int healthB, int track) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4041070572u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, healthA); BytePacker.WriteValueBitPacked(val, healthB); BytePacker.WriteValueBitPacked(val, track); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4041070572u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(SwitchBattleMusic(enable: true, startSound: true, victorySound: false, track)); DisplayCurrentHealth(healthA, 0, 0); DisplayCurrentHealth(healthB, 0, 1); SetBoardInteractables(end: false); FigureItemA.Animator.SetTrigger("BattleStart"); FigureItemB.Animator.SetTrigger("BattleStart"); } } } private void NextRound() { NextRoundServerRpc(); } [ServerRpc] private void NextRoundServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2687894620u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2687894620u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)FigureItemA == (Object)null || (Object)(object)FigureItemB == (Object)null) { EndGameServerRpc(0); return; } roundCounter++; CardResetRoundCounter++; BattleEndCountdown = 240f; if (CardResetRoundCounter > 8) { CardResetRoundCounter = 0; ResetCardCaps(); } if (roundCounter > 15) { ToxicRound = true; } if (ExtraDefenceRoundCounterA > 0) { ExtraDefenceRoundCounterA--; } if (ExtraDefenceRoundCounterB > 0) { ExtraDefenceRoundCounterB--; } if (ViewCardsRoundCounterA > 0) { ViewCardsRoundCounterA--; } if (ViewCardsRoundCounterB > 0) { ViewCardsRoundCounterB--; } if (BlindedRoundsCounterA > 0) { BlindedRoundsCounterA--; } if (BlindedRoundsCounterB > 0) { BlindedRoundsCounterB--; } ChosenMoveA = -1; ChosenMoveB = -1; int[] array = new int[4]; int[] array2 = new int[4]; for (int i = 0; i < PlayerMovesA.Length; i++) { if (PlayerMovesA[i] == -1) { if (ChosenStealCardA == i && ChosenStealMoveA != -1) { PlayerMovesA[i] = ChosenStealMoveA; } else { PlayerMovesA[i] = ChooseWeightedCard(); } array[i] = -1; } } for (int j = 0; j < PlayerMovesB.Length; j++) { if (PlayerMovesB[j] == -1) { if (ChosenStealCardB == j && ChosenStealMoveB != -1) { PlayerMovesB[j] = ChosenStealMoveB; } else { PlayerMovesB[j] = ChooseWeightedCard(); } array2[j] = -1; } } ChosenStealCardA = -1; ChosenStealCardB = -1; ChosenStealMoveA = -1; ChosenStealMoveB = -1; NextRoundClientRpc(array, array2, PlayerMovesA, PlayerMovesB, ExtraDefenceRoundCounterA, ExtraDefenceRoundCounterB, ViewCardsRoundCounterA, ViewCardsRoundCounterB, AdditionalDamageA, AdditionalDamageB, BlindedRoundsCounterA, BlindedRoundsCounterB); } private int ChooseWeightedCard() { int num = 0; int num2 = 0; bool flag = false; foreach (Move move in Moves) { num2 += move.Weight; } while (!flag) { int num3 = Random.Range(0, num2); for (int i = 0; i < Moves.Count; i++) { num += Moves[i].Weight; if (num3 < num && Moves[i].CurrentlyPlayed < Moves[i].MaxPlayed) { Moves[i].CurrentlyPlayed++; return i; } } } return 0; } private void ResetCardCaps() { foreach (Move move in Moves) { move.CurrentlyPlayed = 0; } } [ClientRpc] private void NextRoundClientRpc(int[] animateCardsA, int[] animateCardsB, int[] playerMovesA, int[] playerMovesB, int defenseA, int defenseB, int viewA, int viewB, int addDamageA, int addDamageB, int blindedA, int blindedB) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (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_0255: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0169: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: 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_01c4: 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_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0210: 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_0193: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3745262902u, val2, (RpcDelivery)0); bool flag = animateCardsA != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(animateCardsA, default(ForPrimitives)); } bool flag2 = animateCardsB != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val)).WriteValueSafe(animateCardsB, default(ForPrimitives)); } bool flag3 = playerMovesA != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag3, default(ForPrimitives)); if (flag3) { ((FastBufferWriter)(ref val)).WriteValueSafe(playerMovesA, default(ForPrimitives)); } bool flag4 = playerMovesB != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag4, default(ForPrimitives)); if (flag4) { ((FastBufferWriter)(ref val)).WriteValueSafe(playerMovesB, default(ForPrimitives)); } BytePacker.WriteValueBitPacked(val, defenseA); BytePacker.WriteValueBitPacked(val, defenseB); BytePacker.WriteValueBitPacked(val, viewA); BytePacker.WriteValueBitPacked(val, viewB); BytePacker.WriteValueBitPacked(val, addDamageA); BytePacker.WriteValueBitPacked(val, addDamageB); BytePacker.WriteValueBitPacked(val, blindedA); BytePacker.WriteValueBitPacked(val, blindedB); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3745262902u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; bool flag5 = LocalPlayerAid == LocalPlayerBid; bool flag6 = false; bool flag7 = false; bool flag8 = blindedA > 0; bool flag9 = blindedB > 0; if (!flag5) { flag6 = LocalPlayerAid == (int)GameNetworkManager.Instance.localPlayerController.playerClientId; flag7 = LocalPlayerBid == (int)GameNetworkManager.Instance.localPlayerController.playerClientId; if (!flag7 && flag6) { SetMoveInteracts(value: true, 0); } if (!flag6 && flag7) { SetMoveInteracts(value: true, 1); } } else if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId == LocalPlayerAid) { flag6 = false; flag7 = false; SetMoveInteracts(value: true, 0); SetMoveInteracts(value: true, 1); } for (int i = 0; i < PlayerMovesA.Length; i++) { if (animateCardsA[i] == -1) { if (!flag7) { MoveTriggersA[i].hoverTip = Moves[playerMovesA[i]].TriggerDisplayText; ((Renderer)RenderersA[i]).material.SetTexture("_UnlitColorMap", (Texture)(object)Moves[playerMovesA[i]].CardImage); } else { ((Renderer)RenderersA[i]).material.SetTexture("_UnlitColorMap", (Texture)(object)AttackDefaultCardTexture); } } if (flag6 && blindedA > 0) { ((Renderer)CardRevealRenderersB[i]).material.SetTexture("_UnlitColorMap", (Texture)(object)AttackBlindedTexture); } else { ((Renderer)CardRevealRenderersB[i]).material.SetTexture("_UnlitColorMap", (Texture)(object)Moves[playerMovesA[i]].CardImage); } if (flag8) { ((Renderer)RenderersA[i]).material.SetTexture("_UnlitColorMap", (Texture)(object)AttackBlindedTexture); if (!flag7) { MoveTriggersA[i].hoverTip = "Play ??? : [E]"; } } } for (int j = 0; j < PlayerMovesB.Length; j++) { if (animateCardsB[j] == -1) { if (!flag6) { MoveTriggersB[j].hoverTip = Moves[playerMovesB[j]].TriggerDisplayText; ((Renderer)RenderersB[j]).material.SetTexture("_UnlitColorMap", (Texture)(object)Moves[playerMovesB[j]].CardImage); } else { ((Renderer)RenderersB[j]).material.SetTexture("_UnlitColorMap", (Texture)(object)AttackDefaultCardTexture); } } if (flag7 && blindedB > 0) { ((Renderer)CardRevealRenderersA[j]).material.SetTexture("_UnlitColorMap", (Texture)(object)AttackBlindedTexture); } else { ((Renderer)CardRevealRenderersA[j]).material.SetTexture("_UnlitColorMap", (Texture)(object)Moves[playerMovesB[j]].CardImage); } if (flag9) { ((Renderer)RenderersB[j]).material.SetTexture("_UnlitColorMap", (Texture)(object)AttackBlindedTexture); if (!flag6) { MoveTriggersB[j].hoverTip = "Play ??? : [E]"; } } } ((MonoBehaviour)this).StartCoroutine(CardMoveCoroutine(animateCardsA, 0.3f, 0, flip: false, vanish: false)); ((MonoBehaviour)this).StartCoroutine(CardMoveCoroutine(animateCardsB, 0.3f, 1, flip: false, vanish: false)); CheckExtraStatTokens(defenseA, defenseB, viewA, viewB, addDamageA, addDamageB); } private void CheckExtraStatTokens(int defenseA, int defenseB, int viewA, int viewB, int addDamageA, int addDamageB) { bool reveal = addDamageA > 0; bool reveal2 = addDamageB > 0; bool reveal3 = viewA > 0; bool reveal4 = viewB > 0; bool reveal5 = defenseA > 0; bool reveal6 = defenseB > 0; ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(PowerTokenTransformA, reveal)); ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(PowerTokenTransformB, reveal2)); ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(VisionTokenTransformA, reveal3)); ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(VisionTokenTransformB, reveal4)); ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(DefenseTokenTransformA, reveal5)); ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(DefenseTokenTransformB, reveal6)); } public void PickMoveA(int interactId) { SetMoveInteracts(value: false, 0); SetMoveServerRpc(0, interactId); } public void PickMoveB(int interactId) { SetMoveInteracts(value: false, 1); SetMoveServerRpc(1, interactId); } [ServerRpc(RequireOwnership = false)] private void SetMoveServerRpc(int player, int interactId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(124649833u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, player); BytePacker.WriteValueBitPacked(val, interactId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 124649833u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int[] array = new int[4]; for (int i = 0; i < array.Length; i++) { array[i] = 0; } array[interactId] = -1; if (player == 0) { ChosenMoveA = PlayerMovesA[interactId]; ChosenCardA = interactId; PlayerMovesA[interactId] = -1; ChosenStealCardA = interactId; RemoveMoveVisualsClientRpc(player, array, vanish: false, stealLightsOff: false); } else { ChosenMoveB = PlayerMovesB[interactId]; ChosenCardB = interactId; PlayerMovesB[interactId] = -1; ChosenStealCardB = interactId; RemoveMoveVisualsClientRpc(player, array, vanish: false, stealLightsOff: false); } if (ChosenMoveA != -1 && ChosenMoveB != -1) { CalculateImpulse = true; CalculateTimer = 1f; } } } [ClientRpc] private void RemoveAllCardsFromTableClientRpc(int lengthA, int lengthB) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(218626833u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, lengthA); BytePacker.WriteValueBitPacked(val, lengthB); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 218626833u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int[] array = new int[4]; for (int i = 0; i < array.Length; i++) { array[i] = -1; } ((MonoBehaviour)this).StartCoroutine(CardMoveCoroutine(array, 0.2f, 0, flip: true, vanish: true)); ((MonoBehaviour)this).StartCoroutine(CardMoveCoroutine(array, 0.2f, 1, flip: true, vanish: true)); } } [ClientRpc] private void RemoveCardsFromTableClientRpc(int interactIdA, int interactIdB) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(459902596u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, interactIdA); BytePacker.WriteValueBitPacked(val, interactIdB); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 459902596u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(CardVanishCoroutine(interactIdA, 0.3f, 0)); ((MonoBehaviour)this).StartCoroutine(CardVanishCoroutine(interactIdB, 0.3f, 1)); } } } [ClientRpc] private void RemoveMoveVisualsClientRpc(int player, int[] animateCards, bool vanish, bool stealLightsOff) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(91258270u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, player); bool flag = animateCards != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(animateCards, default(ForPrimitives)); } ((FastBufferWriter)(ref val)).WriteValueSafe(ref vanish, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref stealLightsOff, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 91258270u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (player == 0) { ((MonoBehaviour)this).StartCoroutine(CardMoveCoroutine(animateCards, 0.4f, 0, flip: true, vanish)); if (stealLightsOff) { ((Behaviour)CardStealLightB).enabled = false; TableSfx.PlayOneShot(CardStealLightClipOff); } } else { ((MonoBehaviour)this).StartCoroutine(CardMoveCoroutine(animateCards, 0.4f, 1, flip: true, vanish)); if (stealLightsOff) { ((Behaviour)CardStealLightA).enabled = false; TableSfx.PlayOneShot(CardStealLightClipOff); } } } private void CalculateMoves() { CheckSyncServerRpc(); if ((Object)(object)FigureItemA == (Object)null || (Object)(object)FigureItemB == (Object)null) { EndGameServerRpc(0); return; } PreviousHealthA = FigureA.Health; PreviousHealthB = FigureB.Health; int num = 0; int num2 = 0; bool flag = ChosenMoveA == 1; bool flag2 = ChosenMoveB == 1; if (flag) { num++; } if (flag2) { num2++; } if (ToxicRound) { DamagePlayer(0, 1, 0, num); DamagePlayer(1, 1, 0, num2); PlayToxicRoundSfxClientRpc(); ToxicRound = false; } switch (ChosenMoveA) { case 0: DamagePlayer(1, 1, AdditionalDamageA, num2); AdditionalDamageA = 0; break; case 1: AdditionalDamageA = 0; break; case 2: DamagePlayer(1, 2, AdditionalDamageA, num2); AdditionalDamageA = 0; break; case 3: AdditionalDamageA = 1; break; case 4: CardStealSequenceA = true; AdditionalDamageA = 0; break; case 5: HealPlayer(0, 2); AdditionalDamageA = 0; break; case 6: RemoveCardsImpulse = true; AdditionalDamageA = 0; break; case 7: DamagePlayer(1, 3, AdditionalDamageA, num2); DamagePlayer(0, 3, 0, num); AdditionalDamageA = 0; break; case 8: ExtraDefenceRoundCounterA = 3; AdditionalDamageA = 0; break; case 9: ViewCardsRoundCounterA = 3; AdditionalDamageA = 0; break; case 10: HealPlayer(0, 4); AdditionalDamageA = 0; break; case 11: BlindedRoundsCounterB = 3; AdditionalDamageA = 0; break; } switch (ChosenMoveB) { case 0: DamagePlayer(0, 1, AdditionalDamageB, num); AdditionalDamageB = 0; break; case 1: AdditionalDamageB = 0; break; case 2: DamagePlayer(0, 2, AdditionalDamageB, num); AdditionalDamageB = 0; break; case 3: AdditionalDamageB = 1; break; case 4: CardStealSequenceB = true; AdditionalDamageB = 0; break; case 5: HealPlayer(1, 2); AdditionalDamageB = 0; break; case 6: RemoveCardsImpulse = true; AdditionalDamageB = 0; break; case 7: DamagePlayer(1, 3, 0, num2); DamagePlayer(0, 3, AdditionalDamageB, num); AdditionalDamageB = 0; break; case 8: ExtraDefenceRoundCounterB = 3; AdditionalDamageB = 0; break; case 9: ViewCardsRoundCounterB = 3; AdditionalDamageB = 0; break; case 10: HealPlayer(1, 4); AdditionalDamageB = 0; break; case 11: BlindedRoundsCounterA = 3; AdditionalDamageA = 0; break; } if (FigureA.Health <= 0) { FigureA.Dead = true; } if (FigureB.Health <= 0) { FigureB.Dead = true; } DisplayMovesClientRpc(FigureA.Dead, FigureB.Dead, ChosenMoveA, ChosenMoveB, FigureA.Health, FigureB.Health, PreviousHealthA, PreviousHealthB); DisplayPreviewCardsClientRpc(0, ViewCardsRoundCounterA, ViewCardsRoundCounterB, CardStealSequenceA, CardStealSequenceB); DisplayPreviewCardsClientRpc(1, ViewCardsRoundCounterA, ViewCardsRoundCounterB, CardStealSequenceA, CardStealSequenceB); bool flag3 = false; if (FigureA.Dead || FigureB.Dead) { flag3 = true; } if (!flag3) { if (CardStealSequenceA) { CardPickSequenceClientRpc(0, CardStealSequenceA, CardStealSequenceB); } if (CardStealSequenceB) { CardPickSequenceClientRpc(1, CardStealSequenceA, CardStealSequenceB); } if (!CardStealSequenceA && !CardStealSequenceB) { ((MonoBehaviour)this).StartCoroutine(NextRoundDelayCoroutine(flag3)); ClearAllCards(); } } else { ((MonoBehaviour)this).StartCoroutine(NextRoundDelayCoroutine(flag3)); } } [ClientRpc] private void DisplayPreviewCardsClientRpc(int player, int roundCounterA, int roundCounterB, bool stealSequenceA, bool stealSequenceB) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_00aa: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3058029422u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, player); BytePacker.WriteValueBitPacked(val, roundCounterA); BytePacker.WriteValueBitPacked(val, roundCounterB); ((FastBufferWriter)(ref val)).WriteValueSafe(ref stealSequenceA, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref stealSequenceB, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3058029422u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (player == 0) { ViewCardsRoundCounterA = roundCounterA; if (ViewCardsRoundCounterA > 0 || stealSequenceA) { ((MonoBehaviour)this).StartCoroutine(RevealCardsCoroutine(0, hide: false)); } else { ((MonoBehaviour)this).StartCoroutine(RevealCardsCoroutine(0, hide: true)); } } else { ViewCardsRoundCounterB = roundCounterB; if (ViewCardsRoundCounterB > 0 || stealSequenceB) { ((MonoBehaviour)this).StartCoroutine(RevealCardsCoroutine(1, hide: false)); } else { ((MonoBehaviour)this).StartCoroutine(RevealCardsCoroutine(1, hide: true)); } } } [ClientRpc] private void CardPickSequenceClientRpc(int player, bool cardStealSequenceA, bool cardStealSequenceB) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(513766606u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, player); ((FastBufferWriter)(ref val)).WriteValueSafe(ref cardStealSequenceA, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref cardStealSequenceB, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 513766606u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; bool flag = LocalPlayerAid == LocalPlayerBid; bool flag2 = false; bool flag3 = false; if (!flag) { flag2 = LocalPlayerAid == (int)GameNetworkManager.Instance.localPlayerController.playerClientId; flag3 = LocalPlayerBid == (int)GameNetworkManager.Instance.localPlayerController.playerClientId; if (cardStealSequenceA) { if (!flag3 && flag2 && player == 0) { SetStealInteracts(value: true, 0); } ((Behaviour)CardStealLightA).enabled = true; TableSfx.PlayOneShot(CardStealLightClipOn); } if (cardStealSequenceB) { if (!flag2 && flag3 && player == 1) { SetStealInteracts(value: true, 1); } ((Behaviour)CardStealLightB).enabled = true; TableSfx.PlayOneShot(CardStealLightClipOn); } } else if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId == LocalPlayerAid) { if (cardStealSequenceA) { SetStealInteracts(value: true, 0); ((Behaviour)CardStealLightA).enabled = true; TableSfx.PlayOneShot(CardStealLightClipOn); } if (cardStealSequenceB) { SetStealInteracts(value: true, 1); ((Behaviour)CardStealLightB).enabled = true; TableSfx.PlayOneShot(CardStealLightClipOn); } } } [ClientRpc] private void PlayToxicRoundSfxClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(739165746u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 739165746u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TableSfx.PlayOneShot(ToxicRoundClip); } } } [ServerRpc] private void EndGameServerRpc(int overrideVictoriousPlayer) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2825544326u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, overrideVictoriousPlayer); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2825544326u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; bool victoriousPlayer = false; bool player = false; CanStartGame = false; StartCooldown = 1.5f; BattleEndCountdown = 0f; if (!FigureA.Dead || !FigureB.Dead) { victoriousPlayer = true; if (FigureB.Dead) { player = true; } } roundCounter = 0; InBattle = false; int[] playerMovesA = new int[4] { -1, -1, -1, -1 }; int[] playerMovesB = new int[4] { -1, -1, -1, -1 }; PlayerMovesA = playerMovesA; PlayerMovesB = playerMovesB; ToxicRound = false; ResetCardCaps(); switch (overrideVictoriousPlayer) { case 1: EndGameClientRpc(victoriousPlayer, player: false, PreviousHealthA, PreviousHealthB, CurrentTrack); break; case 2: EndGameClientRpc(victoriousPlayer, player: true, PreviousHealthA, PreviousHealthB, CurrentTrack); break; default: EndGameClientRpc(victoriousPlayer, player, PreviousHealthA, PreviousHealthB, CurrentTrack); break; } SetMoveInteracts(value: false, 2); HideAllSpecialTokens(); } private void HideAllSpecialTokens() { ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(PowerTokenTransformA, reveal: false)); ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(PowerTokenTransformB, reveal: false)); ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(VisionTokenTransformA, reveal: false)); ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(VisionTokenTransformB, reveal: false)); ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(DefenseTokenTransformA, reveal: false)); ((MonoBehaviour)this).StartCoroutine(DisplaySpecialToken(DefenseTokenTransformB, reveal: false)); } [ClientRpc] private void EndGameClientRpc(bool victoriousPlayer, bool player, int previousHealthA, int previousHealthB, int track) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1147212482u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref victoriousPlayer, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref player, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, previousHealthA); BytePacker.WriteValueBitPacked(val, previousHealthB); BytePacker.WriteValueBitPacked(val, track); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1147212482u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)FigureItemA == (Object)null || (Object)(object)FigureItemB == (Object)null) { return; } ViewCardsRoundCounterA = 0; ViewCardsRoundCounterB = 0; if (victoriousPlayer) { ((MonoBehaviour)this).StartCoroutine(SwitchBattleMusic(enable: false, startSound: false, victorySound: true, track)); if (player) { FigureItemA.Animator.SetTrigger("BattleWin"); } else { FigureItemB.Animator.SetTrigger("BattleWin"); } } else { ((MonoBehaviour)this).StartCoroutine(SwitchBattleMusic(enable: false, startSound: false, victorySound: false, track)); } if (((Behaviour)CardStealLightA).enabled) { ((Behaviour)CardStealLightA).enabled = false; TableSfx.PlayOneShot(CardStealLightClipOff); } if (((Behaviour)CardStealLightB).enabled) { ((Behaviour)CardStealLightB).enabled = false; TableSfx.PlayOneShot(CardStealLightClipOff); } ((MonoBehaviour)this).StartCoroutine(RevealCardsCoroutine(0, hide: true)); ((MonoBehaviour)this).StartCoroutine(RevealCardsCoroutine(1, hide: true)); SetBoardInteractables(end: true); for (int i = 0; i < PlayerMovesA.Length; i++) { ((MonoBehaviour)this).StartCoroutine(CardVanishCoroutine(i, 0.2f, 0)); } for (int j = 0; j < PlayerMovesB.Length; j++) { ((MonoBehaviour)this).StartCoroutine(CardVanishCoroutine(j, 0.2f, 1)); } DisplayCurrentHealth(0, previousHealthA, 0); DisplayCurrentHealth(0, previousHealthB, 1); } [ClientRpc] private void DisplayMovesClientRpc(bool figureADead, bool figureBDead, int chosenMoveA, int chosenMoveB, int healthA, int healthB, int previousHealthA, int previousHealthB) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(419925271u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref figureADead, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref figureBDead, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, chosenMoveA); BytePacker.WriteValueBitPacked(val, chosenMoveB); BytePacker.WriteValueBitPacked(val, healthA); BytePacker.WriteValueBitPacked(val, healthB); BytePacker.WriteValueBitPacked(val, previousHealthA); BytePacker.WriteValueBitPacked(val, previousHealthB); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 419925271u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)FigureItemA == (Object)null || (Object)(object)FigureItemB == (Object)null) { return; } if (figureADead) { FigureItemA.Animator.SetTrigger("BattleLose"); if (chosenMoveA != -2) { ((MonoBehaviour)this).StartCoroutine(HealthDisplayDelayCoroutine(healthA, previousHealthA, 0, 0f)); } } else if (chosenMoveA != -2) { FigureItemA.Animator.SetTrigger(Moves[chosenMoveA].FigureAnimationTrigger); ((MonoBehaviour)this).StartCoroutine(HealthDisplayDelayCoroutine(healthB, previousHealthB, 1, Moves[ChosenMoveA].MoveHealthDisplayTime)); } if (figureBDead) { FigureItemB.Animator.SetTrigger("BattleLose"); if (chosenMoveB != -2) { ((MonoBehaviour)this).StartCoroutine(HealthDisplayDelayCoroutine(healthB, previousHealthB, 1, 0f)); } } else if (chosenMoveB != -2) { FigureItemB.Animator.SetTrigger(Moves[chosenMoveB].FigureAnimationTrigger); ((MonoBehaviour)this).StartCoroutine(HealthDisplayDelayCoroutine(healthA, previousHealthA, 0, Moves[ChosenMoveB].MoveHealthDisplayTime)); } } private void HealPlayer(int player, int healAmount) { if (player == 0) { FigureA.Health += healAmount; if (FigureA.Health > 16) { FigureA.Health = 16; } } else { FigureB.Health += healAmount; if (FigureB.Health > 16) { FigureB.Health = 16; } } } private void DamagePlayer(int player, int damage, int additionalDamage, int blockedDamage) { int num = damage; num += additionalDamage; if (player == 0 && ExtraDefenceRoundCounterA > 0) { blockedDamage++; } else if (player == 1 && ExtraDefenceRoundCounterB > 0) { blockedDamage++; } num -= blockedDamage; if (num < 0) { num = 0; } if (player == 0) { FigureA.Health -= num; if (FigureA.Health < 0) { FigureA.Health = 0; } } else { FigureB.Health -= num; if (FigureB.Health < 0) { FigureB.Health = 0; } } } private void DisplayCurrentHealth(int health, int previousHealth, int player) { if (player == 0) { ((MonoBehaviour)this).StartCoroutine(DisplayHealthTokens(player, previousHealth, health)); } else { ((MonoBehaviour)this).StartCoroutine(DisplayHealthTokens(player, previousHealth, health)); } } public void PickCardToStealA(int interactId) { StealCardServerRpc(0, interactId); SetStealInteracts(value: false, 0); } public void PickCardToStealB(int interactId) { StealCardServerRpc(1, interactId); SetStealInteracts(value: false, 1); } [ServerRpc(RequireOwnership = false)] private void StealCardServerRpc(int player, int interactId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4024005591u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, player); BytePacker.WriteValueBitPacked(val, interactId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4024005591u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; int[] array = new int[4]; for (int i = 0; i < array.Length; i++) { array[i] = 0; } array[interactId] = -1; if (player == 0) { CardStealSequenceA = false; if (PlayerMovesB[interactId] == -1) { ChosenStealMoveA = ChosenMoveB; } else { ChosenStealMoveA = PlayerMovesB[interactId]; } PlayerMovesB[interactId] = -1; RemoveMoveVisualsClientRpc(1, array, vanish: true, stealLightsOff: true); } else { CardStealSequenceB = false; if (PlayerMovesA[interactId] == -1) { ChosenStealMoveB = ChosenMoveA; } else { ChosenStealMoveB = PlayerMovesA[interactId]; } PlayerMovesA[interactId] = -1; RemoveMoveVisualsClientRpc(0, array, vanish: true, stealLightsOff: true); } if (!CardStealSequenceA && !CardStealSequenceB) { StealCardClientRpc(); ((MonoBehaviour)this).StartCoroutine(NextRoundDelayCoroutine(gameOver: false)); ClearAllCards(); } } [ClientRpc] private void StealCardClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(302613372u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 302613372u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(RevealCardsCoroutine(0, hide: true)); ((MonoBehaviour)this).StartCoroutine(RevealCardsCoroutine(1, hide: true)); } } } private void ClearAllCards() { if (RemoveCardsImpulse) { for (int i = 0; i < PlayerMovesA.Length; i++) { PlayerMovesA[i] = -1; } for (int j = 0; j < PlayerMovesB.Length; j++) { PlayerMovesB[j] = -1; } RemoveAllCardsFromTableClientRpc(PlayerMovesA.Length, PlayerMovesB.Length); RemoveCardsImpulse = false; } } private IEnumerator RevealCardsCoroutine(int player, bool hide) { float duration = 0.25f; Vector3 vector3Start; Vector3 vector3End; if (hide) { vector3Start = new Vector3(0.8f, 1f, 0.8f); vector3End = Vector3.zero; if ((player == 0 && (CardsRevealA[3].localScale == vector3End || ViewCardsRoundCounterA > 0)) || (player == 1 && (CardsRevealB[3].localScale == vector3End || ViewCardsRoundCounterB > 0))) { yield break; } } else { vector3Start = Vector3.zero; vector3End = new Vector3(0.8f, 1f, 0.8f); if ((CardsRevealA[3].localScale == vector3End && player == 0) || (CardsRevealB[3].localScale == vector3End && player == 1)) { yield break; } } if (player == 0) { foreach (Transform card in CardsRevealA) { float t = 0f; bool playedSound = false; while (t < duration) { t += Time.deltaTime; card.localScale = Vector3.Lerp(vector3Start, vector3End, t / duration); if (!playedSound && !hide) { playedSound = true; TableSfx.PlayOneShot(CardRevealClip); } yield return 0; } } } else { foreach (Transform card2 in CardsRevealB) { float t = 0f; bool playedSound2 = false; while (t < duration) { t += Time.deltaTime; card2.localScale = Vector3.Lerp(vector3Start, vector3End, t / duration); if (!playedSound2 && !hide) { playedSound2 = true; TableSfx.PlayOneShot(CardRevealClip); } yield return 0; } } } yield return 0; } private IEnumerator CardMoveCoroutine(int[] cardSet, float duration, int player, bool flip, bool vanish) { Quaternion rotation; if (!flip) { if (player == 0) { for (int i = 0; i < cardSet.Length; i++) { float t = 0f; bool soundPlayed = false; if (cardSet[i] != -1) { continue; } Vector3 startScale = new Vector3(0.8f, 0.8f, 0.8f); CardsA[i].localScale = startScale; Quaternion startRotation = CardStackTransform.rotation; Quaternion endRotation = CardTransformsA[i].rotation; while (t < duration) { t += Time.deltaTime; float lerpTime = t / duration; float lerpCurved = CardMoveCurve.Evaluate(lerpTime); if (1f / duration * t > 0.05f && !soundPlayed) { soundPlayed = true; TableSfx.PlayOneShot(CardSlideClip); } CardsA[i].localScale = Vector3.Lerp(startScale, Vector3.one, lerpCurved); CardsA[i].position = Vector3.Lerp(CardStackTransform.position, CardTransformsA[i].position, lerpCurved); ((Component)CardsA[i]).transform.rotation = Quaternion.Slerp(startRotation, endRotation, lerpCurved); yield return 0; } } } else { yield return (object)new WaitForSeconds(0.2f); for (int j = 0; j < cardSet.Length; j++) { bool soundPlayed2 = false; float t = 0f; if (cardSet[j] != -1) { continue; } Vector3 startScale2 = new Vector3(0.8f, 0.8f, 0.8f); CardsB[j].localScale = startScale2; Quaternion startRotation2 = CardStackTransform.rotation; Quaternion endRotation2 = CardTransformsB[j].rotation; while (t < duration) { t += Time.deltaTime; float lerpTime2 = t / duration; float lerpCurved2 = CardMoveCurve.Evaluate(lerpTime2); if (1f / duration * t > 0.1f && !soundPlayed2) { soundPlayed2 = true; TableSfx.PlayOneShot(CardSlideClip); } CardsB[j].localScale = Vector3.Lerp(startScale2, Vector3.one, lerpCurved2); CardsB[j].position = Vector3.Lerp(CardStackTransform.position, CardTransformsB[j].position, lerpCurved2); ((Component)CardsB[j]).transform.rotation = Quaternion.Slerp(startRotation2, endRotation2, lerpCurved2); yield return 0; } } } } else if (player == 0) { for (int k = 0; k < cardSet.Length; k++) { bool soundPlayed3 = false; float t = 0f; if (cardSet[k] != -1) { continue; } Quaternion startRotation3 = CardTransformsA[k].rotation; rotation = CardTransformsA[k].rotation; Vector3 vector3 = ((Quaternion)(ref rotation)).eulerAngles; Quaternion endRotation3 = Quaternion.Euler(vector3.x, vector3.y, CardTransformsA[k].rotation.z + 180f); Vector3 cardPosition = CardTransformsA[k].position; Vector3 cardHeightIncrease = new Vector3(0f, 0.25f, 0f); if (((Component)CardsA[k]).transform.rotation != endRotation3) { while (t < duration) { t += Time.deltaTime; float lerpTime3 = t / duration; float lerpCurved3 = CardMoveCurve.Evaluate(lerpTime3); float lerpPingPong = Mathf.PingPong(lerpCurved3, 0.5f); if (1f / duration * t > 0.3f && !soundPlayed3) { soundPlayed3 = true; TableSfx.PlayOneShot(CardFlipClip); } ((Component)CardsA[k]).transform.rotation = Quaternion.Slerp(startRotation3, endRotation3, lerpCurved3); ((Component)CardsA[k]).transform.position = Vector3.Lerp(cardPosition, cardPosition + cardHeightIncrease, lerpPingPong); yield return 0; } } if (vanish) { ((MonoBehaviour)this).StartCoroutine(CardVanishCoroutine(k, 0.2f, player)); } } } else { for (int l = 0; l < cardSet.Length; l++) { bool soundPlayed4 = false; float t = 0f; if (cardSet[l] != -1) { continue; } Quaternion startRotation4 = CardTransformsB[l].rotation; rotation = CardTransformsB[l].rotation; Vector3 vector4 = ((Quaternion)(ref rotation)).eulerAngles; Quaternion endRotation4 = Quaternion.Euler(vector4.x, vector4.y, CardTransformsB[l].rotation.z + 180f); Vector3 cardPosition2 = CardTransformsB[l].position; Vector3 cardHeightIncrease2 = new Vector3(0f, 0.25f, 0f); if (((Component)CardsB[l]).transform.rotation != endRotation4) { while (t < duration) { t += Time.deltaTime; float lerpTime4 = t / duration; float lerpCurved4 = CardMoveCurve.Evaluate(lerpTime4); float lerpPingPong2 = Mathf.PingPong(lerpCurved4, 0.5f); if (1f / duration * t > 0.3f && !soundPlayed4) { soundPlayed4 = true; TableSfx.PlayOneShot(CardFlipClip); } ((Component)CardsB[l]).transform.rotation = Quaternion.Slerp(startRotation4, endRotation4, lerpCurved4); ((Component)CardsB[l]).transform.position = Vector3.Lerp(cardPosition2, cardPosition2 + cardHeightIncrease2, lerpPingPong2); yield return 0; } } if (vanish) { ((MonoBehaviour)this).StartCoroutine(CardVanishCoroutine(l, 0.2f, player)); } } } yield return 0; } private IEnumerator CardVanishCoroutine(int card, float duration, int player) { float t = 0f; if (player == 0) { Vector3 startScale = Vector3.one; Vector3 endScale = Vector3.zero; if (!(CardsA[card].localScale == endScale)) { while (t < duration) { t += Time.deltaTime; float lerpTime = t / duration; float lerpCurved = CardMoveCurve.Evaluate(lerpTime); CardsA[card].localScale = Vector3.Lerp(startScale, endScale, lerpCurved); yield return 0; } } yield break; } Vector3 startScale2 = Vector3.one; Vector3 endScale2 = Vector3.zero; if (!(CardsB[card].localScale == endScale2)) { while (t < duration) { t += Time.deltaTime; float lerpTime2 = t / duration; float lerpCurved2 = CardMoveCurve.Evaluate(lerpTime2); CardsB[card].localScale = Vector3.Lerp(startScale2, endScale2, lerpCurved2); yield return 0; } } } private IEnumerator NextRoundDelayCoroutine(bool gameOver) { yield return (object)new WaitForSeconds(3f); if (gameOver) { EndGameServerRpc(0); } else { NextRoundServerRpc(); } } private IEnumerator HealthDisplayDelayCoroutine(int health, int previousHealth, int player, float delay) { yield return (object)new WaitForSeconds(delay); DisplayCurrentHealth(health, previousHealth, player); } private IEnumerator DisplaySpecialToken(Transform tokenTransform, bool reveal) { float t = 0f; float duration = 0.2f; Vector3 startScale; Vector3 endScale; if (reveal) { startScale = Vector3.zero; endScale = new Vector3(0.5f, 1.1666f, 0.5f); } else { startScale = new Vector3(0.5f, 1.1666f, 0.5f); endScale = Vector3.zero; } if (!(tokenTransform.localScale == endScale)) { while (t < duration) { t += Time.deltaTime; float lerpTime = t / duration; tokenTransform.localScale = Vector3.Lerp(startScale, endScale, lerpTime); yield return 0; } yield return 0; } } private IEnumerator DisplayHealthTokens(int player, int previousHealth, int targetHealth) { int currentDisplayedHealth = previousHealth; int finalTargetHealth = targetHealth - 1; float duration = 0.2f; Vector3 VectorZero = Vector3.zero; Vector3 VectorFull = new Vector3(1f, 1.1666f, 1f); bool firstRemoveImpulse = true; bool direction = currentDisplayedHealth < targetHealth; if (player == 0) { if (direction) { for (; currentDisplayedHealth <= finalTargetHealth; currentDisplayedHealth++) { float t = 0f; while (t < duration) { t += Time.deltaTime; float lerpTime = t / duration; HealthTokenTransformsA[currentDisplayedHealth].localScale = Vector3.Lerp(VectorZero, VectorFull, lerpTime); yield return 0; } } } else { while (currentDisplayedHealth > finalTargetHealth) { if (firstRemoveImpulse) { firstRemoveImpulse = false; } else { float t = 0f; while (t < duration) { t += Time.deltaTime; float lerpTime2 = t / duration; HealthTokenTransformsA[currentDisplayedHealth].localScale = Vector3.Lerp(VectorFull, VectorZero, lerpTime2); yield return 0; } } currentDisplayedHealth--; } } } else if (direction) { for (; currentDisplayedHealth <= finalTargetHealth; currentDisplayedHealth++) { float t = 0f; while (t < duration) { t += Time.deltaTime; float lerpTime3 = t / duration; HealthTokenTransformsB[currentDisplayedHealth].localScale = Vector3.Lerp(VectorZero, VectorFull, lerpTime3); yield return 0; } } } else { while (currentDisplayedHealth > finalTargetHealth) { if (firstRemoveImpulse) { firstRemoveImpulse = false; } else { float t = 0f; while (t < duration) { t += Time.deltaTime; float lerpTime4 = t / duration; HealthTokenTransformsB[currentDisplayedHealth].localScale = Vector3.Lerp(VectorFull, VectorZero, lerpTime4); yield return 0; } } currentDisplayedHealth--; } } yield return 0; } private IEnumerator SwitchBattleMusic(bool enable, bool startSound, bool victorySound, int track) { float t = 0f; float duration = 2f; float targetVolume; float currentVolume; if (enable) { targetVolume = 0.1f; currentVolume = 0f; if ((Object)(object)TableMusicSfx.clip != (Object)(object)TableMusicTracks[track]) { TableMusicSfx.clip = TableMusicTracks[track]; } TableMusicSfx.Play(); } else { targetVolume = 0f; currentVolume = 0.1f; } if (startSound) { RadioSfx.PlayOneShot(BattleStartClip); } if (victorySound) { RadioSfx.PlayOneShot(BattleEndClip); } while (t < duration) { t += Time.deltaTime; float lerpTime = t / duration; TableMusicSfx.volume = Mathf.Lerp(currentVolume, targetVolume, lerpTime); yield return 0; } if (!enable) { TableMusicSfx.Stop(); } yield return 0; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //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 ((NetworkBehaviour)this).__registerRpc(2156591399u, new RpcReceiveHandler(__rpc_handler_2156591399), "CheckSyncServerRpc"); ((NetworkBehaviour)this).__registerRpc(132064951u, new RpcReceiveHandler(__rpc_handler_132064951), "SetValuesOnClientRpc"); ((NetworkBehaviour)this).__registerRpc(2062153304u, new RpcReceiveHandler(__rpc_handler_2062153304), "PlaceActionFigureServerRpc"); ((NetworkBehaviour)this).__registerRpc(3197825868u, new RpcReceiveHandler(__rpc_handler_3197825868), "PlaceActionFigureClientRpc"); ((NetworkBehaviour)this).__registerRpc(3090219821u, new RpcReceiveHandler(__rpc_handler_3090219821), "StartGameServerRpc"); ((NetworkBehaviour)this).__registerRpc(4041070572u, new RpcReceiveHandler(__rpc_handler_4041070572), "StartGameClientRpc"); ((NetworkBehaviour)this).__registerRpc(2687894620u, new RpcReceiveHandler(__rpc_handler_2687894620), "NextRoundServerRpc"); ((NetworkBehaviour)this).__registerRpc(3745262902u, new RpcReceiveHandler(__rpc_handler_3745262902), "NextRoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(124649833u, new RpcReceiveHandler(__rpc_handler_124649833), "SetMoveServerRpc"); ((NetworkBehaviour)this).__registerRpc(218626833u, new RpcReceiveHandler(__rpc_handler_218626833), "RemoveAllCardsFromTableClientRpc"); ((NetworkBehaviour)this).__registerRpc(459902596u, new RpcReceiveHandler(__rpc_handler_459902596), "RemoveCardsFromTableClientRpc"); ((NetworkBehaviour)this).__registerRpc(91258270u, new RpcReceiveHandler(__rpc_handler_91258270), "RemoveMoveVisualsClientRpc"); ((NetworkBehaviour)this).__registerRpc(3058029422u, new RpcReceiveHandler(__rpc_handler_3058029422), "DisplayPreviewCardsClientRpc"); ((NetworkBehaviour)this).__registerRpc(513766606u, new RpcReceiveHandler(__rpc_handler_513766606), "CardPickSequenceClientRpc"); ((NetworkBehaviour)this).__registerRpc(739165746u, new RpcReceiveHandler(__rpc_handler_739165746), "PlayToxicRoundSfxClientRpc"); ((NetworkBehaviour)this).__registerRpc(2825544326u, new RpcReceiveHandler(__rpc_handler_2825544326), "EndGameServerRpc"); ((NetworkBehaviour)this).__registerRpc(1147212482u, new RpcReceiveHandler(__rpc_handler_1147212482), "EndGameClientRpc"); ((NetworkBehaviour)this).__registerRpc(419925271u, new RpcReceiveHandler(__rpc_handler_419925271), "DisplayMovesClientRpc"); ((NetworkBehaviour)this).__registerRpc(4024005591u, new RpcReceiveHandler(__rpc_handler_4024005591), "StealCardServerRpc"); ((NetworkBehaviour)this).__registerRpc(302613372u, new RpcReceiveHandler(__rpc_handler_302613372), "StealCardClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2156591399(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; ((ActionFigureBoard)(object)target).CheckSyncServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_132064951(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong objectIdA = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref objectIdA); ulong objectIdB = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref objectIdB); bool inBattle = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref inBattle, default(ForPrimitives)); int track = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref track); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).SetValuesOnClientRpc(objectIdA, objectIdB, inBattle, track); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2062153304(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong objectId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref objectId); int player = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref player); int figureId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref figureId); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).PlaceActionFigureServerRpc(objectId, player, figureId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3197825868(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong objectId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref objectId); int player = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref player); int figureId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref figureId); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).PlaceActionFigureClientRpc(objectId, player, figureId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3090219821(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; ((ActionFigureBoard)(object)target).StartGameServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4041070572(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int healthA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref healthA); int healthB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref healthB); int track = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref track); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).StartGameClientRpc(healthA, healthB, track); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2687894620(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).NextRoundServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3745262902(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_0074: 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_0058: 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_00b9: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0137: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_0192: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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)); int[] animateCardsA = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animateCardsA, default(ForPrimitives)); } bool flag2 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag2, default(ForPrimitives)); int[] animateCardsB = null; if (flag2) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animateCardsB, default(ForPrimitives)); } bool flag3 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag3, default(ForPrimitives)); int[] playerMovesA = null; if (flag3) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerMovesA, default(ForPrimitives)); } bool flag4 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag4, default(ForPrimitives)); int[] playerMovesB = null; if (flag4) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerMovesB, default(ForPrimitives)); } int defenseA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref defenseA); int defenseB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref defenseB); int viewA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref viewA); int viewB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref viewB); int addDamageA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref addDamageA); int addDamageB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref addDamageB); int blindedA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref blindedA); int blindedB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref blindedB); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).NextRoundClientRpc(animateCardsA, animateCardsB, playerMovesA, playerMovesB, defenseA, defenseB, viewA, viewB, addDamageA, addDamageB, blindedA, blindedB); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_124649833(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int player = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref player); int interactId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref interactId); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).SetMoveServerRpc(player, interactId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_218626833(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int lengthA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref lengthA); int lengthB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref lengthB); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).RemoveAllCardsFromTableClientRpc(lengthA, lengthB); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_459902596(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int interactIdA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref interactIdA); int interactIdB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref interactIdB); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).RemoveCardsFromTableClientRpc(interactIdA, interactIdB); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_91258270(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int player = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref player); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); int[] animateCards = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animateCards, default(ForPrimitives)); } bool vanish = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vanish, default(ForPrimitives)); bool stealLightsOff = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref stealLightsOff, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).RemoveMoveVisualsClientRpc(player, animateCards, vanish, stealLightsOff); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3058029422(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int player = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref player); int roundCounterA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref roundCounterA); int roundCounterB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref roundCounterB); bool stealSequenceA = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref stealSequenceA, default(ForPrimitives)); bool stealSequenceB = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref stealSequenceB, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).DisplayPreviewCardsClientRpc(player, roundCounterA, roundCounterB, stealSequenceA, stealSequenceB); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_513766606(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int player = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref player); bool cardStealSequenceA = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref cardStealSequenceA, default(ForPrimitives)); bool cardStealSequenceB = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref cardStealSequenceB, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).CardPickSequenceClientRpc(player, cardStealSequenceA, cardStealSequenceB); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_739165746(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; ((ActionFigureBoard)(object)target).PlayToxicRoundSfxClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2825544326(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { int overrideVictoriousPlayer = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref overrideVictoriousPlayer); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).EndGameServerRpc(overrideVictoriousPlayer); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1147212482(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool victoriousPlayer = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref victoriousPlayer, default(ForPrimitives)); bool player = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref player, default(ForPrimitives)); int previousHealthA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref previousHealthA); int previousHealthB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref previousHealthB); int track = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref track); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).EndGameClientRpc(victoriousPlayer, player, previousHealthA, previousHealthB, track); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_419925271(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool figureADead = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref figureADead, default(ForPrimitives)); bool figureBDead = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref figureBDead, default(ForPrimitives)); int chosenMoveA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref chosenMoveA); int chosenMoveB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref chosenMoveB); int healthA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref healthA); int healthB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref healthB); int previousHealthA = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref previousHealthA); int previousHealthB = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref previousHealthB); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).DisplayMovesClientRpc(figureADead, figureBDead, chosenMoveA, chosenMoveB, healthA, healthB, previousHealthA, previousHealthB); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4024005591(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int player = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref player); int interactId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref interactId); target.__rpc_exec_stage = (__RpcExecStage)1; ((ActionFigureBoard)(object)target).StealCardServerRpc(player, interactId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_302613372(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; ((ActionFigureBoard)(object)target).StealCardClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ActionFigureBoard"; } } internal class ActionFigureItem : NetworkBehaviour { public GrabbableObject GrabbableObject; public BoxCollider Collider; public int ActionFigureId; public readonly int Health = 4; public Animator Animator; private void Awake() { GrabbableObject = ((Component)this).GetComponent(); Collider = ((Component)this).GetComponent(); Animator = ((Component)this).GetComponent(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "ActionFigureItem"; } } internal class AnimationAudioPlayer : MonoBehaviour { public AudioSource audioSource; public List audioClips; public List particleSystems; public List ExtraUnityEvents; public UnityEvent Event; public void PlayAudioInList(int clip) { audioSource.PlayOneShot(audioClips[clip]); } public void PlayParticleInList(int particleSystem) { particleSystems[particleSystem].Play(); } public void InvokeExtraUnityEvent(int ev) { ExtraUnityEvents[ev].Invoke(); } public void InvokeEvent() { UnityEvent obj = Event; if (obj != null) { obj.Invoke(); } } } internal class AnimatorFeatures : MonoBehaviour { public Animator Animator; public string BoolName; public void SwitchBool(bool value) { Animator.SetBool(BoolName, value); } } internal class AudioDimmer : MonoBehaviour { public AudioSource AudioSource; public AudioSource InverseAudioSource; private float CurrentVolume = 1f; private float CurrentVolumeInverse = 1f; private float InitialVolume = 1f; private float InitialVolumeInverse = 1f; public float VolumeGoal = 0f; public float VolumeGoalInverse = 1f; public float TransitionSpeed = 1f; private bool Dim = false; private void Awake() { InitialVolume = AudioSource.volume; CurrentVolume = AudioSource.volume; if ((Object)(object)InverseAudioSource != (Object)null) { InitialVolumeInverse = InverseAudioSource.volume; CurrentVolumeInverse = InverseAudioSource.volume; } } private void Update() { if (Dim && CurrentVolume > VolumeGoal) { CurrentVolume -= Time.deltaTime * TransitionSpeed; AudioSource.volume = CurrentVolume; } else if (!Dim && CurrentVolume < InitialVolume) { CurrentVolume += Time.deltaTime * TransitionSpeed; AudioSource.volume = CurrentVolume; } if ((Object)(object)InverseAudioSource != (Object)null) { if (Dim && CurrentVolumeInverse < VolumeGoalInverse) { CurrentVolumeInverse += Time.deltaTime * TransitionSpeed; InverseAudioSource.volume = CurrentVolumeInverse; } else if (!Dim && CurrentVolumeInverse > InitialVolumeInverse) { CurrentVolumeInverse -= Time.deltaTime * TransitionSpeed; InverseAudioSource.volume = CurrentVolumeInverse; } } if (Dim && GameNetworkManager.Instance.localPlayerController.isPlayerDead) { DimAudio(dim: false); } } public void DimAudio(bool dim) { Dim = dim; } } internal class AudioSourceVolumeAdjuster : MonoBehaviour { [SerializeField] private AudioSource Audio; public void AudioAdjust(float volume) { AudioSource audio = Audio; audio.volume += volume; } } public class Autopsy { public int Id { get; set; } public int NameId { get; set; } public int CauseOfDeathId { get; set; } } internal class AutopsyHint : MonoBehaviour { public TMP_Text text; public void SetText(string newText) { text.text = newText; } } internal class AutopsyObjective : NetworkBehaviour { [SerializeField] private List ReportRenderers; [SerializeField] private List NameTexts; [SerializeField] private List MorgueNameTexts; private AutopsyHint AutopsyHint; private List Names = new List { "Mason Keller", "Ava Reynolds", "Liam Carter", "Zoe Bennett", "Ethan Brooks", "Harper Collins", "Noah Mitchell", "Chloe Parker", "Lucas Rivera", "Maya Thompson", "Caleb Foster", "Riley Morgan", "Owen Hughes", "Layla Simmons", "Jackson Price", "Sofia Ward", "Dylan Hayes", "Nora Brooks", "Elijah Turner", "Stella Grant", "Cameron Diaz", "Addison Blake", "Grayson Cole", "Natalie Reed", "Julian Scott", "Brooklyn Shaw", "Connor Ellis", "Hailey James", "Leo Martinez", "Hailey Robertson", "Sadie Walker" }; private List CauseOfDeath = new List { "Blood loss from several lacerations to the chest, presumably from a Crestbear.", "Blood loss from several lacerations to the chest and neck, presumably from a Crestbear.", "Blood loss from several lacerations to the chest and arms, presumably from a Crestbear.", "Repeated bludgeoning to the head with a hammer during a physical altercation.", "Repeated bludgeoning to the head and right shoulder with a hammer during a physical altercation.", "Repeated bludgeoning to the head with a hammer during a physical altercation leading to a cracked skull.", "Organ failure, likely due to ingesting dangerous chemicals.", "Organ failure, likely due to ingesting unhealthy amounts of alcohol.", "Organ failure, likely due to ingesting gasoline.", "Blood loss from a fatal stabbing to the chest and head.", "Blood loss from a fatal stabbing to the chest and right shoulder.", "Blood loss from a fatal stabbing to the head and lower chest.", "Blood loss from several shots to the chest and right leg.", "Blood loss from several shots to the right shoulder and left leg.", "Blood loss from several shots to the left shoulder, chest and left ear.", "Decapitation by running machinery.", "Decapitation by an attack from a kidnapper fox.", "Decapitation after a physical altercation, several lacerations to the chest were noted.", "Internal bleeding, presumably from a car crash.", "Internal bleeding, presumably from a high fall, several broken bones.", "Internal bleeding, presumably from a car crash and a cracked skull.", "Blood loss from crushing beneath a heavy object, several bones were pulverised.", "Blood loss from crushing beneath debris, head has been pulverised.", "Blood loss from crushing and several lacerations to the neck.", "Drowning and stabbing to the chest during a physical altercation.", "Drowning and stabbing to the shoulder during a physical altercation.", "Drowning and blood loss from a slit throat during a physical altercation.", "Blood loss from several lacerations to the chest and ripped out eye, presumably during a violent animal attack.", "Blood loss from several lacerations to the chest and right leg, presumably during a violent animal attack.", "Blood loss from several lacerations to the chest, shoulder and legs presumably during a violent animal attack." }; [SerializeField] private List ReportTextures; private List Autopsies = new List(); private readonly int ReportAmount = 12; public int ChosenReportId; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); SetupAutopsyValues(); } private void SetupAutopsyValues() { SetupAutopsyValuesServerRpc(); } [ServerRpc] private void SetupAutopsyValuesServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2146571100u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2146571100u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; int[] array = new int[ReportAmount]; int[] array2 = new int[ReportAmount]; for (int i = 0; i < ReportAmount; i++) { Autopsy autopsy = new Autopsy(); int num = Random.Range(0, Names.Count); do { num = Random.Range(0, Names.Count); } while (array.Contains(num)); int num2 = Random.Range(0, CauseOfDeath.Count); do { num2 = Random.Range(0, CauseOfDeath.Count); } while (array2.Contains(num2)); array[i] = num; array2[i] = num2; autopsy.NameId = array[i]; autopsy.CauseOfDeathId = array2[i]; autopsy.Id = i; Autopsies.Add(autopsy); } ChosenReportId = Random.Range(0, ReportAmount); SetupAutopsyValuesClientRpc(array, array2, ChosenReportId); } [ClientRpc] private void SetupAutopsyValuesClientRpc(int[] names, int[] causeOfDeath, int reportId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(662689071u, val2, (RpcDelivery)0); bool flag = names != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(names, default(ForPrimitives)); } bool flag2 = causeOfDeath != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val)).WriteValueSafe(causeOfDeath, default(ForPrimitives)); } BytePacker.WriteValueBitPacked(val, reportId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 662689071u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ChosenReportId = reportId; for (int i = 0; i < ReportAmount; i++) { ((Renderer)ReportRenderers[i]).material.SetTexture("_BaseColorMap", (Texture)(object)ReportTextures[causeOfDeath[i]]); NameTexts[i].text = Names[names[i]]; MorgueNameTexts[i].text = Names[names[i]]; } AutopsyHint = Object.FindObjectOfType(); AutopsyHint?.SetText(CauseOfDeath[causeOfDeath[ChosenReportId]]); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2146571100u, new RpcReceiveHandler(__rpc_handler_2146571100), "SetupAutopsyValuesServerRpc"); ((NetworkBehaviour)this).__registerRpc(662689071u, new RpcReceiveHandler(__rpc_handler_662689071), "SetupAutopsyValuesClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2146571100(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((AutopsyObjective)(object)target).SetupAutopsyValuesServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_662689071(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_0074: 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_0058: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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)); int[] names = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref names, default(ForPrimitives)); } bool flag2 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag2, default(ForPrimitives)); int[] causeOfDeath = null; if (flag2) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref causeOfDeath, default(ForPrimitives)); } int reportId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref reportId); target.__rpc_exec_stage = (__RpcExecStage)1; ((AutopsyObjective)(object)target).SetupAutopsyValuesClientRpc(names, causeOfDeath, reportId); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "AutopsyObjective"; } } internal class BetterWeedkiller : GrabbableObject { public AudioSource sprayAudio; public AudioClip spraySFX; public AudioClip sprayNeedsShakingSFX; public AudioClip sprayStart; public AudioClip sprayStop; public AudioClip sprayCanEmptySFX; public AudioClip sprayCanNeedsShakingSFX; public AudioClip sprayCanShakeEmptySFX; public AudioClip[] sprayCanShakeSFX; public ParticleSystem sprayParticle; public ParticleSystem sprayCanNeedsShakingParticle; private bool isSpraying; private float sprayInterval; public float sprayIntervalSpeed = 0.2f; public float CadaverKillingSpeed = 2.8f; public float ShroudKillingSpeed = 2.8f; private Vector3 previousSprayPosition; public static List sprayPaintDecals = new List(); public static int sprayPaintDecalsIndex; public GameObject sprayPaintPrefab; public int maxSprayPaintDecals = 1000; private float sprayCanTank = 1f; private float sprayCanShakeMeter; public static DecalProjector previousSprayDecal; private float shakingCanTimer; private bool tryingToUseEmptyCan; public Material[] sprayCanMats; public Material[] particleMats; private int sprayCanMatsIndex; private RaycastHit sprayHit; public bool debugSprayPaint; private int addSprayPaintWithFrameDelay; private DecalProjector delayedSprayPaintDecal; private int sprayPaintMask = 605030721; private bool makingAudio; private float audioInterval; [Space(5f)] public bool isWeedKillerSprayBottle; private Collider[] weedColliders; private float addVehicleHPInterval; private MoldSpreadManager moldManager; private (int batchNum, int positionIndex) killingWeed; private (int batchNum, int positionIndex, int plantType) killingCadaverPlant; private CadaverGrowthAI cadaverGrowthAI; private float sprayOnPlayerMeter; private bool healingPlayerInfection; public override void Start() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Start(); weedColliders = (Collider[])(object)new Collider[3]; sprayHit = default(RaycastHit); killingWeed = (batchNum: -1, positionIndex: -1); killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); if (isWeedKillerSprayBottle) { moldManager = Object.FindObjectOfType(); return; } Random random = new Random(StartOfRound.Instance.randomMapSeed + 151); sprayCanMatsIndex = random.Next(0, sprayCanMats.Length); ((Renderer)((Component)sprayParticle).GetComponent()).material = particleMats[sprayCanMatsIndex]; ((Renderer)((Component)sprayCanNeedsShakingParticle).GetComponent()).material = particleMats[sprayCanMatsIndex]; } public override void LoadItemSaveData(int saveData) { ((GrabbableObject)this).LoadItemSaveData(saveData); sprayCanTank = (float)saveData / 100f; } public override int GetItemDataToSave() { return (int)(sprayCanTank * 100f); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); base.playerHeldBy.equippedUsableItemQE = true; } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown) { if (sprayCanTank <= 0f || sprayCanShakeMeter <= 0f) { if (isSpraying) { StopSpraying(); } PlayCanEmptyEffect(sprayCanTank <= 0f); } else { StartSpraying(); } return; } if (tryingToUseEmptyCan) { addVehicleHPInterval = 0f; tryingToUseEmptyCan = false; sprayAudio.Stop(); sprayCanNeedsShakingParticle.Stop(true, (ParticleSystemStopBehavior)1); } if (isWeedKillerSprayBottle) { sprayCanShakeMeter = 1f; } if (isSpraying) { StopSpraying(); } } private void PlayCanEmptyEffect(bool isEmpty) { if (tryingToUseEmptyCan) { return; } tryingToUseEmptyCan = true; if (!isEmpty) { if (sprayCanNeedsShakingParticle.isPlaying) { sprayCanNeedsShakingParticle.Stop(true, (ParticleSystemStopBehavior)0); } sprayCanNeedsShakingParticle.Play(); sprayAudio.clip = sprayNeedsShakingSFX; sprayAudio.Play(); } else { sprayAudio.PlayOneShot(sprayCanEmptySFX); } } public override void ItemInteractLeftRight(bool right) { ((GrabbableObject)this).ItemInteractLeftRight(right); if (!isWeedKillerSprayBottle && !right && !((Object)(object)base.playerHeldBy == (Object)null) && !isSpraying) { if (sprayCanTank <= 0f) { sprayAudio.PlayOneShot(sprayCanShakeEmptySFX); WalkieTalkie.TransmitOneShotAudio(sprayAudio, sprayCanShakeEmptySFX, 1f); } else { RoundManager.PlayRandomClip(sprayAudio, sprayCanShakeSFX, true, 1f, 0, 1000); WalkieTalkie.TransmitOneShotAudio(sprayAudio, sprayCanShakeEmptySFX, 1f); } base.playerHeldBy.playerBodyAnimator.SetTrigger("shakeItem"); sprayCanShakeMeter = Mathf.Min(sprayCanShakeMeter + 0.15f, 1f); } } public static Vector3 ExtractScaleFromMatrix(Matrix4x4 matrix) { //IL_0001: 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_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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) Vector3 val = new Vector3(matrix.m00, matrix.m10, matrix.m20); float magnitude = ((Vector3)(ref val)).magnitude; val = new Vector3(matrix.m01, matrix.m11, matrix.m21); float magnitude2 = ((Vector3)(ref val)).magnitude; val = new Vector3(matrix.m02, matrix.m12, matrix.m22); float magnitude3 = ((Vector3)(ref val)).magnitude; return new Vector3(magnitude, magnitude2, magnitude3); } public static Matrix4x4 ResizeMatrix(Matrix4x4 yourMatrix, float shrinkSpeed, bool shrink = true) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_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_003a: 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_00c3: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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_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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) Matrix4x4 val = yourMatrix; Vector3 val2 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(3)); Vector3 val3 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(0)); Vector3 val4 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(1)); Vector3 val5 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(2)); float magnitude = ((Vector3)(ref val3)).magnitude; float magnitude2 = ((Vector3)(ref val4)).magnitude; float magnitude3 = ((Vector3)(ref val5)).magnitude; float num = ((!shrink) ? (1f + shrinkSpeed * Time.deltaTime) : (1f - shrinkSpeed * Time.deltaTime)); magnitude = Mathf.Clamp(magnitude * num, 0.001f, 10f); magnitude2 = Mathf.Clamp(magnitude2 * num, 0.001f, 10f); magnitude3 = Mathf.Clamp(magnitude3 * num, 0.001f, 10f); val3 = ((Vector3)(ref val3)).normalized * magnitude; val4 = ((Vector3)(ref val4)).normalized * magnitude2; val5 = ((Vector3)(ref val5)).normalized * magnitude3; Matrix4x4 identity = Matrix4x4.identity; ((Matrix4x4)(ref identity)).SetColumn(0, Vector4.op_Implicit(val3)); ((Matrix4x4)(ref identity)).SetColumn(1, Vector4.op_Implicit(val4)); ((Matrix4x4)(ref identity)).SetColumn(2, Vector4.op_Implicit(val5)); ((Matrix4x4)(ref identity)).SetColumn(3, Vector4.op_Implicit(val2)); return identity; } public static Matrix4x4 SetMatrixScale(Matrix4x4 yourMatrix, float setScale) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_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_003a: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) Matrix4x4 val = yourMatrix; Vector3 val2 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(3)); Vector3 val3 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(0)); Vector3 val4 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(1)); Vector3 val5 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(2)); float magnitude = ((Vector3)(ref val3)).magnitude; float magnitude2 = ((Vector3)(ref val4)).magnitude; float magnitude3 = ((Vector3)(ref val5)).magnitude; magnitude = Mathf.Clamp(setScale, 0.001f, 10f); magnitude2 = Mathf.Clamp(setScale, 0.001f, 10f); magnitude3 = Mathf.Clamp(setScale, 0.001f, 10f); val3 = ((Vector3)(ref val3)).normalized * magnitude; val4 = ((Vector3)(ref val4)).normalized * magnitude2; val5 = ((Vector3)(ref val5)).normalized * magnitude3; Matrix4x4 identity = Matrix4x4.identity; ((Matrix4x4)(ref identity)).SetColumn(0, Vector4.op_Implicit(val3)); ((Matrix4x4)(ref identity)).SetColumn(1, Vector4.op_Implicit(val4)); ((Matrix4x4)(ref identity)).SetColumn(2, Vector4.op_Implicit(val5)); ((Matrix4x4)(ref identity)).SetColumn(3, Vector4.op_Implicit(val2)); return identity; } public override void LateUpdate() { //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0249: 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_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010d: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).LateUpdate(); if (isWeedKillerSprayBottle) { Matrix4x4 val2; if (killingCadaverPlant.batchNum != -1) { if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI == (Object)null) { killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); } Matrix4x4 val = cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex]; if (ExtractScaleFromMatrix(val).x < 3f && ((NetworkBehaviour)this).IsOwner) { val2 = cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex]; Vector3 position = ((Matrix4x4)(ref val2)).GetPosition(); KillCadaverPlantRpc(position); cadaverGrowthAI.DestroyPlantAtPosition(position, true); killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); } else { cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex] = ResizeMatrix(val, CadaverKillingSpeed); } } else if (killingWeed.batchNum != -1) { Matrix4x4 val3 = moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex]; if (ExtractScaleFromMatrix(val3).x < 0.5f && ((NetworkBehaviour)this).IsOwner) { val2 = moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex]; Vector3 position2 = ((Matrix4x4)(ref val2)).GetPosition(); KillWeedRpc(position2); moldManager.DestroyMoldAtPosition(position2, true); killingWeed = (batchNum: -1, positionIndex: -1); } else { moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex] = ResizeMatrix(val3, ShroudKillingSpeed); } } } if (makingAudio) { if (audioInterval <= 0f) { audioInterval = 1f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 10f, 0.65f, 0, base.isInShipRoom && StartOfRound.Instance.hangarDoorsClosed, 0); } else { audioInterval -= Time.deltaTime; } } if (addSprayPaintWithFrameDelay > 1) { addSprayPaintWithFrameDelay--; } else if (addSprayPaintWithFrameDelay == 1) { addSprayPaintWithFrameDelay = 0; ((Behaviour)delayedSprayPaintDecal).enabled = true; } if (isSpraying && base.isHeld) { if (isWeedKillerSprayBottle) { sprayCanTank = Mathf.Max(sprayCanTank - Time.deltaTime / 15f, 0f); sprayCanShakeMeter = Mathf.Max(sprayCanShakeMeter - Time.deltaTime * 2f, 0f); TrySprayingWeedKillerOnLocalPlayer(); } else { sprayCanTank = Mathf.Max(sprayCanTank - Time.deltaTime / 30f, 0f); sprayCanShakeMeter = Mathf.Max(sprayCanShakeMeter - Time.deltaTime / 10f, 0f); } if (sprayCanTank <= 0f || sprayCanShakeMeter <= 0f) { isSpraying = false; StopSpraying(); PlayCanEmptyEffect(sprayCanTank <= 0f); } else { if (!((NetworkBehaviour)this).IsOwner) { return; } if (sprayInterval <= 0f) { if (isWeedKillerSprayBottle) { sprayInterval = sprayIntervalSpeed; TrySprayingWeedKillerBottle(); } else if (TrySpraying()) { sprayInterval = sprayIntervalSpeed; } else { sprayInterval = 0.037f; } } else { sprayInterval -= Time.deltaTime; } } } else if (isWeedKillerSprayBottle) { StopKillingWeedLocalClient(); StopKillingCadaverPlantLocalClient(); } } private void TrySprayingWeedKillerBottle() { //IL_0017: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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) bool flag = false; Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position - ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 0.7f; if (Physics.Raycast(val, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward, ref sprayHit, 4.5f, 1073742080, (QueryTriggerInteraction)2)) { if (addVehicleHPInterval <= 0f) { addVehicleHPInterval = 0.3f; VehicleController val2 = Object.FindObjectOfType(); if ((Object)(object)val2 != (Object)null && Vector3.Distance(((RaycastHit)(ref sprayHit)).point, val2.oilPipePoint.position) < 5f) { StopKillingWeedLocalClient(); StopKillingCadaverPlantLocalClient(); flag = true; if (val2.carHP >= val2.baseCarHP) { val2.AddTurboBoost(); } else { val2.AddEngineOil(); } } Debug.DrawRay(((RaycastHit)(ref sprayHit)).point, Vector3.up * 0.5f, Color.red, 1f); Debug.DrawLine(val, ((RaycastHit)(ref sprayHit)).point, Color.green, 5f); } else { addVehicleHPInterval -= Time.deltaTime; } } if (!flag && !StartOfRound.Instance.inShipPhase) { if (base.isInFactory) { CheckForCadaverPlantsInSprayPath(); } else { CheckForWeedsInSprayPath(); } } } private void TrySprayingWeedKillerOnLocalPlayer() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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) if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI != (Object)null && (Object)(object)base.playerHeldBy != (Object)null && (Object)(object)base.playerHeldBy != (Object)(object)GameNetworkManager.Instance.localPlayerController && cadaverGrowthAI.playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId].infected) { Vector3 position = ((Component)GameNetworkManager.Instance.localPlayerController).transform.position; position.y = ((Component)this).transform.position.y; if (Vector3.Distance(((Component)base.playerHeldBy).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 5f && Vector3.Angle(((Component)this).transform.forward, position - ((Component)this).transform.position) < 40f) { HealPlayerInfection(cadaverGrowthAI.playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId]); } } } private void HealPlayerInfection(PlayerInfection infection) { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) if (sprayOnPlayerMeter > 0.33f) { sprayOnPlayerMeter = 0f; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (infection.burstMeter > 0f) { cadaverGrowthAI.BurstFromPlayer(GameNetworkManager.Instance.localPlayerController, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); cadaverGrowthAI.SyncBurstFromPlayerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); return; } GameNetworkManager.Instance.localPlayerController.DamagePlayer(8, true, true, (CauseOfDeath)5, 0, false, default(Vector3)); cadaverGrowthAI.HealInfection((int)localPlayerController.playerClientId, 0.1f); if (GameNetworkManager.Instance.localPlayerController.criticallyInjured) { sprayOnPlayerMeter = -0.2f; } } else { sprayOnPlayerMeter += Time.deltaTime; } } private bool CheckForCadaverPlantsInSprayPath() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 1.8f; if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI == (Object)null || ((EnemyAI)cadaverGrowthAI).isEnemyDead) { return false; } if (cadaverGrowthAI.GetAllPlantPositionsInRadius(val, 2f, true)) { float num = 2000f; int num2 = 0; int num3 = -1; for (int i = 0; i < cadaverGrowthAI.plantBatchers.Length; i++) { int length = cadaverGrowthAI.moldPositions.GetLength(0); for (int j = 0; j < length && cadaverGrowthAI.moldPositions[j, i] != -1; j++) { if (!cadaverGrowthAI.growingRecentPlant || !(cadaverGrowthAI.plantBatchers[i].batchedPositions[cadaverGrowthAI.moldPositions[j, i]] == cadaverGrowthAI.recentPlantPosition)) { float num4 = Vector3.Distance(val, cadaverGrowthAI.plantBatchers[i].batchedPositions[cadaverGrowthAI.moldPositions[j, i]]); if (num4 < num) { num = num4; num2 = j; num3 = i; } } } } if (num3 == -1) { return false; } killingCadaverPlant = cadaverGrowthAI.plantBatchers[num3].GetWeedPositionInMatrixListForCadaverPlants(cadaverGrowthAI.moldPositions[num2, num3], num3); SyncKillingCadaverPlantRpc(killingCadaverPlant.batchNum, killingCadaverPlant.positionIndex, killingCadaverPlant.plantType); return true; } return false; } private bool CheckForWeedsInSprayPath() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)moldManager == (Object)null) { moldManager = Object.FindObjectOfType(); } if ((Object)(object)moldManager == (Object)null) { return false; } Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 1.8f; int allMoldPositionsInRadius = moldManager.GetAllMoldPositionsInRadius(val, 2f, true); if (allMoldPositionsInRadius > 0) { float num = 2000f; int num2 = 0; for (int i = 0; i < allMoldPositionsInRadius; i++) { float num3 = Vector3.Distance(val, moldManager.grassInstancer.batchedPositions[moldManager.moldPositions[i]]); if (num3 < num) { num = num3; num2 = i; } } killingWeed = moldManager.grassInstancer.GetWeedPositionInMatrixList(moldManager.moldPositions[num2]); SyncKillingWeedRpc(killingWeed.batchNum, killingWeed.positionIndex); return true; } return false; } private void StopKillingWeedLocalClient() { (int, int) tuple = killingWeed; if (tuple.Item1 != -1 || tuple.Item2 != -1) { killingWeed = (batchNum: -1, positionIndex: -1); StopKillingWeedServerRpc(); } } private void StopKillingCadaverPlantLocalClient() { (int, int, int) tuple = killingCadaverPlant; if (tuple.Item1 != -1 || tuple.Item2 != -1 || tuple.Item3 != -1) { killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); StopKillingCadaverPlantServerRpc(); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncKillingWeedRpc(int batchNum, int positionIndex) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_00bf: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(306101209u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, batchNum); BytePacker.WriteValueBitPacked(val2, positionIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 306101209u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingWeed = (batchNum: batchNum, positionIndex: positionIndex); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncKillingCadaverPlantRpc(int batchNum, int positionIndex, int plantType) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(904644146u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, batchNum); BytePacker.WriteValueBitPacked(val2, positionIndex); BytePacker.WriteValueBitPacked(val2, plantType); ((NetworkBehaviour)this).__endSendRpc(ref val2, 904644146u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingCadaverPlant = (batchNum: batchNum, positionIndex: positionIndex, plantType: plantType); } } } [ServerRpc(RequireOwnership = false)] public void StopKillingCadaverPlantServerRpc() { //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(3835250050u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3835250050u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StopKillingWeedClientRpc(); } } } [ClientRpc] public void StopKillingCadaverPlantClientRpc() { //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(907297253u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 907297253u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); } } } [ServerRpc(RequireOwnership = false)] public void StopKillingWeedServerRpc() { //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(2953208381u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2953208381u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StopKillingWeedClientRpc(); } } } [ClientRpc] public void StopKillingWeedClientRpc() { //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(2684960911u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2684960911u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { killingWeed = (batchNum: -1, positionIndex: -1); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void KillWeedRpc(Vector3 destroyAtPos) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(349072893u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref destroyAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 349072893u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingWeed = (batchNum: -1, positionIndex: -1); moldManager.DestroyMoldAtPosition(destroyAtPos, true); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void KillCadaverPlantRpc(Vector3 destroyAtPos) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(646222200u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref destroyAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 646222200u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); cadaverGrowthAI.DestroyPlantAtPosition(destroyAtPos, true); } } public bool TrySpraying() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_00e5: 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) Debug.DrawRay(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward, Color.magenta, 0.05f); if (AddSprayPaintLocal(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 1f, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward)) { SprayPaintServerRpc(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 1f, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward); return true; } return false; } [ServerRpc] public void SprayPaintServerRpc(Vector3 sprayPos, Vector3 sprayRot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Invalid comparison between Unknown and I4 //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //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_00dc: 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(3347526064u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sprayPos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sprayRot); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3347526064u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SprayPaintClientRpc(sprayPos, sprayRot); } } [ClientRpc] public void SprayPaintClientRpc(Vector3 sprayPos, Vector3 sprayRot) { //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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) 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(3973047817u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sprayPos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sprayRot); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3973047817u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { AddSprayPaintLocal(sprayPos, sprayRot); } } } private void ToggleSprayCollisionOnHolder(bool enable) { if ((Object)(object)base.playerHeldBy == (Object)null) { return; } if (!enable) { for (int i = 0; i < base.playerHeldBy.bodyPartSpraypaintColliders.Length; i++) { base.playerHeldBy.bodyPartSpraypaintColliders[i].enabled = false; ((Component)base.playerHeldBy.bodyPartSpraypaintColliders[i]).gameObject.layer = 2; } } else { for (int j = 0; j < base.playerHeldBy.bodyPartSpraypaintColliders.Length; j++) { base.playerHeldBy.bodyPartSpraypaintColliders[j].enabled = false; ((Component)base.playerHeldBy.bodyPartSpraypaintColliders[j]).gameObject.layer = 29; } } } private bool AddSprayPaintLocal(Vector3 sprayPos, Vector3 sprayRot) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.playerHeldBy == (Object)null) { return false; } ToggleSprayCollisionOnHolder(enable: false); if ((Object)(object)RoundManager.Instance.mapPropsContainer == (Object)null) { RoundManager.Instance.mapPropsContainer = GameObject.FindGameObjectWithTag("MapPropsContainer"); } Ray val = default(Ray); ((Ray)(ref val))..ctor(sprayPos, sprayRot); if (!Physics.Raycast(val, ref sprayHit, 7f, sprayPaintMask, (QueryTriggerInteraction)2)) { ToggleSprayCollisionOnHolder(enable: true); return false; } if (Vector3.Distance(((RaycastHit)(ref sprayHit)).point, previousSprayPosition) < 0.175f) { ToggleSprayCollisionOnHolder(enable: true); return false; } if (debugSprayPaint) { Debug.DrawRay(sprayPos, sprayRot * 7f, Color.green, 5f); } int num = -1; Transform val2; if (((Component)((RaycastHit)(ref sprayHit)).collider).gameObject.layer == 11 || ((Component)((RaycastHit)(ref sprayHit)).collider).gameObject.layer == 8 || ((Component)((RaycastHit)(ref sprayHit)).collider).gameObject.layer == 0) { val2 = ((!base.playerHeldBy.isInElevator && !StartOfRound.Instance.inShipPhase && !((Object)(object)RoundManager.Instance.mapPropsContainer == (Object)null)) ? RoundManager.Instance.mapPropsContainer.transform : StartOfRound.Instance.elevatorTransform); } else { if (((Component)((RaycastHit)(ref sprayHit)).collider).tag.StartsWith("PlayerBody")) { switch (((Component)((RaycastHit)(ref sprayHit)).collider).tag) { case "PlayerBody": num = 0; break; case "PlayerBody1": num = 1; break; case "PlayerBody2": num = 2; break; case "PlayerBody3": num = 3; break; } if (num == (int)base.playerHeldBy.playerClientId) { ToggleSprayCollisionOnHolder(enable: true); return false; } } else if (((Component)((RaycastHit)(ref sprayHit)).collider).tag.StartsWith("PlayerRagdoll")) { switch (((Component)((RaycastHit)(ref sprayHit)).collider).tag) { case "PlayerRagdoll": num = 0; break; case "PlayerRagdoll1": num = 1; break; case "PlayerRagdoll2": num = 2; break; case "PlayerRagdoll3": num = 3; break; } } val2 = ((Component)((RaycastHit)(ref sprayHit)).collider).transform; } sprayPaintDecalsIndex = (sprayPaintDecalsIndex + 1) % maxSprayPaintDecals; DecalProjector val3 = null; GameObject val4; if (sprayPaintDecals.Count <= sprayPaintDecalsIndex) { for (int i = 0; i < 200; i++) { if (sprayPaintDecals.Count >= maxSprayPaintDecals) { break; } val4 = Object.Instantiate(sprayPaintPrefab, val2); sprayPaintDecals.Add(val4); val3 = val4.GetComponent(); if ((Object)(object)val3.material != (Object)(object)sprayCanMats[sprayCanMatsIndex]) { val3.material = sprayCanMats[sprayCanMatsIndex]; } } } if ((Object)(object)sprayPaintDecals[sprayPaintDecalsIndex] == (Object)null) { val4 = Object.Instantiate(sprayPaintPrefab, val2); sprayPaintDecals[sprayPaintDecalsIndex] = val4; } else { if (!sprayPaintDecals[sprayPaintDecalsIndex].activeSelf) { sprayPaintDecals[sprayPaintDecalsIndex].SetActive(true); } val4 = sprayPaintDecals[sprayPaintDecalsIndex]; } val3 = val4.GetComponent(); if ((Object)(object)val3.material != (Object)(object)sprayCanMats[sprayCanMatsIndex]) { val3.material = sprayCanMats[sprayCanMatsIndex]; } switch (num) { case 0: val3.decalLayerMask = (DecalLayerEnum)16; break; case 1: val3.decalLayerMask = (DecalLayerEnum)32; break; case 2: val3.decalLayerMask = (DecalLayerEnum)64; break; case 3: val3.decalLayerMask = (DecalLayerEnum)128; break; case -1: val3.decalLayerMask = (DecalLayerEnum)1; break; } val4.transform.position = ((Ray)(ref val)).GetPoint(((RaycastHit)(ref sprayHit)).distance - 0.1f); val4.transform.forward = sprayRot; if ((Object)(object)val4.transform.parent != (Object)(object)val2) { val4.transform.SetParent(val2); } previousSprayPosition = ((RaycastHit)(ref sprayHit)).point; addSprayPaintWithFrameDelay = 2; delayedSprayPaintDecal = val3; ToggleSprayCollisionOnHolder(enable: true); return true; } public void StartSpraying() { sprayAudio.clip = spraySFX; sprayAudio.Play(); sprayParticle.Play(true); isSpraying = true; sprayAudio.PlayOneShot(sprayStart); } public void StopSpraying() { sprayAudio.Stop(); sprayParticle.Stop(true, (ParticleSystemStopBehavior)1); isSpraying = false; sprayAudio.PlayOneShot(sprayStop); } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); if ((Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.activatingItem = false; base.playerHeldBy.equippedUsableItemQE = false; } StopSpraying(); } public override void DiscardItem() { if ((Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.activatingItem = false; base.playerHeldBy.equippedUsableItemQE = false; } ((GrabbableObject)this).DiscardItem(); StopSpraying(); } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(306101209u, new RpcReceiveHandler(__rpc_handler_306101209), "SyncKillingWeedRpc"); ((NetworkBehaviour)this).__registerRpc(904644146u, new RpcReceiveHandler(__rpc_handler_904644146), "SyncKillingCadaverPlantRpc"); ((NetworkBehaviour)this).__registerRpc(3835250050u, new RpcReceiveHandler(__rpc_handler_3835250050), "StopKillingCadaverPlantServerRpc"); ((NetworkBehaviour)this).__registerRpc(907297253u, new RpcReceiveHandler(__rpc_handler_907297253), "StopKillingCadaverPlantClientRpc"); ((NetworkBehaviour)this).__registerRpc(2953208381u, new RpcReceiveHandler(__rpc_handler_2953208381), "StopKillingWeedServerRpc"); ((NetworkBehaviour)this).__registerRpc(2684960911u, new RpcReceiveHandler(__rpc_handler_2684960911), "StopKillingWeedClientRpc"); ((NetworkBehaviour)this).__registerRpc(349072893u, new RpcReceiveHandler(__rpc_handler_349072893), "KillWeedRpc"); ((NetworkBehaviour)this).__registerRpc(646222200u, new RpcReceiveHandler(__rpc_handler_646222200), "KillCadaverPlantRpc"); ((NetworkBehaviour)this).__registerRpc(3347526064u, new RpcReceiveHandler(__rpc_handler_3347526064), "SprayPaintServerRpc"); ((NetworkBehaviour)this).__registerRpc(3973047817u, new RpcReceiveHandler(__rpc_handler_3973047817), "SprayPaintClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_306101209(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int batchNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref batchNum); int positionIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref positionIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((BetterWeedkiller)(object)target).SyncKillingWeedRpc(batchNum, positionIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_904644146(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int batchNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref batchNum); int positionIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref positionIndex); int plantType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref plantType); target.__rpc_exec_stage = (__RpcExecStage)1; ((BetterWeedkiller)(object)target).SyncKillingCadaverPlantRpc(batchNum, positionIndex, plantType); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3835250050(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; ((BetterWeedkiller)(object)target).StopKillingCadaverPlantServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_907297253(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; ((BetterWeedkiller)(object)target).StopKillingCadaverPlantClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2953208381(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; ((BetterWeedkiller)(object)target).StopKillingWeedServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2684960911(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; ((BetterWeedkiller)(object)target).StopKillingWeedClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_349072893(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 destroyAtPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((BetterWeedkiller)(object)target).KillWeedRpc(destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_646222200(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 destroyAtPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((BetterWeedkiller)(object)target).KillCadaverPlantRpc(destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3347526064(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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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 sprayPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref sprayPos); Vector3 sprayRot = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref sprayRot); target.__rpc_exec_stage = (__RpcExecStage)1; ((BetterWeedkiller)(object)target).SprayPaintServerRpc(sprayPos, sprayRot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3973047817(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 sprayPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref sprayPos); Vector3 sprayRot = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref sprayRot); target.__rpc_exec_stage = (__RpcExecStage)1; ((BetterWeedkiller)(object)target).SprayPaintClientRpc(sprayPos, sprayRot); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BetterWeedkiller"; } } internal class BookPuzzleController : NetworkBehaviour { public List MoveableBooks; public Animator Animator; public AudioSource LoopingSfx; public bool TimerStarted; public bool HasFinished; public float BookTimerMax = 15f; private float BookTimer; public int BooksPulled = 0; public int BooksPullGoal = 8; public UnityEvent HostEvent; public UnityEvent ClientEvent; private void Awake() { foreach (MoveableBook moveableBook in MoveableBooks) { moveableBook.Controller = this; } } private void Update() { if (!((NetworkBehaviour)this).IsServer || HasFinished || !TimerStarted) { return; } if (BookTimer < BookTimerMax) { BookTimer += Time.deltaTime; return; } TimerStarted = false; SetPuzzleActiveClientRpc(value: false, HasFinished); BooksPulled = 0; foreach (MoveableBook moveableBook in MoveableBooks) { moveableBook.BookMoved = false; } } public void CheckValues() { CheckValuesServerRpc(); } [ServerRpc(RequireOwnership = false)] private void CheckValuesServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(253604427u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 253604427u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (HasFinished) { return; } if (!TimerStarted) { TimerStarted = true; BookTimer = 0f; SetPuzzleActiveClientRpc(value: true, HasFinished); } bool flag = true; foreach (MoveableBook moveableBook in MoveableBooks) { if (((Behaviour)moveableBook).isActiveAndEnabled && !moveableBook.BookMoved) { flag = false; } } if (BooksPulled == BooksPullGoal) { flag = true; } if (flag) { HasFinished = true; Animator.SetTrigger("open"); SetPuzzleActiveClientRpc(value: false, HasFinished); CompletePuzzleClientRpc(); } } [ClientRpc] private void SetPuzzleActiveClientRpc(bool value, bool finished) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1358358404u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref value, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref finished, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1358358404u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (value) { LoopingSfx.Play(); return; } LoopingSfx.Stop(); foreach (MoveableBook moveableBook in MoveableBooks) { if (!finished) { moveableBook.BookAnimator.SetBool("moved", false); moveableBook.BookSfx.PlayOneShot(moveableBook.MoveBackClip); moveableBook.Trigger.interactable = true; } else { moveableBook.BookAnimator.SetBool("moved", true); moveableBook.Trigger.interactable = false; } } } [ClientRpc] private void CompletePuzzleClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1180604145u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1180604145u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ClientEvent.Invoke(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(253604427u, new RpcReceiveHandler(__rpc_handler_253604427), "CheckValuesServerRpc"); ((NetworkBehaviour)this).__registerRpc(1358358404u, new RpcReceiveHandler(__rpc_handler_1358358404), "SetPuzzleActiveClientRpc"); ((NetworkBehaviour)this).__registerRpc(1180604145u, new RpcReceiveHandler(__rpc_handler_1180604145), "CompletePuzzleClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_253604427(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; ((BookPuzzleController)(object)target).CheckValuesServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1358358404(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool value = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, default(ForPrimitives)); bool finished = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref finished, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BookPuzzleController)(object)target).SetPuzzleActiveClientRpc(value, finished); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1180604145(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; ((BookPuzzleController)(object)target).CompletePuzzleClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BookPuzzleController"; } } internal class BreakingIce : NetworkBehaviour { public Animator HoleAnimator; public Animator WormAnimator; public List WormAnimStrings; public GameObject IceObject; public InteractTrigger InitialCheckTrigger; public Collider PhysicsCollider; public BoxCollider IcePhysicsCollider; public Collider WeightCollider; public DecalProjector DecalProjector; public ParticleSystem BreakParticles; private List PlayersOnIce = new List(); public AudioSource Audio; public List IceCrack; public AudioClip IceBreak; private float CurrentWeight; public float WeightThresholdMin = 0.08f; public float WeightThresholdMax = 0.7f; private float WeightThreshholdFinal; private float BreakTimeFinal; public float AutoBreakTime = 420f; private int BreakState; private int BreakAtState = 1; public float BreakTimeMin = 3f; public float BreakTimeMax = 8f; private float CurrentBreakTime; private float WeightCheckInterval = 1f; private float WeightCheckTime; private bool IceBroken; private void Awake() { WeightThreshholdFinal = Random.Range(WeightThresholdMin, WeightThresholdMax); BreakTimeFinal = Random.Range(BreakTimeMin, BreakTimeMax); IcePhysicsCollider = ((Component)this).GetComponent(); } private void Update() { if (!((NetworkBehaviour)this).IsServer || IceBroken) { return; } if (WeightCheckTime < WeightCheckInterval) { WeightCheckTime += Time.deltaTime; } else { WeightCheckTime = 0f; UpdateWeight(); } if (CurrentWeight > WeightThreshholdFinal) { CurrentBreakTime += Time.deltaTime; if (CurrentBreakTime > BreakTimeFinal) { if (BreakState < BreakAtState) { BreakState++; CrackIceClientRpc(); if (BreakState == BreakAtState) { CurrentBreakTime = 0f - BreakTimeFinal; } else { CurrentBreakTime = 0f; } } else { IceBroken = true; BreakIceClientRpc(); PlayersOnIce.Clear(); } } } if (AutoBreakTime > 0f) { AutoBreakTime -= Time.deltaTime; return; } IceBroken = true; BreakIceClientRpc(); PlayersOnIce.Clear(); } public void ApproachBreak(bool guaranteed = false) { ApproachBreakServerRpc(guaranteed, worm: true); } [ServerRpc(RequireOwnership = false)] private void ApproachBreakServerRpc(bool guaranteed, bool worm) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(130326509u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref guaranteed, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref worm, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 130326509u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!guaranteed) { bool destroy = false; float num = Random.Range(0f, 1f); if (num < 0.25f) { destroy = true; IceBroken = true; PlayersOnIce.Clear(); } ApproachBreakClientRpc(destroy, worm); } else { ApproachBreakClientRpc(destroy: true, worm); } } [ClientRpc] private void ApproachBreakClientRpc(bool destroy, bool worm) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3710864879u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref destroy, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref worm, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3710864879u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (destroy) { if (worm) { int index = Random.Range(0, WormAnimStrings.Count); Animator wormAnimator = WormAnimator; if (wormAnimator != null) { wormAnimator.SetTrigger(WormAnimStrings[index]); } } Audio.PlayOneShot(IceBreak); ((Behaviour)DecalProjector).enabled = false; BreakParticles.Play(); IceObject.SetActive(false); PhysicsCollider.enabled = false; ((Collider)IcePhysicsCollider).enabled = false; WeightCollider.enabled = false; } InitialCheckTrigger.interactable = false; } [ClientRpc] private void CrackIceClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1759532316u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1759532316u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; HoleAnimator.SetTrigger("crack"); int index = Random.Range(0, IceCrack.Count); Audio.PlayOneShot(IceCrack[index]); ((Behaviour)DecalProjector).enabled = true; } } } [ClientRpc] private void BreakIceClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2945775996u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2945775996u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Audio.PlayOneShot(IceBreak); ((Behaviour)DecalProjector).enabled = false; BreakParticles.Play(); IceObject.SetActive(false); PhysicsCollider.enabled = false; ((Collider)IcePhysicsCollider).enabled = false; WeightCollider.enabled = false; } } } private void UpdateWeight() { float num = 0f; foreach (PlayerControllerB item in PlayersOnIce) { num += item.carryWeight - 0.9f; } CurrentWeight = num; } private void OnTriggerEnter(Collider other) { if (((Component)other).tag == "Player") { PlayerControllerB component = ((Component)other).GetComponent(); if ((Object)(object)component != (Object)null) { PlayersOnIce.Add(component); } } } private void OnTriggerExit(Collider other) { if (((Component)other).tag == "Player") { PlayerControllerB component = ((Component)other).GetComponent(); if ((Object)(object)component != (Object)null) { PlayersOnIce.Remove(component); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(130326509u, new RpcReceiveHandler(__rpc_handler_130326509), "ApproachBreakServerRpc"); ((NetworkBehaviour)this).__registerRpc(3710864879u, new RpcReceiveHandler(__rpc_handler_3710864879), "ApproachBreakClientRpc"); ((NetworkBehaviour)this).__registerRpc(1759532316u, new RpcReceiveHandler(__rpc_handler_1759532316), "CrackIceClientRpc"); ((NetworkBehaviour)this).__registerRpc(2945775996u, new RpcReceiveHandler(__rpc_handler_2945775996), "BreakIceClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_130326509(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool guaranteed = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref guaranteed, default(ForPrimitives)); bool worm = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref worm, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BreakingIce)(object)target).ApproachBreakServerRpc(guaranteed, worm); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3710864879(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool destroy = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destroy, default(ForPrimitives)); bool worm = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref worm, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BreakingIce)(object)target).ApproachBreakClientRpc(destroy, worm); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1759532316(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; ((BreakingIce)(object)target).CrackIceClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2945775996(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; ((BreakingIce)(object)target).BreakIceClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BreakingIce"; } } internal class BurntCorn : MonoBehaviour { public Material NewCornMat; public MeshRenderer CornRenderer; public bool burn = true; public void BurnCorn() { ((Renderer)CornRenderer).material = NewCornMat; } public void BurnAllCorn() { BurntCorn[] array = Object.FindObjectsOfType(); BurntCorn[] array2 = array; foreach (BurntCorn burntCorn in array2) { if (burntCorn.burn) { burntCorn.BurnCorn(); } } } } internal class ButtonSpamObjective : NetworkBehaviour { public Animator Animator; public AudioSource LoopingSfx; public AudioSource SpamObjectiveSfx; public AudioClip SuccessClip; public AudioClip FailClip; public ParticleSystem FinishParticles; public InteractTrigger PressTrigger; public string AnimatorFloatName; public int SpamAmount = 20; public float AnimationFlowSpeedMultiplier = 0.2f; private int TimesPressed = 0; private float AnimationProgress = 0f; private float AnimationProgressFlow = 0f; private float AudioVolume = 0f; public bool CanPress = true; public bool CanFinish = true; private bool Completed = false; public UnityEvent PressEvent; public UnityEvent HostCompleteEvent; public UnityEvent ClientCompleteEvent; public void PressIncrease() { if (CanPress) { PressIncreaseServerRpc(instaFinish: false); } } public void PressFinish() { if (CanPress) { PressIncreaseServerRpc(instaFinish: true); } } private void Update() { if ((Object)(object)LoopingSfx != (Object)null && AudioVolume > 0f) { AudioVolume -= 2f * Time.deltaTime; LoopingSfx.volume = AudioVolume; } if (AnimationProgressFlow < AnimationProgress) { AnimationProgressFlow += AnimationFlowSpeedMultiplier * Time.deltaTime; Animator.SetFloat(AnimatorFloatName, AnimationProgressFlow); } } public void EnableObjective() { PressTrigger.interactable = true; CanPress = true; } [ServerRpc(RequireOwnership = false)] private void PressIncreaseServerRpc(bool instaFinish) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2575884124u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref instaFinish, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2575884124u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (Completed) { return; } bool flag = false; if (instaFinish) { flag = true; TimesPressed = SpamAmount; } else if (TimesPressed < SpamAmount) { TimesPressed++; } else { flag = true; } if (flag) { if (CanFinish) { Completed = true; HostCompleteEvent.Invoke(); } else { TimesPressed = 0; } } float animationProgress = 1f / (float)SpamAmount * (float)TimesPressed; PressIncreaseClientRpc(animationProgress, flag, CanFinish); } [ClientRpc] private void PressIncreaseClientRpc(float animationProgress, bool completed, bool canFinish) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1146995697u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref animationProgress, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref completed, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref canFinish, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1146995697u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PressEvent.Invoke(); if (completed) { if (CanFinish) { CanPress = false; ClientCompleteEvent.Invoke(); AudioSource spamObjectiveSfx = SpamObjectiveSfx; if (spamObjectiveSfx != null) { spamObjectiveSfx.PlayOneShot(SuccessClip); } ParticleSystem finishParticles = FinishParticles; if (finishParticles != null) { finishParticles.Play(); } if ((Object)(object)PressTrigger != (Object)null) { PressTrigger.interactable = false; } AnimationProgress = 1f; } else { AnimationProgress = 1f; CanPress = false; AudioSource spamObjectiveSfx2 = SpamObjectiveSfx; if (spamObjectiveSfx2 != null) { spamObjectiveSfx2.PlayOneShot(FailClip); } if ((Object)(object)PressTrigger != (Object)null) { PressTrigger.interactable = false; } ((MonoBehaviour)this).StartCoroutine(ResetCoroutine()); AnimationProgress = 1f; } } else { AnimationProgress = animationProgress; } if (AudioVolume < 1f) { AudioVolume += 0.8f; } } private IEnumerator ResetCoroutine() { yield return (object)new WaitForSeconds(2f); CanPress = true; PressTrigger.interactable = true; AnimationProgressFlow = 0f; AnimationProgress = 0f; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2575884124u, new RpcReceiveHandler(__rpc_handler_2575884124), "PressIncreaseServerRpc"); ((NetworkBehaviour)this).__registerRpc(1146995697u, new RpcReceiveHandler(__rpc_handler_1146995697), "PressIncreaseClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2575884124(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 instaFinish = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref instaFinish, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ButtonSpamObjective)(object)target).PressIncreaseServerRpc(instaFinish); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1146995697(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float animationProgress = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationProgress, default(ForPrimitives)); bool completed = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref completed, default(ForPrimitives)); bool canFinish = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref canFinish, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ButtonSpamObjective)(object)target).PressIncreaseClientRpc(animationProgress, completed, canFinish); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ButtonSpamObjective"; } } internal class CacheSpawner : NetworkBehaviour { public int CacheId = 0; public UnityEvent SpawnEvent; public override void OnNetworkSpawn() { if (((NetworkBehaviour)this).IsServer) { AttemptSpawn(); } } private void AttemptSpawn() { if (WesleysInteriorToolsPlugin.CurrentSave.GetCacheSpawned(CacheId) == 0) { SpawnEvent.Invoke(); } } public void SetCacheSpawned() { SetCacheSpawnedServerRpc(); } [ServerRpc(RequireOwnership = false)] private void SetCacheSpawnedServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4257994501u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4257994501u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (WesleysInteriorToolsPlugin.CurrentSave.GetCacheSpawned(CacheId) == 0) { WesleysInteriorToolsPlugin.CurrentSave.SetCacheSpawned(CacheId); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(4257994501u, new RpcReceiveHandler(__rpc_handler_4257994501), "SetCacheSpawnedServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4257994501(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; ((CacheSpawner)(object)target).SetCacheSpawnedServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CacheSpawner"; } } internal class CadaverMonstrocity : NetworkBehaviour { public Animator MonstrocityAnimator; public InteractTrigger StartTrigger; public BoxCollider TriggerCollider; public AudioSource MonstrocityAmbienceSfx; private int Health = 10; private int HealthMax = 10; private bool EncounterStarted; public float TentacleHitInterval = 12f; private float TentacleTimer; private float TentacleHitCooldown; private int BattleStage = 0; private float BiterTimer = 0f; private int BiterCombo = 1; private float biteCooldown = 0f; private float FlowerTimer = 0f; private bool Dead; public UnityEvent DeathEvent; public void StartEncounter(PlayerControllerB player) { //IL_0011: 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) StartEncounterServerRpc(); player.DamagePlayer(5, true, true, (CauseOfDeath)6, 0, false, default(Vector3)); } private void Update() { if (!((NetworkBehaviour)this).IsServer || !EncounterStarted || Dead) { return; } if (TentacleTimer < TentacleHitInterval) { TentacleTimer += Time.deltaTime; } else { TentacleTimer = 0f; InitiateAttack(0); } if (TentacleHitCooldown > 0f) { TentacleHitCooldown -= Time.deltaTime; } float num = 14f; if (Health <= 3) { num = 7f; MonstrocityAnimator.SetFloat("biterspeed", 2f); } if (BiterTimer < num) { BiterTimer += Time.deltaTime; } else { BiterTimer = 0f; if (BattleStage == 1) { BiterCombo = 1; } else if (BattleStage == 2) { BiterCombo = 2; } else if (BattleStage == 3) { BiterCombo = 4; } } float num2 = 99999f; if (BattleStage == 2) { num2 = 24f; } else if (BattleStage == 3) { num2 = 12f; } if (FlowerTimer < num2) { FlowerTimer += Time.deltaTime; } else { FlowerTimer = 0f; InitiateAttack(2); } if (BiterCombo <= 0) { return; } if (biteCooldown > 0f) { biteCooldown -= Time.deltaTime; return; } BiterCombo--; if (Health > 3) { biteCooldown = 2.8f; } else { biteCooldown = 1.4f; } InitiateAttack(1); } private void InitiateAttack(int attackType) { switch (attackType) { case 0: { int attackNum3 = Random.Range(0, 3); InitiateAttackClientRpc(attackType, attackNum3); break; } case 1: { int attackNum2 = Random.Range(0, 3); InitiateAttackClientRpc(attackType, attackNum2); break; } case 2: { int attackNum = Random.Range(0, 4); InitiateAttackClientRpc(attackType, attackNum); break; } } } [ClientRpc] private void InitiateAttackClientRpc(int attackType, int attackNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3838887207u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, attackType); BytePacker.WriteValueBitPacked(val, attackNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3838887207u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; string text = ""; switch (attackType) { case 0: text = "tentacle" + attackNum; MonstrocityAnimator.SetTrigger(text); break; case 1: text = "bite" + attackNum; MonstrocityAnimator.SetTrigger(text); break; case 2: text = "flower" + attackNum; MonstrocityAnimator.SetTrigger(text); break; } } } public void HurtMonstrocity() { HurtMonstrocityServerRpc(); } [ServerRpc(RequireOwnership = false)] private void HurtMonstrocityServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2308477659u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2308477659u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (TentacleHitCooldown <= 0f) { Health--; TentacleHitCooldown = 3f; if (BattleStage == 0) { BattleStage = 1; } else if (Health < 4) { BattleStage = 3; } else if (Health > 7) { BattleStage = 2; } HurtMonstrocityClientRpc(death: false); } if (Health <= 0) { HurtMonstrocityClientRpc(death: true); Dead = true; DeathEvent.Invoke(); } } [ClientRpc] private void HurtMonstrocityClientRpc(bool death) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3887668596u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref death, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3887668596u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!death) { MonstrocityAnimator.SetTrigger("hurt"); return; } MonstrocityAnimator.SetTrigger("death"); MonstrocityAmbienceSfx.Stop(); } } [ServerRpc(RequireOwnership = false)] private void StartEncounterServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2483835677u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2483835677u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!EncounterStarted) { EncounterStarted = true; StartEncounterClientRpc(); } } } [ClientRpc] private void StartEncounterClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3328496781u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3328496781u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MonstrocityAnimator.SetTrigger("startevent"); StartTrigger.interactable = false; ((Collider)TriggerCollider).enabled = false; MonstrocityAmbienceSfx.Play(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3838887207u, new RpcReceiveHandler(__rpc_handler_3838887207), "InitiateAttackClientRpc"); ((NetworkBehaviour)this).__registerRpc(2308477659u, new RpcReceiveHandler(__rpc_handler_2308477659), "HurtMonstrocityServerRpc"); ((NetworkBehaviour)this).__registerRpc(3887668596u, new RpcReceiveHandler(__rpc_handler_3887668596), "HurtMonstrocityClientRpc"); ((NetworkBehaviour)this).__registerRpc(2483835677u, new RpcReceiveHandler(__rpc_handler_2483835677), "StartEncounterServerRpc"); ((NetworkBehaviour)this).__registerRpc(3328496781u, new RpcReceiveHandler(__rpc_handler_3328496781), "StartEncounterClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3838887207(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int attackType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref attackType); int attackNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref attackNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((CadaverMonstrocity)(object)target).InitiateAttackClientRpc(attackType, attackNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2308477659(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; ((CadaverMonstrocity)(object)target).HurtMonstrocityServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3887668596(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 death = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref death, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CadaverMonstrocity)(object)target).HurtMonstrocityClientRpc(death); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2483835677(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; ((CadaverMonstrocity)(object)target).StartEncounterServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3328496781(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; ((CadaverMonstrocity)(object)target).StartEncounterClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CadaverMonstrocity"; } } internal class CalistStarsDimmer : MonoBehaviour { public MeshRenderer Renderer; public Material DimStarsMaterial; private void Awake() { CheckDimStars(); } private void CheckDimStars() { if (WesleysInteriorToolsPlugin.GetMotionSicknessValue()) { ((Renderer)Renderer).material = DimStarsMaterial; } } } internal class Chandelier : NetworkBehaviour { public DinerPuzzleController Controller; public int Id; public Animator Animator; public Light Light; public AudioSource AudioSource; public AudioClip OnClip; public AudioClip OffClip; public AudioClip Flicker; public InteractTrigger Trigger; public bool IsOn = false; public void FlickSwitch() { FlickSwitchServerRpc(); } [ServerRpc(RequireOwnership = false)] private void FlickSwitchServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2412844871u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2412844871u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; IsOn = !IsOn; SetChandelierStateClientRpc(IsOn); Controller.ChandeliersEnabled[Id] = IsOn; Controller.CheckAnswerServer(); } } } public void SetChandelierStateServer(bool state) { IsOn = state; SetChandelierStateClientRpc(state); } [ClientRpc] private void SetChandelierStateClientRpc(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) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2398563040u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2398563040u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((Behaviour)Light).enabled = state; Animator.SetBool("enabled", state); if (IsOn) { AudioSource.PlayOneShot(OnClip); } else { AudioSource.PlayOneShot(OffClip); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2412844871u, new RpcReceiveHandler(__rpc_handler_2412844871), "FlickSwitchServerRpc"); ((NetworkBehaviour)this).__registerRpc(2398563040u, new RpcReceiveHandler(__rpc_handler_2398563040), "SetChandelierStateClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2412844871(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; ((Chandelier)(object)target).FlickSwitchServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2398563040(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 chandelierStateClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref chandelierStateClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Chandelier)(object)target).SetChandelierStateClientRpc(chandelierStateClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Chandelier"; } } internal class CitadelEventController : NetworkBehaviour { public Animator PillarAnimator; public Animator BigEyeAnimator; public Animator CitadelChamberAnimator; public List SmallEyeHazards; private int EventStage = 0; public bool EventCompleted = false; public bool EventStarted = false; private float PillarAttackInterval = 42f; private float PillarAttackTimer = 0f; private float BigEyeAttackInterval = 50f; private float BigEyeAttackTimer = 0f; private float SmallEyeSearchInterval = 20f; private float SmallEyeSearchTimer = 0f; private int PreviousSmallEye = 0; public void StartEvent() { StartEventServerRpc(); } public void EndEvent() { EndEventServerRpc(); } [ServerRpc] private void EndEventServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2247250603u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2247250603u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; EventCompleted = true; EndEventClientRpc(); } } [ClientRpc] private void EndEventClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2713884231u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2713884231u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CitadelChamberAnimator.SetTrigger("open"); PillarAnimator.SetBool("finished", true); BigEyeAnimator.SetTrigger("end"); } } } private void Update() { if (((NetworkBehaviour)this).IsServer && EventStarted && !EventCompleted) { PillarAttackTimer += Time.deltaTime; BigEyeAttackTimer += Time.deltaTime; SmallEyeSearchTimer += Time.deltaTime; if (PillarAttackTimer >= PillarAttackInterval && EventStage > 0) { PillarAttackTimer = 0f; PillarAttackClientRpc(); } if (SmallEyeSearchTimer >= SmallEyeSearchInterval && EventStage > 1) { SmallEyeSearchTimer = 0f; PickSmallEyeSearch(); } if (BigEyeAttackTimer >= BigEyeAttackInterval && EventStage > 2) { BigEyeAttackTimer = 0f; BigeyeAttackClientRpc(); } } } [ServerRpc(RequireOwnership = false)] private void StartEventServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1055669833u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1055669833u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetEventStage(1); EventStarted = true; PillarAttackClientRpc(); } } } public void SetEventStageServer(int stage) { SetEventStageServerRpc(stage); } [ServerRpc] private void SetEventStageServerRpc(int stage) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3628785542u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, stage); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3628785542u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetEventStage(stage); } } private void SetEventStage(int stage) { if (stage > EventStage) { EventStage = stage; if (EventStage == 2) { SmallEyeSearchTimer = 0f; PickSmallEyeSearch(); } if (EventStage == 3) { BigEyeAttackTimer = 0f; PillarAttackInterval = 30f; BigeyeAttackClientRpc(); PillarAttackTimer = -60f; SmallEyeSearchInterval = 8f; } if (EventStage == 4) { BigEyeAttackInterval = 40f; PillarAttackInterval = 20f; SmallEyeSearchInterval = 3f; } } } private void PickSmallEyeSearch() { bool flag = false; while (!flag) { int num = Random.Range(0, SmallEyeHazards.Count); if (num != PreviousSmallEye) { flag = true; PreviousSmallEye = num; SmallEyeSearchClientRpc(num); } } } [ClientRpc] private void PillarAttackClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(279060628u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 279060628u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PillarAnimator.SetTrigger("startattack"); } } } [ClientRpc] private void BigeyeAttackClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(361338843u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 361338843u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; BigEyeAnimator.SetTrigger("attack"); } } } [ClientRpc] private void SmallEyeSearchClientRpc(int eye) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2262446104u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, eye); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2262446104u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SmallEyeHazards[eye].SetTrigger("Search"); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2247250603u, new RpcReceiveHandler(__rpc_handler_2247250603), "EndEventServerRpc"); ((NetworkBehaviour)this).__registerRpc(2713884231u, new RpcReceiveHandler(__rpc_handler_2713884231), "EndEventClientRpc"); ((NetworkBehaviour)this).__registerRpc(1055669833u, new RpcReceiveHandler(__rpc_handler_1055669833), "StartEventServerRpc"); ((NetworkBehaviour)this).__registerRpc(3628785542u, new RpcReceiveHandler(__rpc_handler_3628785542), "SetEventStageServerRpc"); ((NetworkBehaviour)this).__registerRpc(279060628u, new RpcReceiveHandler(__rpc_handler_279060628), "PillarAttackClientRpc"); ((NetworkBehaviour)this).__registerRpc(361338843u, new RpcReceiveHandler(__rpc_handler_361338843), "BigeyeAttackClientRpc"); ((NetworkBehaviour)this).__registerRpc(2262446104u, new RpcReceiveHandler(__rpc_handler_2262446104), "SmallEyeSearchClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2247250603(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((CitadelEventController)(object)target).EndEventServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2713884231(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; ((CitadelEventController)(object)target).EndEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1055669833(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; ((CitadelEventController)(object)target).StartEventServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3628785542(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { int eventStageServerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref eventStageServerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((CitadelEventController)(object)target).SetEventStageServerRpc(eventStageServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_279060628(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; ((CitadelEventController)(object)target).PillarAttackClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_361338843(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; ((CitadelEventController)(object)target).BigeyeAttackClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2262446104(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 eye = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref eye); target.__rpc_exec_stage = (__RpcExecStage)1; ((CitadelEventController)(object)target).SmallEyeSearchClientRpc(eye); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CitadelEventController"; } } internal class CoreHeaterBomb : NetworkBehaviour { public float Charges = 5f; private float MaxCharges; public float FlashIntervalMax = 30f; public float FlashIntervalMin = 2f; public AudioSource OutsideAudio; public AudioSource InsideAudio; public AudioClip OutsideBleep; public AudioClip InsideBleep; public List BombGroan; public List BombGroanInside; public AudioClip BombExplode; public AudioClip BombExplodeInside; public List Meshes; public Light FlashLight; public UnityEvent ExplodeEvent; public UnityEvent FlashEvent; public UnityEvent BombWakeEvent; public ParticleSystem BombQuakeParticle; public MeshRenderer LightMesh; public Material LightOffMat; public Material LightOnMat; private float FlashTimer; private bool Exploded; private void Awake() { MaxCharges = Charges; } private void Update() { if (!((NetworkBehaviour)this).IsServer || Charges == MaxCharges || Exploded) { return; } float num = 1f / MaxCharges * Charges; float num2 = Mathf.Lerp(FlashIntervalMin, FlashIntervalMax, num); if (Charges == 1f) { num2 = 2f; } if (FlashTimer < num2) { FlashTimer += Time.deltaTime; return; } FlashTimer = 0f; if (Charges > 0f) { BombFlashClientRpc(); return; } Exploded = true; BombExplodeClientRpc(); } public void DecreaseCharge() { Charges -= 1f; BombChargeDecreaseEffectsClientRpc(); } [ClientRpc] private void BombExplodeClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3274580338u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3274580338u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(ExplodeBombCoroutine()); } } } [ClientRpc] private void BombFlashClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1202514326u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1202514326u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(BombFlashEffectCoroutine()); } } } [ClientRpc] private void BombChargeDecreaseEffectsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1088566777u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1088566777u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(DecreaseEffectsCoroutine()); } } } private IEnumerator DecreaseEffectsCoroutine() { yield return (object)new WaitForSeconds(2f); BombWakeEvent.Invoke(); yield return (object)new WaitForSeconds(0.3f); int rand = Random.Range(0, BombGroan.Count); OutsideAudio.PlayOneShot(BombGroan[rand]); InsideAudio.PlayOneShot(BombGroanInside[rand]); BombQuakeParticle.Play(); } private IEnumerator BombFlashEffectCoroutine() { FlashEvent.Invoke(); ((Behaviour)FlashLight).enabled = true; OutsideAudio.PlayOneShot(OutsideBleep); InsideAudio.PlayOneShot(InsideBleep); ((Renderer)LightMesh).material = LightOnMat; yield return (object)new WaitForSeconds(0.5f); ((Renderer)LightMesh).material = LightOffMat; ((Behaviour)FlashLight).enabled = false; } private IEnumerator ExplodeBombCoroutine() { FlashEvent.Invoke(); ((Behaviour)FlashLight).enabled = true; OutsideAudio.PlayOneShot(OutsideBleep); InsideAudio.PlayOneShot(InsideBleep); ((Renderer)LightMesh).materials[1] = LightOnMat; yield return (object)new WaitForSeconds(8f); ExplodeEvent.Invoke(); ((Behaviour)FlashLight).enabled = false; OutsideAudio.PlayOneShot(BombExplode); InsideAudio.PlayOneShot(BombExplodeInside); foreach (MeshRenderer mesh in Meshes) { ((Renderer)mesh).enabled = false; } yield return (object)new WaitForSeconds(0.5f); GameNetworkManager.Instance.localPlayerController.DamagePlayer(999, true, true, (CauseOfDeath)3, 6, false, default(Vector3)); HUDManager.Instance.flashFilter = 2f; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3274580338u, new RpcReceiveHandler(__rpc_handler_3274580338), "BombExplodeClientRpc"); ((NetworkBehaviour)this).__registerRpc(1202514326u, new RpcReceiveHandler(__rpc_handler_1202514326), "BombFlashClientRpc"); ((NetworkBehaviour)this).__registerRpc(1088566777u, new RpcReceiveHandler(__rpc_handler_1088566777), "BombChargeDecreaseEffectsClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3274580338(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; ((CoreHeaterBomb)(object)target).BombExplodeClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1202514326(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; ((CoreHeaterBomb)(object)target).BombFlashClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1088566777(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; ((CoreHeaterBomb)(object)target).BombChargeDecreaseEffectsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CoreHeaterBomb"; } } internal class DistanceDestroyer : MonoBehaviour { public Vector3 CheckPosition = new Vector3(0f, 0f, -14f); public int Distance = 16; private void Awake() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) if (Vector3.Distance(((Component)this).transform.position, CheckPosition) < (float)Distance) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } internal class ClientSeatedCheck : MonoBehaviour { private bool IsSeated = false; public InteractTrigger TriggerA; public InteractTrigger TriggerB; public InteractTrigger TriggerC; public InteractTrigger TriggerD; public void SetSeated() { IsSeated = true; TriggerA.interactable = true; TriggerB.interactable = true; TriggerC.interactable = true; TriggerD.interactable = true; } public void SetSeatedOtherClients() { TriggerA.interactable = true; TriggerC.interactable = true; } public void SetUnSeatedOtherClients() { TriggerA.interactable = false; TriggerC.interactable = false; } public void SetUnSeated() { IsSeated = false; TriggerA.interactable = false; TriggerB.interactable = false; TriggerC.interactable = false; TriggerD.interactable = false; } } internal class ClipboardItemButCool : GrabbableObject { public bool truckManual; public bool ThatOneCheckThatLagsTheGame = false; private bool parentedToTruck; public int currentPage = 1; public int maxPages = 4; public Animator clipboardAnimator; public AudioClip[] turnPageSFX; public AudioSource thisAudio; public override void Update() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (parentedToTruck) { return; } if (StartOfRound.Instance.inShipPhase) { parentedToTruck = true; } else if (ThatOneCheckThatLagsTheGame) { VehicleController val = Object.FindObjectOfType(); if ((Object)(object)val != (Object)null) { parentedToTruck = true; base.parentObject = null; ((Component)this).transform.SetParent(((Component)val).transform, true); base.fallTime = 0f; ((Component)this).transform.localScale = base.originalScale; Vector3 localPosition = val.clipboardPosition.localPosition; base.targetFloorPosition = localPosition; } } } public override void PocketItem() { if (((NetworkBehaviour)this).IsOwner && (Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.equippedUsableItemQE = false; base.isBeingUsed = false; } ((GrabbableObject)this).PocketItem(); } public override void ItemInteractLeftRight(bool right) { int num = currentPage; ((GrabbableObject)this).RequireCooldown(); if (right) { currentPage = Mathf.Clamp(currentPage + 1, 1, maxPages); } else { currentPage = Mathf.Clamp(currentPage - 1, 1, maxPages); } if (currentPage != num) { RoundManager.PlayRandomClip(thisAudio, turnPageSFX, true, 1f, 0, 1000); } clipboardAnimator.SetInteger("page", currentPage); } public override void DiscardItem() { if ((Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.equippedUsableItemQE = false; } base.isBeingUsed = false; ((GrabbableObject)this).DiscardItem(); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); base.playerHeldBy.equippedUsableItemQE = true; if (((NetworkBehaviour)this).IsOwner) { HUDManager.Instance.DisplayTip("To read the manual:", "Press Z to inspect closely. Press Q and E to flip the pages.", false, true, "LCTip_UseManual"); } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "ClipboardItemButCool"; } } public class CodeGenerator : MonoBehaviour { public int CodeLength = 4; public string GeneratedCode = ""; public int[] intCode; private void Awake() { intCode = new int[CodeLength]; } public string GenerateCode() { string text = ""; for (int i = 0; i < 4; i++) { int num = Random.Range(0, 10); text += num; intCode[i] = num; } GeneratedCode = text; return GeneratedCode; } } internal class CodeHintObject : MonoBehaviour { public TMP_Text TMP_Text; public int HintId = 1; } internal class CodepadController : NetworkBehaviour { public CodeGenerator CodeGenerator; public MorseCodePlayer MorseCodePlayer; public string Code = ""; private string InputCode = ""; private string DisplayCode = ">"; private bool AllowInput = true; public bool Completed = false; public bool UseCodeHint = true; [SerializeField] private AudioSource CodepadSfx; [SerializeField] private List ButtonSounds; [SerializeField] private AudioClip FailSound; [SerializeField] private AudioClip CompleteSound; public TMP_Text ScreenText; public UnityEvent CorrectInputHostEvent; private CodeHintObject HintObject; public int CodeHintId = 0; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } [ServerRpc(RequireOwnership = true)] private void GetCodeServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1957657180u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1957657180u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; GetCode(); } } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); GetCodeServerRpc(); } private void GetCode() { Code = CodeGenerator.GenerateCode(); SetCodeClientRpc(Code); } [ClientRpc] private void SetCodeClientRpc(string code) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3476026144u, val2, (RpcDelivery)0); bool flag = code != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(code, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3476026144u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (CodeHintId != 0) { CodeHintObject[] array = Object.FindObjectsByType((FindObjectsSortMode)0); CodeHintObject[] array2 = array; foreach (CodeHintObject codeHintObject in array2) { if (codeHintObject.HintId == CodeHintId) { HintObject = codeHintObject; if (((Object)(object)HintObject != (Object)null) & UseCodeHint) { HintObject.TMP_Text.text = code; } } } } Code = code; MorseCodePlayer?.StartMorseCode(); } private void UpdateScreenText(string text) { ScreenText.text = ">" + text; } public void NumberPressed(int number) { if (AllowInput) { UpdateCodepadNumbersServerRpc(number); } } [ServerRpc(RequireOwnership = false)] private void UpdateCodepadNumbersServerRpc(int number) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(305515824u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, number); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 305515824u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; bool flag = false; bool fullCode = false; InputCode += number; if (InputCode.Length >= Code.Length) { fullCode = true; flag = InputCode.Equals(Code); } if (flag) { CorrectInputHostEvent.Invoke(); } UpdateCodePadClientRpc(flag, fullCode, InputCode); } } [ClientRpc] private void UpdateCodePadClientRpc(bool match, bool fullCode, string inputCode) { //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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2235464930u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref match, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref fullCode, default(ForPrimitives)); bool flag = inputCode != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(inputCode, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2235464930u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int index = Random.Range(0, ButtonSounds.Count); CodepadSfx.PlayOneShot(ButtonSounds[index], 1f); if (fullCode) { AllowInput = false; ((MonoBehaviour)this).StartCoroutine(FullCodeSequenceCoroutine(match)); } UpdateScreenText(inputCode); } } private IEnumerator FullCodeSequenceCoroutine(bool match) { yield return (object)new WaitForSeconds(0.3f); if (match) { CodepadSfx.PlayOneShot(CompleteSound); } else { CodepadSfx.PlayOneShot(FailSound); } yield return (object)new WaitForSeconds(1.2f); if (!match) { AllowInput = true; InputCode = ""; UpdateScreenText(InputCode); } else { Completed = true; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1957657180u, new RpcReceiveHandler(__rpc_handler_1957657180), "GetCodeServerRpc"); ((NetworkBehaviour)this).__registerRpc(3476026144u, new RpcReceiveHandler(__rpc_handler_3476026144), "SetCodeClientRpc"); ((NetworkBehaviour)this).__registerRpc(305515824u, new RpcReceiveHandler(__rpc_handler_305515824), "UpdateCodepadNumbersServerRpc"); ((NetworkBehaviour)this).__registerRpc(2235464930u, new RpcReceiveHandler(__rpc_handler_2235464930), "UpdateCodePadClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1957657180(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((CodepadController)(object)target).GetCodeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3476026144(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 codeClientRpc = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref codeClientRpc, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((CodepadController)(object)target).SetCodeClientRpc(codeClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_305515824(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 number = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref number); target.__rpc_exec_stage = (__RpcExecStage)1; ((CodepadController)(object)target).UpdateCodepadNumbersServerRpc(number); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2235464930(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_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 match = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref match, default(ForPrimitives)); bool fullCode = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref fullCode, default(ForPrimitives)); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string inputCode = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref inputCode, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((CodepadController)(object)target).UpdateCodePadClientRpc(match, fullCode, inputCode); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CodepadController"; } } internal class CodePadNumber : MonoBehaviour { public int CodepadNumber; [SerializeField] private CodepadController codepad; public void PressNumber() { codepad.NumberPressed(CodepadNumber); } } internal class Compactor : NetworkBehaviour { public Animator CompactorAnimator; public Animator CompactorEmergencyDoors; public ParticleSystem CompactorParticles; public AudioSource CompactorMovingSfx; public AudioSource CompactorSfx; public AudioSource SheetSfx; public AudioSource EmergencyDoors; public AudioClip CompactorStartClip; public AudioClip CompactorJamClip; public AudioClip CompactorUnJamClip; public AudioClip CompactorFinishClip; public AudioClip SheetJamCompactorClip; public List SheetDestroyClips; public ParticleSystem SheetBreakParticles; public ParticleSystem GearsStuckParticles; public Renderer SheetRenderer; public InteractTrigger JamTrigger; public InteractTrigger StartTrigger; public float CompactorCompleteTime = 30f; public float CompactorPlayerDifficultyMultiplier = 1.08f; public float InitialJamTime = 14f; public float SheetJamTime = 24f; private float SheetJamTimeFinal; private float CompactorProgressTime; private bool CompactorStarted; private bool CompactorFinished; private float CompactorProgress; private float CompactorTravelSpeed; private float JammedTime; private bool Jammed; public int SequencesRequired = 4; private int SequencesCompleted = 0; private bool HasSetDifficulty = false; private List PlayersInCompactor = new List(); private void OnTriggerEnter(Collider other) { if (((Component)other).tag == "Player") { PlayerControllerB component = ((Component)other).GetComponent(); if ((Object)(object)component != (Object)null) { PlayersInCompactor.Add(component); } } } private void OnTriggerExit(Collider other) { if (((Component)other).tag == "Player") { PlayerControllerB component = ((Component)other).GetComponent(); if ((Object)(object)component != (Object)null) { PlayersInCompactor.Remove(component); } } } public void StartCompactor() { StartCompactorServerRpc(); } [ServerRpc(RequireOwnership = false)] private void StartCompactorServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2373674538u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2373674538u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CompactorStarted = true; StartCompactorClientRpc(); } } } [ClientRpc] private void StartCompactorClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1172336419u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1172336419u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; StartTrigger.interactable = false; CompactorStarted = true; Jammed = true; JammedTime = InitialJamTime; CompactorMovingSfx.volume = 0f; CompactorMovingSfx.pitch = 0.5f; CompactorSfx.PlayOneShot(CompactorStartClip); CompactorMovingSfx.Play(); GearsStuckParticles.Play(); CompactorAnimator.SetTrigger("close"); } } } private void SetDifficulty() { int count = PlayersInCompactor.Count; float num = 1f; if (count > 1) { num = CompactorPlayerDifficultyMultiplier * (float)(count - 1); } SheetJamTimeFinal = SheetJamTime / num; CompactorCompleteTime /= num; SetDifficultyClientRpc(SheetJamTimeFinal, CompactorCompleteTime); } [ClientRpc] private void SetDifficultyClientRpc(float jamTime, float completeTime) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2578882139u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref jamTime, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref completeTime, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2578882139u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SheetJamTimeFinal = jamTime; CompactorCompleteTime = completeTime; } } } private void Update() { if (!CompactorStarted || CompactorFinished) { return; } CompactorMovingSfx.volume = 0.3f + 0.8f * CompactorTravelSpeed; CompactorMovingSfx.pitch = 0.5f + 0.5f * CompactorTravelSpeed + 0.3f * CompactorProgress; CompactorAnimator.SetFloat("compactorProgress", CompactorProgress); if (Jammed) { if (JammedTime > 0f) { JammedTime -= Time.deltaTime; return; } Jammed = false; UnJamCompactor(); return; } if (CompactorTravelSpeed < 1f) { CompactorTravelSpeed += Time.deltaTime * 0.5f; } if (CompactorProgressTime < CompactorCompleteTime) { CompactorProgressTime += Time.deltaTime * CompactorTravelSpeed; CompactorProgress = 1f / CompactorCompleteTime * CompactorProgressTime; } else { CompactorFinishServerRpc(); CompactorFinished = true; } } [ServerRpc] private void CompactorFinishServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1737540935u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1737540935u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CompactorFinished = true; CompactorFinishClientRpc(); } } [ClientRpc] private void CompactorFinishClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2690664585u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2690664585u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CompactorFinished = true; CompactorTravelSpeed = 0f; SheetRenderer.enabled = false; GearsStuckParticles.Stop(); CompactorSfx.PlayOneShot(CompactorFinishClip); CompactorMovingSfx.Stop(); JamTrigger.interactable = false; CompactorParticles.Stop(); } } } private void UnJamCompactor() { CompactorSfx.PlayOneShot(CompactorUnJamClip); SheetRenderer.enabled = false; GearsStuckParticles.Stop(); JamTrigger.interactable = true; SheetBreakParticles.Play(); CompactorParticles.Play(); int index = Random.Range(0, SheetDestroyClips.Count); SheetSfx.PlayOneShot(SheetDestroyClips[index]); if (((NetworkBehaviour)this).IsServer && !HasSetDifficulty) { HasSetDifficulty = true; SetDifficulty(); } } [ServerRpc(RequireOwnership = false)] public void JamCompactorServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4162736399u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4162736399u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!Jammed) { JamCompactorClientRpc(); Jammed = true; } } } [ClientRpc] private void JamCompactorClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(23980817u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 23980817u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Jammed = true; JammedTime = SheetJamTimeFinal; CompactorTravelSpeed = 0f; SheetRenderer.enabled = true; CompactorSfx.PlayOneShot(CompactorJamClip); CompactorMovingSfx.volume = 0.3f; CompactorMovingSfx.pitch = 0.5f; JamTrigger.interactable = false; SheetSfx.PlayOneShot(SheetJamCompactorClip); GearsStuckParticles.Play(); CompactorParticles.Stop(); } } } public void IncreaseSequenceCompletion() { SequencesCompleted++; if (SequencesCompleted == SequencesRequired) { OpenEmergencyDoorsClientRpc(); } } [ClientRpc] private void OpenEmergencyDoorsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1453636682u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1453636682u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; EmergencyDoors.Play(); CompactorEmergencyDoors.SetTrigger("open"); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2373674538u, new RpcReceiveHandler(__rpc_handler_2373674538), "StartCompactorServerRpc"); ((NetworkBehaviour)this).__registerRpc(1172336419u, new RpcReceiveHandler(__rpc_handler_1172336419), "StartCompactorClientRpc"); ((NetworkBehaviour)this).__registerRpc(2578882139u, new RpcReceiveHandler(__rpc_handler_2578882139), "SetDifficultyClientRpc"); ((NetworkBehaviour)this).__registerRpc(1737540935u, new RpcReceiveHandler(__rpc_handler_1737540935), "CompactorFinishServerRpc"); ((NetworkBehaviour)this).__registerRpc(2690664585u, new RpcReceiveHandler(__rpc_handler_2690664585), "CompactorFinishClientRpc"); ((NetworkBehaviour)this).__registerRpc(4162736399u, new RpcReceiveHandler(__rpc_handler_4162736399), "JamCompactorServerRpc"); ((NetworkBehaviour)this).__registerRpc(23980817u, new RpcReceiveHandler(__rpc_handler_23980817), "JamCompactorClientRpc"); ((NetworkBehaviour)this).__registerRpc(1453636682u, new RpcReceiveHandler(__rpc_handler_1453636682), "OpenEmergencyDoorsClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2373674538(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; ((Compactor)(object)target).StartCompactorServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1172336419(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; ((Compactor)(object)target).StartCompactorClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2578882139(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float jamTime = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref jamTime, default(ForPrimitives)); float completeTime = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref completeTime, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Compactor)(object)target).SetDifficultyClientRpc(jamTime, completeTime); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1737540935(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((Compactor)(object)target).CompactorFinishServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2690664585(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; ((Compactor)(object)target).CompactorFinishClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4162736399(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; ((Compactor)(object)target).JamCompactorServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_23980817(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; ((Compactor)(object)target).JamCompactorClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1453636682(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; ((Compactor)(object)target).OpenEmergencyDoorsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Compactor"; } } internal class ContainmentNumber : MonoBehaviour { public List Numbers; public MeshRenderer Renderer; public void SetNumber(int number) { ((Renderer)Renderer).material.SetTexture("_BaseColorMap", (Texture)(object)Numbers[number]); } } internal class CrashPoint : NetworkBehaviour { private int ResearchShipState = 0; public int CrashShipId = 0; private bool ShipCrashed; private bool ScrapCrashed; public bool IsResearchShip; public bool IsResearchScrap; public float RandomImpactTime = 1f; private bool HasCrashed; private bool WillCrash; public UnityEvent PreCrashEventShip; public UnityEvent PreCrashEventScrap; public UnityEvent CrashEvent; public GameObject DisableObject; private int PlayersLoaded; private bool HasInitialised; public override void OnNetworkSpawn() { DisableObject.SetActive(false); ((NetworkBehaviour)this).OnNetworkSpawn(); NotifyServerRpc(); if (((NetworkBehaviour)this).IsServer) { ((MonoBehaviour)this).StartCoroutine(WaitForPlayersCoroutine()); ((MonoBehaviour)this).StartCoroutine(ExtraWaitCoroutine()); } } private IEnumerator WaitForPlayersCoroutine() { while (PlayersLoaded < GameNetworkManager.Instance.connectedPlayers) { yield return null; } yield return (object)new WaitForSeconds(1f); InitialiseEvent(); } private IEnumerator ExtraWaitCoroutine() { yield return (object)new WaitForSeconds(12f); InitialiseEvent(); } [ServerRpc(RequireOwnership = false)] private void NotifyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1960272048u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1960272048u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayersLoaded++; } } } private void InitialiseEvent() { if (HasInitialised) { return; } HasInitialised = true; ResearchShipState = WesleysInteriorToolsPlugin.CurrentSave.GetShipState(); ShipCrashed = WesleysInteriorToolsPlugin.CurrentSave.GetShipCrashed(); ScrapCrashed = WesleysInteriorToolsPlugin.CurrentSave.GetScrapCrashedState(CrashShipId); RandomImpactTime = Random.Range(0.1f, 0.5f); if (IsResearchShip && ResearchShipState == 2) { if (ShipCrashed) { CrashEventClientRpc(0); } else { RandomImpactTime = 0.55f; WillCrash = true; } } if (IsResearchScrap && ResearchShipState == 1) { bool flag = Random.Range(0f, 1f) > 0.5f; if (ScrapCrashed) { CrashEventClientRpc(1); } else if (flag) { WillCrash = true; } } } private void Update() { if (((NetworkBehaviour)this).IsServer && WillCrash) { float num = TimeOfDay.Instance.currentDayTime / TimeOfDay.Instance.totalTime; if (!HasCrashed && num > RandomImpactTime && IsResearchScrap) { HasCrashed = true; WesleysInteriorToolsPlugin.CurrentSave.SetScrapCrashed(CrashShipId); CrashEventClientRpc(2); } if (!HasCrashed && num > RandomImpactTime && IsResearchShip) { HasCrashed = true; WesleysInteriorToolsPlugin.CurrentSave.SetShipCrashed(value: true); CrashEventClientRpc(2); } } } [ClientRpc] private void CrashEventClientRpc(int crashType) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(669758457u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, crashType); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 669758457u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; switch (crashType) { case 0: PreCrashEventShip.Invoke(); DisableObject.SetActive(true); break; case 1: PreCrashEventScrap.Invoke(); DisableObject.SetActive(true); break; case 2: CrashEvent.Invoke(); break; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1960272048u, new RpcReceiveHandler(__rpc_handler_1960272048), "NotifyServerRpc"); ((NetworkBehaviour)this).__registerRpc(669758457u, new RpcReceiveHandler(__rpc_handler_669758457), "CrashEventClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1960272048(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; ((CrashPoint)(object)target).NotifyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_669758457(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 crashType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref crashType); target.__rpc_exec_stage = (__RpcExecStage)1; ((CrashPoint)(object)target).CrashEventClientRpc(crashType); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CrashPoint"; } } internal class CreatureDeathObjective : NetworkBehaviour { private OptionalObjectiveController Controller; public string ObjectiveName; public void CreatureDeath() { if (((NetworkBehaviour)this).IsServer) { Controller = Object.FindFirstObjectByType(); Controller.ReceiveObjectiveCompletion(ObjectiveName); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "CreatureDeathObjective"; } } internal class CrossButton : NetworkBehaviour { public CrossButtonPuzzleController Controller; public List SurroundingButtons; public bool Pressed = false; public Animator ButtonAnimator; public AudioSource AudioSource; public AudioClip Press; public AudioClip Unpress; public InteractTrigger InteractTrigger; public void FlipButton(bool playerSwitch) { FlipButtonServerRpc(playerSwitch); } [ServerRpc(RequireOwnership = false)] private void FlipButtonServerRpc(bool playerSwitch) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(794966834u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref playerSwitch, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 794966834u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (Pressed) { Pressed = false; } else { Pressed = true; } FlipButtonVisualsClientRpc(Pressed, playerSwitch); if (playerSwitch) { foreach (CrossButton surroundingButton in SurroundingButtons) { surroundingButton.FlipButton(playerSwitch: false); } } Controller.StartCheckDelay(); } [ClientRpc] private void FlipButtonVisualsClientRpc(bool pressed, bool byPlayer) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3936393107u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pressed, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref byPlayer, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3936393107u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; ButtonAnimator.SetBool("pressed", pressed); if (byPlayer) { if (pressed) { AudioSource.PlayOneShot(Press); } else { AudioSource.PlayOneShot(Unpress); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(794966834u, new RpcReceiveHandler(__rpc_handler_794966834), "FlipButtonServerRpc"); ((NetworkBehaviour)this).__registerRpc(3936393107u, new RpcReceiveHandler(__rpc_handler_3936393107), "FlipButtonVisualsClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_794966834(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 playerSwitch = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerSwitch, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CrossButton)(object)target).FlipButtonServerRpc(playerSwitch); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3936393107(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool pressed = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pressed, default(ForPrimitives)); bool byPlayer = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref byPlayer, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CrossButton)(object)target).FlipButtonVisualsClientRpc(pressed, byPlayer); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CrossButton"; } } internal class CrossButtonPuzzleController : NetworkBehaviour { public List CrossButtons; public AudioSource AudioSource; public AudioClip CompletionClip; public UnityEvent UnityEvent; public ParticleSystem ParticleSystem; private bool Completed; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePuzzle(); } private void InitialisePuzzle() { InitialisePuzzleServerRpc(); } [ServerRpc] private void InitialisePuzzleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(234376872u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 234376872u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; List list = new List(); list.AddRange(CrossButtons); int num = CrossButtons.Count / 2; for (int i = 0; i < num; i++) { int index = Random.Range(0, list.Count); list[index].FlipButton(playerSwitch: false); list.RemoveAt(index); } list.Clear(); } } public void StartCheckDelay() { ((MonoBehaviour)this).StartCoroutine(CheckDelayCoroutine()); } public void CheckAllButtons() { bool flag = true; foreach (CrossButton crossButton in CrossButtons) { if (!crossButton.Pressed) { flag = false; break; } } if (flag && !Completed) { FinishControllerClientRpc(); UnityEvent.Invoke(); Completed = true; } } private IEnumerator CheckDelayCoroutine() { yield return (object)new WaitForSeconds(0.3f); CheckAllButtons(); } [ClientRpc] private void FinishControllerClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1835662499u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1835662499u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; AudioSource.PlayOneShot(CompletionClip); ParticleSystem.Play(); foreach (CrossButton crossButton in CrossButtons) { crossButton.InteractTrigger.interactable = false; crossButton.ButtonAnimator.SetBool("pressed", true); crossButton.Pressed = true; } } public void AltPuzzleCompletion() { if (!Completed) { FinishControllerClientRpc(); UnityEvent.Invoke(); Completed = true; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(234376872u, new RpcReceiveHandler(__rpc_handler_234376872), "InitialisePuzzleServerRpc"); ((NetworkBehaviour)this).__registerRpc(1835662499u, new RpcReceiveHandler(__rpc_handler_1835662499), "FinishControllerClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_234376872(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((CrossButtonPuzzleController)(object)target).InitialisePuzzleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1835662499(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; ((CrossButtonPuzzleController)(object)target).FinishControllerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CrossButtonPuzzleController"; } } internal class CuttableWire : NetworkBehaviour { public WirePuzzleController WirePuzzleController; public TMP_Text Label; public Renderer WireRenderer; public Renderer CutWireRenderer; public InteractTrigger InteractTrigger; public AudioSource AudioSource; public AudioClip CutwireClip; public AudioClip ElectrocutePlayerClip; public ParticleSystem ParticleSystem; public int WireHazardId; public bool HasWire; public void CutWire(PlayerControllerB player) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) CutWireServerRpc(); if (!HasWire) { player.DamagePlayer(90, true, true, (CauseOfDeath)11, 3, false, default(Vector3)); } } [ServerRpc(RequireOwnership = false)] private void CutWireServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2392187933u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2392187933u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CutWireClientRpc(); if (HasWire) { WirePuzzleController.CutWireDisableHazardClientRpc(WireHazardId); } } } [ClientRpc] private void CutWireClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(574202298u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 574202298u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; WireRenderer.enabled = false; CutWireRenderer.enabled = true; InteractTrigger.interactable = false; if (HasWire) { AudioSource.PlayOneShot(CutwireClip); return; } AudioSource.PlayOneShot(ElectrocutePlayerClip); ParticleSystem.Play(); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2392187933u, new RpcReceiveHandler(__rpc_handler_2392187933), "CutWireServerRpc"); ((NetworkBehaviour)this).__registerRpc(574202298u, new RpcReceiveHandler(__rpc_handler_574202298), "CutWireClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2392187933(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; ((CuttableWire)(object)target).CutWireServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_574202298(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; ((CuttableWire)(object)target).CutWireClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CuttableWire"; } } internal class DarkSpring : EnemyAI { public AISearchRoutine searchForPlayers; private bool stoppingMovement; private bool hasStopped; public AnimationStopPoints animStopPoints; private float currentChaseSpeed = 14.5f; private float currentAnimSpeed = 1f; private PlayerControllerB previousTarget; private bool wasOwnerLastFrame; private float stopAndGoMinimumInterval; private float hitPlayerTimer; public AudioClip[] springNoises; public AudioClip enterCooldownSFX; public Collider mainCollider; private float loseAggroTimer; private float timeSinceHittingPlayer; private Coroutine offMeshLinkCoroutine; private float stopMovementTimer; public float timeSpentMoving; public float onCooldownPhase; private bool setOnCooldown; public float timeAtLastCooldown; private bool inCooldownAnimation; private Vector3 previousPosition; private float checkPositionInterval; private bool isMakingDistance; [ServerRpc(RequireOwnership = false)] public void SetCoilheadOnCooldownServerRpc(bool setTrue) { //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(1644662290u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setTrue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1644662290u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetCoilheadOnCooldownClientRpc(setTrue); } } } [ClientRpc] public void SetCoilheadOnCooldownClientRpc(bool setTrue) { //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(179287993u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setTrue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 179287993u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; timeSpentMoving = 0f; if (setTrue) { onCooldownPhase = 20f; setOnCooldown = true; inCooldownAnimation = true; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(0); base.creatureVoice.PlayOneShot(enterCooldownSFX); } else { onCooldownPhase = 0f; setOnCooldown = false; timeAtLastCooldown = Time.realtimeSinceStartup; } } } public bool PlayerHasHorizontalLOS(PlayerControllerB player) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)this).transform.position - ((Component)player).transform.position; val.y = 0f; return Vector3.Angle(((Component)player).transform.forward, val) < 68f; } public override void DoAIInterval() { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: 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_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.allPlayersDead || base.isEnemyDead) { return; } switch (base.currentBehaviourStateIndex) { case 0: { if (!((NetworkBehaviour)this).IsServer) { ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); break; } if (onCooldownPhase > 0f) { base.agent.speed = 0f; ((EnemyAI)this).SetDestinationToPosition(((Component)this).transform.position, false); onCooldownPhase -= base.AIIntervalTime; break; } if (setOnCooldown) { setOnCooldown = false; SetCoilheadOnCooldownClientRpc(setTrue: false); } loseAggroTimer = 0f; for (int j = 0; j < StartOfRound.Instance.allPlayerScripts.Length; j++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[j], false, false, true)) { if ((StartOfRound.Instance.allPlayerScripts[j].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.25f, 68f, 60, -1f, -1) || StartOfRound.Instance.allPlayerScripts[j].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 1.6f, 68f, 60, -1f, -1)) && PlayerHasHorizontalLOS(StartOfRound.Instance.allPlayerScripts[j])) { base.targetPlayer = StartOfRound.Instance.allPlayerScripts[j]; ((EnemyAI)this).SwitchToBehaviourState(1); } if (!((EnemyAI)this).PathIsIntersectedByLineOfSight(((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position, false, false, false) && !Physics.Linecast(((Component)this).transform.position + Vector3.up * 0.5f, ((Component)StartOfRound.Instance.allPlayerScripts[j].gameplayCamera).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault) && Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position) < 30f) { ((EnemyAI)this).SwitchToBehaviourState(1); return; } } } base.agent.speed = 6f; if (!searchForPlayers.inProgress) { base.movingTowardsTargetPlayer = false; ((EnemyAI)this).SetDestinationToPosition(((Component)this).transform.position, false); ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } break; } case 1: { if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } if (((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f, false, false, true)) { if ((Object)(object)previousTarget != (Object)(object)base.targetPlayer) { previousTarget = base.targetPlayer; ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); } if (!(Time.realtimeSinceStartup - timeSinceHittingPlayer > 7f) || stoppingMovement) { break; } if (Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position) > 40f && !((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer.gameplayCamera).transform.position, 180f, 140, -1f, (Transform)null)) { loseAggroTimer += base.AIIntervalTime; if (loseAggroTimer > 4.5f) { ((EnemyAI)this).SwitchToBehaviourState(0); ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); } } else { loseAggroTimer = 0f; } break; } bool flag = false; for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if ((StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.6f, 68f, 60, -1f, -1) || StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 3f, 68f, 60, -1f, -1)) && PlayerHasHorizontalLOS(StartOfRound.Instance.allPlayerScripts[i])) { flag = true; break; } } if (!flag) { loseAggroTimer += base.AIIntervalTime; if (loseAggroTimer > 1f) { ((EnemyAI)this).SwitchToBehaviourState(0); ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); } } break; } } } private IEnumerator Parabola(NavMeshAgent agent, float height, float duration) { OffMeshLinkData data = agent.currentOffMeshLinkData; Vector3 startPos = ((Component)agent).transform.position; Vector3 endPos = ((OffMeshLinkData)(ref data)).endPos + Vector3.up * agent.baseOffset; float normalizedTime = 0f; while (normalizedTime < 1f && ((OffMeshLinkData)(ref data)).valid && ((OffMeshLinkData)(ref data)).activated && ((NetworkBehaviour)this).IsOwner) { float num = height * 4f * (normalizedTime - normalizedTime * normalizedTime); ((Component)agent).transform.position = Vector3.Lerp(startPos, endPos, normalizedTime) + num * Vector3.up; normalizedTime += Time.deltaTime / duration; yield return null; } agent.CompleteOffMeshLink(); offMeshLinkCoroutine = null; } private void StopOffMeshLinkMovement() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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) if (offMeshLinkCoroutine == null) { return; } ((MonoBehaviour)this).StopCoroutine(offMeshLinkCoroutine); offMeshLinkCoroutine = null; OffMeshLinkData currentOffMeshLinkData = base.agent.currentOffMeshLinkData; base.agent.CompleteOffMeshLink(); if (((OffMeshLinkData)(ref currentOffMeshLinkData)).valid) { if (Vector3.Distance(((Component)this).transform.position, ((OffMeshLinkData)(ref currentOffMeshLinkData)).startPos) < Vector3.Distance(((Component)this).transform.position, ((OffMeshLinkData)(ref currentOffMeshLinkData)).endPos)) { base.agent.Warp(((OffMeshLinkData)(ref currentOffMeshLinkData)).startPos); } else { base.agent.Warp(((OffMeshLinkData)(ref currentOffMeshLinkData)).endPos); } } } private void DoSpringAnimation(bool springPopUp = false) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.6f, 70f, 25, -1f, -1)) { float num = Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); if (num < 4f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.9f, true); } else if (num < 9f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.4f, true); } } if (currentAnimSpeed > 2f || springPopUp) { RoundManager.PlayRandomClip(base.creatureVoice, springNoises, false, 1f, 0, 1000); if (animStopPoints.animationPosition == 1) { base.creatureAnimator.SetTrigger("springBoing"); } else { base.creatureAnimator.SetTrigger("springBoingPosition2"); } } } public override void Update() { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0631: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_0654: Unknown result type (might be due to invalid IL or missing references) //IL_0659: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead) { return; } if (hitPlayerTimer >= 0f) { hitPlayerTimer -= Time.deltaTime; } if (!((NetworkBehaviour)this).IsOwner) { stopMovementTimer = 5f; loseAggroTimer = 0f; if (offMeshLinkCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(offMeshLinkCoroutine); } } if (((NetworkBehaviour)this).IsOwner) { if (base.agent.isOnOffMeshLink) { if (!stoppingMovement) { OffMeshLinkData currentOffMeshLinkData = base.agent.currentOffMeshLinkData; if (((OffMeshLinkData)(ref currentOffMeshLinkData)).activated) { if (offMeshLinkCoroutine == null) { offMeshLinkCoroutine = ((MonoBehaviour)this).StartCoroutine(Parabola(base.agent, 0.6f, 0.5f)); } goto IL_0124; } } StopOffMeshLinkMovement(); } else if (offMeshLinkCoroutine != null) { StopOffMeshLinkMovement(); } } goto IL_0124; IL_0124: base.creatureAnimator.SetBool("OnCooldown", setOnCooldown); if (setOnCooldown) { mainCollider.isTrigger = true; stoppingMovement = true; hasStopped = true; return; } switch (base.currentBehaviourStateIndex) { case 0: base.agent.autoTraverseOffMeshLink = false; base.creatureAnimator.SetFloat("walkSpeed", 4.7f); stoppingMovement = false; hasStopped = false; break; case 1: { if (((NetworkBehaviour)this).IsOwner) { if (onCooldownPhase > 0f) { ((EnemyAI)this).SwitchToBehaviourState(0); break; } if (stopAndGoMinimumInterval > 0f) { stopAndGoMinimumInterval -= Time.deltaTime; } if (!wasOwnerLastFrame) { wasOwnerLastFrame = true; if (!stoppingMovement && hitPlayerTimer < 0.12f) { base.agent.speed = currentChaseSpeed; } else { base.agent.speed = 0f; } } bool flag = false; for (int i = 0; i < 4; i++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true) && (StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.6f, 68f, 60, -1f, -1) || StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 3f, 68f, 60, -1f, -1)) && PlayerHasHorizontalLOS(StartOfRound.Instance.allPlayerScripts[i]) && Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, base.eye.position) > 0.3f) { flag = true; } } if (base.stunNormalizedTimer > 0f) { flag = true; } if (flag != stoppingMovement && stopAndGoMinimumInterval <= 0f) { stopAndGoMinimumInterval = 0.15f; if (flag) { SetAnimationStopServerRpc(); } else { SetAnimationGoServerRpc(); } stoppingMovement = flag; } } float num = 0f; if (stoppingMovement) { if (animStopPoints.canAnimationStop || stopMovementTimer > 0.27f) { if (!hasStopped) { hasStopped = true; DoSpringAnimation(); } else if (inCooldownAnimation) { inCooldownAnimation = false; DoSpringAnimation(springPopUp: true); } if ((Object)(object)RoundManager.Instance.currentMineshaftElevator != (Object)null && Vector3.Distance(((Component)this).transform.position, RoundManager.Instance.currentMineshaftElevator.elevatorInsidePoint.position) < 1f) { num = 0.5f; } if (mainCollider.isTrigger && Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position) > 0.75f) { mainCollider.isTrigger = false; } base.creatureAnimator.SetFloat("walkSpeed", 0f); currentAnimSpeed = 0f; if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = 0f; base.movingTowardsTargetPlayer = false; ((EnemyAI)this).SetDestinationToPosition(((Component)this).transform.position, false); } } else { stopMovementTimer += Time.deltaTime; } } else { stopMovementTimer = 0f; if (hasStopped) { hasStopped = false; mainCollider.isTrigger = true; isMakingDistance = true; } currentAnimSpeed = Mathf.Lerp(currentAnimSpeed, 6f, 5f * Time.deltaTime); base.creatureAnimator.SetFloat("walkSpeed", currentAnimSpeed); inCooldownAnimation = false; if (((NetworkBehaviour)this).IsServer) { if (checkPositionInterval <= 0f) { checkPositionInterval = 0.65f; isMakingDistance = Vector3.Distance(((Component)this).transform.position, previousPosition) > 0.5f; previousPosition = ((Component)this).transform.position; } else { checkPositionInterval -= Time.deltaTime; } num = ((!isMakingDistance) ? 0.2f : 1f); } if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = Mathf.Lerp(base.agent.speed, currentChaseSpeed, 4.5f * Time.deltaTime); base.movingTowardsTargetPlayer = true; } } if (((NetworkBehaviour)this).IsServer) { if (num > 0f) { timeSpentMoving += Time.deltaTime * num; } if (timeSpentMoving > 9f) { onCooldownPhase = 11f; setOnCooldown = true; inCooldownAnimation = true; SetCoilheadOnCooldownClientRpc(setTrue: true); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(0); } } break; } } } [ServerRpc] public void SetAnimationStopServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2508407444u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2508407444u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetAnimationStopClientRpc(); } } [ClientRpc] public void SetAnimationStopClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2398162194u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2398162194u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stoppingMovement = true; } } } [ServerRpc] public void SetAnimationGoServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4127704327u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4127704327u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetAnimationGoClientRpc(); } } [ClientRpc] public void SetAnimationGoClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1406788356u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1406788356u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stoppingMovement = false; } } } public override void OnCollideWithPlayer(Collider other) { //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) ((EnemyAI)this).OnCollideWithPlayer(other); if (!stoppingMovement && base.currentBehaviourStateIndex == 1 && !(hitPlayerTimer >= 0f) && !setOnCooldown && !((double)(Time.realtimeSinceStartup - timeAtLastCooldown) < 0.45)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { hitPlayerTimer = 0.2f; val.DamagePlayer(90, true, true, (CauseOfDeath)4, 2, false, default(Vector3)); val.JumpToFearLevel(1f, true); timeSinceHittingPlayer = Time.realtimeSinceStartup; } } } 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 ((NetworkBehaviour)this).__registerRpc(1644662290u, new RpcReceiveHandler(__rpc_handler_1644662290), "SetCoilheadOnCooldownServerRpc"); ((NetworkBehaviour)this).__registerRpc(179287993u, new RpcReceiveHandler(__rpc_handler_179287993), "SetCoilheadOnCooldownClientRpc"); ((NetworkBehaviour)this).__registerRpc(2508407444u, new RpcReceiveHandler(__rpc_handler_2508407444), "SetAnimationStopServerRpc"); ((NetworkBehaviour)this).__registerRpc(2398162194u, new RpcReceiveHandler(__rpc_handler_2398162194), "SetAnimationStopClientRpc"); ((NetworkBehaviour)this).__registerRpc(4127704327u, new RpcReceiveHandler(__rpc_handler_4127704327), "SetAnimationGoServerRpc"); ((NetworkBehaviour)this).__registerRpc(1406788356u, new RpcReceiveHandler(__rpc_handler_1406788356), "SetAnimationGoClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1644662290(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 coilheadOnCooldownServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref coilheadOnCooldownServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DarkSpring)(object)target).SetCoilheadOnCooldownServerRpc(coilheadOnCooldownServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_179287993(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 coilheadOnCooldownClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref coilheadOnCooldownClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DarkSpring)(object)target).SetCoilheadOnCooldownClientRpc(coilheadOnCooldownClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2508407444(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((DarkSpring)(object)target).SetAnimationStopServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2398162194(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; ((DarkSpring)(object)target).SetAnimationStopClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4127704327(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((DarkSpring)(object)target).SetAnimationGoServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1406788356(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; ((DarkSpring)(object)target).SetAnimationGoClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DarkSpring"; } } internal class DayCounterEvent : NetworkBehaviour { private readonly int DaysFirstWarning = 15; private readonly int DaysSecondWarning = 35; private readonly int DaysThirdWarning = 60; private int DaysShipCrash = 999; private bool WarningToday; private bool HasWarned; public bool IsTrite; public float RandomWarningTime = 1f; public Animator WarningSignAnimator; public TMP_Text DaysText; public TMP_Text DaysText2; private int DaysTillCrash = 0; public Canvas Canvas; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); Camera component = GameObject.Find("UICamera").GetComponent(); if ((Object)(object)component != (Object)null) { Canvas.worldCamera = component; } if (((NetworkBehaviour)this).IsServer) { UpdateFailSafeMoons(); int crashDay = Random.Range(72, 94); WesleysInteriorToolsPlugin.CurrentSave.SetCrashDay(crashDay); DaysShipCrash = WesleysInteriorToolsPlugin.CurrentSave.GetCrashDay(); string currentSaveFileName = GameNetworkManager.Instance.currentSaveFileName; int days = ES3.Load("Stats_DaysSpent", currentSaveFileName, 0); WesleysInteriorToolsPlugin.CurrentSave.UpdateDayCounter(days); RandomWarningTime = Random.Range(0.1f, 0.5f); int daysTillCrash = DaysShipCrash - WesleysInteriorToolsPlugin.CurrentSave.GetDaysPassed(); DaysTillCrash = daysTillCrash; CheckIfWarningToday(); } } private void CheckIfWarningToday() { int shipApproachState = WesleysInteriorToolsPlugin.CurrentSave.GetShipApproachState(); int daysPassed = WesleysInteriorToolsPlugin.CurrentSave.GetDaysPassed(); bool shipCrashed = WesleysInteriorToolsPlugin.CurrentSave.GetShipCrashed(); if (WesleysInteriorToolsPlugin.CurrentSave.GetShipState() != 1) { if (shipApproachState == 0 && daysPassed >= DaysFirstWarning) { WarningToday = true; } else if (shipApproachState == 1 && daysPassed >= DaysSecondWarning) { WarningToday = true; } else if (shipApproachState == 2 && daysPassed >= DaysThirdWarning) { WarningToday = true; } else if (shipApproachState == 3 && daysPassed >= DaysShipCrash) { WarningToday = true; WesleysInteriorToolsPlugin.CurrentSave.SetShipState(2); } else if (shipApproachState == 4 && !shipCrashed && IsTrite) { WarningToday = true; } } } private void Update() { if (!((NetworkBehaviour)this).IsServer || !WarningToday) { return; } float num = TimeOfDay.Instance.currentDayTime / TimeOfDay.Instance.totalTime; int shipApproachState = WesleysInteriorToolsPlugin.CurrentSave.GetShipApproachState(); if (!HasWarned && num > RandomWarningTime) { HasWarned = true; switch (shipApproachState) { case 0: PlayWarningClientRpc(0, DaysTillCrash); WesleysInteriorToolsPlugin.CurrentSave.SetShipApproachState(1); break; case 1: PlayWarningClientRpc(1, DaysTillCrash); WesleysInteriorToolsPlugin.CurrentSave.SetShipApproachState(2); break; case 2: PlayWarningClientRpc(2, DaysTillCrash); WesleysInteriorToolsPlugin.CurrentSave.SetShipApproachState(3); break; case 3: PlayWarningClientRpc(3, DaysTillCrash); WesleysInteriorToolsPlugin.CurrentSave.SetShipApproachState(4); break; case 4: PlayWarningClientRpc(4, DaysTillCrash); WesleysInteriorToolsPlugin.CurrentSave.SetShipApproachState(5); break; } } } [ClientRpc] private void PlayWarningClientRpc(int warning, int daysTillCrash) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3866136232u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, warning); BytePacker.WriteValueBitPacked(val, daysTillCrash); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3866136232u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; DaysText.text = daysTillCrash + " DAYS"; DaysText2.text = daysTillCrash + " HELP"; string trigger = "warning" + warning; WarningSignAnimator.SetTrigger(trigger); } } } private void UpdateFailSafeMoons() { string sceneName = RoundManager.Instance.currentLevel.sceneName; WesleysInteriorToolsPlugin.CurrentSave.TryAddMoonToList(sceneName); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3866136232u, new RpcReceiveHandler(__rpc_handler_3866136232), "PlayWarningClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3866136232(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int warning = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref warning); int daysTillCrash = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref daysTillCrash); target.__rpc_exec_stage = (__RpcExecStage)1; ((DayCounterEvent)(object)target).PlayWarningClientRpc(warning, daysTillCrash); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DayCounterEvent"; } } internal class DinerPuzzleController : NetworkBehaviour { public Animator Animator; public List Chandeliers; public List GoreRenderers; public bool[] ChandeliersEnabled; public bool[] GoreRenderersEnabled; private int AnswerType = 0; private bool PuzzleCompleted; public UnityEvent PuzzleCompleteHost; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); ChandeliersEnabled = new bool[Chandeliers.Count]; GoreRenderersEnabled = new bool[GoreRenderers.Count]; } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePuzzle(); } private void InitialisePuzzle() { InitialisePuzzleServerRpc(); } [ServerRpc] private void InitialisePuzzleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3624612474u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3624612474u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (Chandelier chandelier in Chandeliers) { chandelier.Controller = this; } int num = 0; for (int i = 0; i < Chandeliers.Count; i++) { bool flag = Random.Range(0f, 1f) < 0.5f; ChandeliersEnabled[i] = flag; Chandeliers[i].SetChandelierStateServer(flag); Chandeliers[i].Id = i; bool flag2 = Random.Range(0f, 1f) < 0.5f; GoreRenderersEnabled[i] = flag2; if (flag2) { num++; } } if (num <= 2) { AnswerType = 1; } else if (num >= 7) { AnswerType = 2; } else if (num % 2 == 0) { AnswerType = 3; } else { AnswerType = 4; } InitialisePuzzleClientRpc(GoreRenderersEnabled); } [ClientRpc] private void InitialisePuzzleClientRpc(bool[] goreBools) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(17852699u, val2, (RpcDelivery)0); bool flag = goreBools != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(goreBools, default(ForPrimitives)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 17852699u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; for (int i = 0; i < GoreRenderers.Count; i++) { ((Renderer)GoreRenderers[i]).enabled = goreBools[i]; } } } public void CheckAnswerServer() { if (PuzzleCompleted) { return; } bool flag = true; switch (AnswerType) { case 1: { bool[] chandeliersEnabled2 = ChandeliersEnabled; for (int l = 0; l < chandeliersEnabled2.Length; l++) { if (chandeliersEnabled2[l]) { flag = false; break; } } break; } case 2: { bool[] chandeliersEnabled = ChandeliersEnabled; for (int j = 0; j < chandeliersEnabled.Length; j++) { if (!chandeliersEnabled[j]) { flag = false; break; } } break; } case 3: { for (int k = 0; k < ChandeliersEnabled.Length; k++) { if (ChandeliersEnabled[k] != GoreRenderersEnabled[k]) { flag = false; break; } } break; } case 4: { for (int i = 0; i < ChandeliersEnabled.Length; i++) { if (ChandeliersEnabled[i] == GoreRenderersEnabled[i]) { flag = false; break; } } break; } } if (flag) { PuzzleCompleted = true; PuzzleCompleteHost.Invoke(); int rChan = Random.Range(0, Chandeliers.Count); PuzzleCompleteClientRpc(rChan); } } [ClientRpc] private void PuzzleCompleteClientRpc(int rChan) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2231607889u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, rChan); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2231607889u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (Chandelier chandelier in Chandeliers) { chandelier.Trigger.interactable = false; } Animator.SetTrigger("finish"); Chandeliers[rChan].Animator.SetTrigger("flicker"); Chandeliers[rChan].AudioSource.PlayOneShot(Chandeliers[rChan].Flicker); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3624612474u, new RpcReceiveHandler(__rpc_handler_3624612474), "InitialisePuzzleServerRpc"); ((NetworkBehaviour)this).__registerRpc(17852699u, new RpcReceiveHandler(__rpc_handler_17852699), "InitialisePuzzleClientRpc"); ((NetworkBehaviour)this).__registerRpc(2231607889u, new RpcReceiveHandler(__rpc_handler_2231607889), "PuzzleCompleteClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3624612474(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((DinerPuzzleController)(object)target).InitialisePuzzleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_17852699(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_006e: 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_0058: 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 flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); bool[] goreBools = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref goreBools, default(ForPrimitives)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((DinerPuzzleController)(object)target).InitialisePuzzleClientRpc(goreBools); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2231607889(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 rChan = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref rChan); target.__rpc_exec_stage = (__RpcExecStage)1; ((DinerPuzzleController)(object)target).PuzzleCompleteClientRpc(rChan); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DinerPuzzleController"; } } internal class Elevator : NetworkBehaviour { [Header("Elevator floor stuff")] public List ElevatorFloors = new List(); public List FloorObjects = new List(); public List FloorDoorAnimators = new List(); public List FloorButtonAnimators = new List(); public int CurrentFloor = 0; [Header("Elevator")] public Animator ElevatorAnimator; public float Duration = 3.5f; public float PreMoveDelay = 0.5f; public AnimationCurve ElevatorCurve; public Transform ElevatorTransform; public AudioSource ElevatorBuzzSfx; public bool PlayBuzzAtStart = true; public AudioSource ButtonPanelSfx; public List FloorButtonsSfx; public AudioClip ButtonSfx; public AudioClip ElevatorBuzz; [Header("Elevator buttons")] public InteractTrigger UpTrigger; public InteractTrigger DownTrigger; public List ButtonTriggers; [Header("Elevator panel buttons")] public List PanelButtonAnimators = new List(); public List PanelButtonTriggers = new List(); [Header("Extra")] public UnityEvent ElevatorMoveEvent; private Vector3 ElevatorHeight; private bool IsElevatorMoving; public Transform CordContainer; public Transform CordTopPostion; private void Start() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) SetEnabledTriggers(CurrentFloor); ElevatorHeight = ElevatorFloors[CurrentFloor].position; ((Component)ElevatorTransform).transform.position = ElevatorHeight; if (FloorDoorAnimators.Count > 0) { FloorDoorAnimators[CurrentFloor].SetBool("open", true); } if ((Object)(object)CordContainer != (Object)null) { UpdateCordLength(); } } private void FixedUpdate() { //IL_001b: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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) if (IsElevatorMoving && ((Component)ElevatorTransform).transform.position != ElevatorHeight) { Vector3 position = ((Component)ElevatorTransform).transform.position; ((Component)ElevatorTransform).transform.position = Vector3.Lerp(position, ElevatorHeight, Time.fixedDeltaTime * 12f); if ((Object)(object)CordContainer != (Object)null) { UpdateCordLength(); } } } private void UpdateCordLength() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) float num = 1f; float num2 = CordTopPostion.position.y - CordContainer.position.y; Vector3 localScale = default(Vector3); ((Vector3)(ref localScale))..ctor(1f, num2, 1f); CordContainer.localScale = localScale; } public void MoveFloorUp() { MoveFloorUpServerRpc(); } [ServerRpc(RequireOwnership = false)] private void MoveFloorUpServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1521652993u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1521652993u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (CurrentFloor < ElevatorFloors.Count) { MoveToFloorClientRpc(CurrentFloor + 1, floorButton: false, MovingUp: true); } } } [ServerRpc(RequireOwnership = false)] private void MoveFloorDownServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2977389303u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2977389303u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (CurrentFloor > 0) { MoveToFloorClientRpc(CurrentFloor - 1, floorButton: false, MovingUp: false); } } } public void MoveFloorDown() { MoveFloorDownServerRpc(); } [ServerRpc(RequireOwnership = false)] private void MoveToButtonServerRpc(int floor, bool outsideButton) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4176619158u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, floor); ((FastBufferWriter)(ref val)).WriteValueSafe(ref outsideButton, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4176619158u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MoveToFloorClientRpc(floor, outsideButton, MovingUp: false); } } } [ClientRpc] private void MoveToFloorClientRpc(int floor, bool floorButton, bool MovingUp) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2741345210u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, floor); ((FastBufferWriter)(ref val)).WriteValueSafe(ref floorButton, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref MovingUp, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2741345210u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (IsElevatorMoving || CurrentFloor == floor) { return; } ButtonPanelSfx.PlayOneShot(ButtonSfx); if (floorButton) { FloorButtonsSfx[floor].PlayOneShot(ButtonSfx); } if ((Object)(object)DownTrigger != (Object)null) { DownTrigger.interactable = false; } if ((Object)(object)UpTrigger != (Object)null) { UpTrigger.interactable = false; } if (ButtonTriggers.Count > 0) { foreach (InteractTrigger buttonTrigger in ButtonTriggers) { buttonTrigger.interactable = false; } } if (PanelButtonTriggers.Count > 0) { foreach (InteractTrigger panelButtonTrigger in PanelButtonTriggers) { panelButtonTrigger.interactable = false; } } Vector3 position = ElevatorFloors[CurrentFloor].position; if (FloorDoorAnimators.Count > 0) { FloorDoorAnimators[CurrentFloor].SetBool("open", false); } CurrentFloor = floor; if (FloorButtonAnimators.Count > floor && floorButton) { FloorButtonAnimators[floor].SetBool("pressed", true); } if (PanelButtonAnimators.Count > floor && !floorButton) { PanelButtonAnimators[floor].SetBool("pressed", true); } IsElevatorMoving = true; Vector3 position2 = ElevatorFloors[CurrentFloor].position; if (MovingUp) { ElevatorAnimator.SetTrigger("ElevatorMoveUp"); } else { ElevatorAnimator.SetTrigger("ElevatorMoveDown"); } ((MonoBehaviour)this).StartCoroutine(MoveCoroutine(position, position2, Duration, PreMoveDelay, floor, floorButton)); } public void MoveToButton(int floor) { MoveToButtonServerRpc(floor, outsideButton: true); } public void MoveToPanelButton(int floor) { MoveToButtonServerRpc(floor, outsideButton: false); } private IEnumerator MoveCoroutine(Vector3 tStart, Vector3 tEnd, float duration, float preMoveDuration, int floor, bool button) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (PlayBuzzAtStart) { ElevatorBuzzSfx.PlayOneShot(ElevatorBuzz); } ElevatorMoveEvent.Invoke(); foreach (GameObject gameObject in FloorObjects) { gameObject.SetActive(false); } yield return (object)new WaitForSeconds(preMoveDuration); float t = 0f; while (t < duration) { t += Time.deltaTime; float curvedT = ElevatorCurve.Evaluate(t / duration); ElevatorHeight = Vector3.Lerp(tStart, tEnd, curvedT); yield return 0f; } yield return (object)new WaitForSeconds(2.5f); if (!PlayBuzzAtStart) { ElevatorBuzzSfx.PlayOneShot(ElevatorBuzz); } if (FloorDoorAnimators.Count > 0) { FloorDoorAnimators[floor].SetBool("open", true); } if (FloorButtonAnimators.Count > floor && button) { FloorButtonAnimators[floor].SetBool("pressed", false); } if (PanelButtonAnimators.Count > floor && !button) { PanelButtonAnimators[floor].SetBool("pressed", false); } IsElevatorMoving = false; SetEnabledTriggers(floor); } private void SetEnabledTriggers(int floor) { FloorObjects[CurrentFloor].SetActive(true); if ((Object)(object)DownTrigger != (Object)null) { DownTrigger.interactable = true; } if ((Object)(object)UpTrigger != (Object)null) { UpTrigger.interactable = true; } if (ButtonTriggers.Count > 0) { foreach (InteractTrigger buttonTrigger in ButtonTriggers) { buttonTrigger.interactable = true; } if (ButtonTriggers.Count > floor) { ButtonTriggers[floor].interactable = false; } } if (CurrentFloor == 0) { if ((Object)(object)DownTrigger != (Object)null) { DownTrigger.interactable = false; } } else if (CurrentFloor == ElevatorFloors.Count - 1 && (Object)(object)UpTrigger != (Object)null) { UpTrigger.interactable = false; } if (PanelButtonTriggers.Count <= 0) { return; } foreach (InteractTrigger panelButtonTrigger in PanelButtonTriggers) { panelButtonTrigger.interactable = true; } if (PanelButtonTriggers.Count > floor) { PanelButtonTriggers[floor].interactable = false; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1521652993u, new RpcReceiveHandler(__rpc_handler_1521652993), "MoveFloorUpServerRpc"); ((NetworkBehaviour)this).__registerRpc(2977389303u, new RpcReceiveHandler(__rpc_handler_2977389303), "MoveFloorDownServerRpc"); ((NetworkBehaviour)this).__registerRpc(4176619158u, new RpcReceiveHandler(__rpc_handler_4176619158), "MoveToButtonServerRpc"); ((NetworkBehaviour)this).__registerRpc(2741345210u, new RpcReceiveHandler(__rpc_handler_2741345210), "MoveToFloorClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1521652993(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; ((Elevator)(object)target).MoveFloorUpServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2977389303(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; ((Elevator)(object)target).MoveFloorDownServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4176619158(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int floor = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref floor); bool outsideButton = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref outsideButton, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Elevator)(object)target).MoveToButtonServerRpc(floor, outsideButton); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2741345210(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int floor = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref floor); bool floorButton = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref floorButton, default(ForPrimitives)); bool movingUp = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref movingUp, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Elevator)(object)target).MoveToFloorClientRpc(floor, floorButton, movingUp); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Elevator"; } } internal class ElevatorSnatcher : NetworkBehaviour { public Animator SnatcherAnimator; public AudioSource ElevatorSfx; public AudioClip ElevatorClip; private int PreviousAttack = 0; private int Attack = 0; private bool CanAttack = true; public void StartSnatcherEncounter() { if (((NetworkBehaviour)this).IsServer) { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine(16f)); StartEncounterClientRpc(); } } public void StopSnatcher() { StopSnatcherServerRpc(); } [ServerRpc] private void StopSnatcherServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1461165747u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1461165747u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CanAttack = false; } } [ClientRpc] private void StartEncounterClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3312024462u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3312024462u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SnatcherAnimator.SetTrigger("start"); ElevatorSfx.PlayOneShot(ElevatorClip); } } } private IEnumerator DelayCoroutine(float time) { yield return (object)new WaitForSeconds(time); PickAttackServerRpc(); } [ServerRpc] private void PickAttackServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3178880392u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3178880392u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (CanAttack) { PreviousAttack = Attack; int num; for (num = Random.Range(0, 7); num == PreviousAttack; num = Random.Range(0, 7)) { } Attack = num; string attack = "attack" + Attack; AttackClientRpc(attack); if (Attack == 0 || Attack == 1) { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine(5f)); } else { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine(9f)); } } } [ClientRpc] private void AttackClientRpc(string attack) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1888042728u, val2, (RpcDelivery)0); bool flag = attack != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(attack, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1888042728u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SnatcherAnimator.SetTrigger(attack); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1461165747u, new RpcReceiveHandler(__rpc_handler_1461165747), "StopSnatcherServerRpc"); ((NetworkBehaviour)this).__registerRpc(3312024462u, new RpcReceiveHandler(__rpc_handler_3312024462), "StartEncounterClientRpc"); ((NetworkBehaviour)this).__registerRpc(3178880392u, new RpcReceiveHandler(__rpc_handler_3178880392), "PickAttackServerRpc"); ((NetworkBehaviour)this).__registerRpc(1888042728u, new RpcReceiveHandler(__rpc_handler_1888042728), "AttackClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1461165747(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((ElevatorSnatcher)(object)target).StopSnatcherServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3312024462(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; ((ElevatorSnatcher)(object)target).StartEncounterClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3178880392(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((ElevatorSnatcher)(object)target).PickAttackServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1888042728(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 attack = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref attack, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((ElevatorSnatcher)(object)target).AttackClientRpc(attack); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ElevatorSnatcher"; } } internal class EmpraPuzzle : NetworkBehaviour { [Header("Crane")] public InteractTrigger CraneHorizontalTrigger; public InteractTrigger CraneVerticalTrigger; public Animator CraneAnimator; public Animator CartAnimator; public Animator ApparatusAnimator; public Animator BombAnimator; private bool CraneTurned = false; private bool HasBomb = false; private bool HasApparatus = false; private int CraneState = 0; [Header("Mortar")] public InteractTrigger MortarTrigger; public InteractTrigger MortarPushTrigger; public Animator MortarCrankAnimator; public Animator MortarAnimator; public Animator OverseerAnimator; public Animator SeedAnimator; public List TentacleAnimators; private bool MortarFired = false; private void Awake() { MortarTrigger.interactable = false; MortarTrigger.disabledHoverTip = "Mortar not in position"; CraneVerticalTrigger.disabledHoverTip = "Crane not in position"; CraneVerticalTrigger.interactable = false; } public void PlaceThing(int thing) { PlaceThingServerRpc(thing); } [ServerRpc(RequireOwnership = false)] private void PlaceThingServerRpc(int thing) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2918622313u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, thing); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2918622313u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (thing == 0) { HasApparatus = true; } else { HasBomb = true; } PlaceThingClientRpc(thing); DoTriggerCheck(); } } [ClientRpc] private void PlaceThingClientRpc(int thing) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3446985583u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, thing); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3446985583u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (thing == 0) { ApparatusAnimator.SetTrigger("place"); } else { BombAnimator.SetTrigger("place"); } } } public void MoveCrane(int craneState) { MoveCraneServerRpc(craneState); } [ServerRpc(RequireOwnership = false)] private void MoveCraneServerRpc(int craneState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(694518875u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, craneState); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 694518875u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; bool flag = true; switch (craneState) { case 0: CraneState = 1; MoveCraneClientRpc(craneState); ((MonoBehaviour)this).StartCoroutine(CraneCooldownCoroutine()); flag = false; CraneTurned = true; break; case 1: if (CraneState == 2) { CraneState = 3; MoveCraneClientRpc(2); break; } ((MonoBehaviour)this).StartCoroutine(CraneCooldownCoroutine()); flag = false; CraneState = 2; MoveCraneClientRpc(craneState); break; } if (flag) { DoTriggerCheck(); } } private void DoTriggerCheck() { if (!CraneTurned) { SetTriggerStateClientRpc(0); } else if (CraneTurned && CraneState == 1) { SetTriggerStateClientRpc(1); } else if (CraneState == 2) { if (!HasApparatus) { SetTriggerStateClientRpc(2); } else if (!HasBomb) { SetTriggerStateClientRpc(3); } else if (!MortarFired) { SetTriggerStateClientRpc(4); } else { SetTriggerStateClientRpc(5); } } else if (CraneState == 3) { SetTriggerStateClientRpc(6); } } [ClientRpc] private void MoveCraneClientRpc(int craneState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3682835948u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, craneState); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3682835948u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; switch (craneState) { case 0: CraneAnimator.SetTrigger("Move1"); CraneHorizontalTrigger.interactable = false; break; case 1: CraneAnimator.SetTrigger("Move2"); break; case 2: CraneAnimator.SetTrigger("Move3"); CartAnimator.SetTrigger("CraneRoll"); CraneVerticalTrigger.interactable = false; CraneVerticalTrigger.disabledHoverTip = ""; break; } } } [ClientRpc] private void SetTriggerStateClientRpc(int triggerState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1312267755u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, triggerState); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1312267755u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; switch (triggerState) { case 0: CraneVerticalTrigger.disabledHoverTip = "Crane not in position"; CraneVerticalTrigger.interactable = false; break; case 1: CraneVerticalTrigger.interactable = true; break; case 2: CraneVerticalTrigger.interactable = false; CraneVerticalTrigger.disabledHoverTip = "No apparatus in the cart"; break; case 3: CraneVerticalTrigger.interactable = false; CraneVerticalTrigger.disabledHoverTip = "No atomic bomb in the cart"; break; case 4: CraneVerticalTrigger.interactable = false; CraneVerticalTrigger.disabledHoverTip = "Seed not destroyed"; break; case 5: CraneVerticalTrigger.interactable = true; CraneVerticalTrigger.hoverTip = "Raise crane hook : [E]"; break; case 6: CraneVerticalTrigger.interactable = false; CraneVerticalTrigger.disabledHoverTip = ""; break; case 7: CraneVerticalTrigger.interactable = false; CraneVerticalTrigger.disabledHoverTip = "Crane moving"; break; } } } public void SetMortarReady() { SetMortarReadyServerRpc(); } public void FireMortar() { FireMortarServerRpc(); } [ServerRpc(RequireOwnership = false)] private void FireMortarServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1574981074u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1574981074u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MortarFired = true; DoTriggerCheck(); FireMortarClientRpc(); } } } [ClientRpc] private void FireMortarClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1988669246u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1988669246u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MortarTrigger.interactable = false; MortarTrigger.disabledHoverTip = "Mortar fired"; MortarCrankAnimator.SetTrigger("Cranktrigger2"); MortarAnimator.SetTrigger("MortarFire"); OverseerAnimator.SetTrigger("Eye"); ((MonoBehaviour)this).StartCoroutine(SeedDestructionSequenceCoroutine()); } } } [ServerRpc(RequireOwnership = false)] private void SetMortarReadyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2388718647u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2388718647u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetMortarReadyClientRpc(); } } } [ClientRpc] private void SetMortarReadyClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2569562445u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2569562445u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MortarTrigger.interactable = true; MortarCrankAnimator.SetTrigger("Cranktrigger1"); MortarAnimator.SetTrigger("MortarDrop"); MortarPushTrigger.interactable = false; } } } private IEnumerator CraneCooldownCoroutine() { SetTriggerStateClientRpc(7); yield return (object)new WaitForSeconds(8.5f); DoTriggerCheck(); } private IEnumerator SeedDestructionSequenceCoroutine() { yield return (object)new WaitForSeconds(5.75f); SeedAnimator.SetTrigger("SeedExplode"); yield return (object)new WaitForSeconds(4.6f); TentacleAnimators[4].SetTrigger("Awake5"); yield return (object)new WaitForSeconds(1.2f); TentacleAnimators[1].SetTrigger("Awake2"); yield return (object)new WaitForSeconds(1.6f); TentacleAnimators[2].SetTrigger("Awake3"); yield return (object)new WaitForSeconds(2.2f); TentacleAnimators[5].SetTrigger("Awake6"); yield return (object)new WaitForSeconds(0.8f); TentacleAnimators[3].SetTrigger("Awake4"); yield return (object)new WaitForSeconds(1.4f); TentacleAnimators[6].SetTrigger("Awake7"); yield return (object)new WaitForSeconds(1f); TentacleAnimators[0].SetTrigger("Awake1"); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2918622313u, new RpcReceiveHandler(__rpc_handler_2918622313), "PlaceThingServerRpc"); ((NetworkBehaviour)this).__registerRpc(3446985583u, new RpcReceiveHandler(__rpc_handler_3446985583), "PlaceThingClientRpc"); ((NetworkBehaviour)this).__registerRpc(694518875u, new RpcReceiveHandler(__rpc_handler_694518875), "MoveCraneServerRpc"); ((NetworkBehaviour)this).__registerRpc(3682835948u, new RpcReceiveHandler(__rpc_handler_3682835948), "MoveCraneClientRpc"); ((NetworkBehaviour)this).__registerRpc(1312267755u, new RpcReceiveHandler(__rpc_handler_1312267755), "SetTriggerStateClientRpc"); ((NetworkBehaviour)this).__registerRpc(1574981074u, new RpcReceiveHandler(__rpc_handler_1574981074), "FireMortarServerRpc"); ((NetworkBehaviour)this).__registerRpc(1988669246u, new RpcReceiveHandler(__rpc_handler_1988669246), "FireMortarClientRpc"); ((NetworkBehaviour)this).__registerRpc(2388718647u, new RpcReceiveHandler(__rpc_handler_2388718647), "SetMortarReadyServerRpc"); ((NetworkBehaviour)this).__registerRpc(2569562445u, new RpcReceiveHandler(__rpc_handler_2569562445), "SetMortarReadyClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2918622313(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 thing = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref thing); target.__rpc_exec_stage = (__RpcExecStage)1; ((EmpraPuzzle)(object)target).PlaceThingServerRpc(thing); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3446985583(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 thing = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref thing); target.__rpc_exec_stage = (__RpcExecStage)1; ((EmpraPuzzle)(object)target).PlaceThingClientRpc(thing); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_694518875(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 craneState = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref craneState); target.__rpc_exec_stage = (__RpcExecStage)1; ((EmpraPuzzle)(object)target).MoveCraneServerRpc(craneState); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3682835948(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 craneState = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref craneState); target.__rpc_exec_stage = (__RpcExecStage)1; ((EmpraPuzzle)(object)target).MoveCraneClientRpc(craneState); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1312267755(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 triggerStateClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref triggerStateClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((EmpraPuzzle)(object)target).SetTriggerStateClientRpc(triggerStateClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1574981074(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; ((EmpraPuzzle)(object)target).FireMortarServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1988669246(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; ((EmpraPuzzle)(object)target).FireMortarClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2388718647(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; ((EmpraPuzzle)(object)target).SetMortarReadyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2569562445(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; ((EmpraPuzzle)(object)target).SetMortarReadyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "EmpraPuzzle"; } } public class Exterminator : NetworkBehaviour { [SerializeField] private Animator AttackManager; [SerializeField] private Animator DoorManager; [SerializeField] private Animator MainManager; [SerializeField] private MeshRenderer ExterminatorEye1; [SerializeField] private MeshRenderer ExterminatorEye2; [SerializeField] private List EyeOpenTextures; [SerializeField] private List EyeBlink; [SerializeField] private List EyeFinal; [SerializeField] private Texture2D EyeOpen; [SerializeField] private Texture2D EyePoint; [SerializeField] private AudioSource EyesAudio; [SerializeField] private AudioClip AwakeClip; [SerializeField] private List BlinkSounds; [SerializeField] private List AttackSounds; [SerializeField] private List AttackAudiosources; [SerializeField] private List Spawners; private int CurrentPosition = 1; private int ThumpersSpawned = 0; private int ThumpersKilled = 0; private int AttackType = 0; private int AttackNum = 0; private int AttackCounter = 0; private string AttackTrigger = ""; private int PreviousAttack; private float AttackDelay = 0f; private bool PrimingAttack = false; private int FinalSequence = 0; private bool SpawnSwitch = false; private void Update() { if (((NetworkBehaviour)this).IsServer && ((NetworkBehaviour)this).IsSpawned && PrimingAttack) { if (AttackDelay > 0f) { AttackDelay -= Time.deltaTime; return; } AttackCounter++; ExecuteAttack(); PrimingAttack = false; } } private void AttemptThumperSpawn() { if (!((NetworkBehaviour)this).IsServer) { return; } if (ThumpersKilled < 4) { if (ThumpersKilled == ThumpersSpawned) { if (SpawnSwitch) { SpawnSwitch = false; return; } SpawnSwitch = true; Spawners[ThumpersKilled].SetActive(true); ThumpersSpawned++; } } else { FinalSequence = 2; } } public void HostNextAttack() { if (!((NetworkBehaviour)this).IsServer) { return; } bool stay = false; bool left = false; float value = Random.value; if (AttackCounter > 12) { FinalSequence = 1; } if (FinalSequence > 0) { CurrentPosition = 1; HostAttackPicker(); return; } if (value > 0.5f) { if (CurrentPosition < 2) { left = true; CurrentPosition++; stay = true; } } else if (CurrentPosition > 0) { CurrentPosition--; stay = true; } TriggerMoveClientRpc(stay, left); HostAttackPicker(); } public void HostAttackPicker() { PreviousAttack = AttackType; int num = AttackType; while (PreviousAttack == num) { num = Random.Range(0, 4); } AttackType = num; if (FinalSequence > 0) { AttackType = 4; } TriggerAttackClientRpc(AttackType, FinalSequence); AttackDelay = 1.5f; PrimingAttack = true; } public void ExecuteAttack() { int num = 0; switch (CurrentPosition) { case 0: num = 0; break; case 1: num = 4; break; case 2: num = 8; break; } num += AttackType; AttackNum = num; if (AttackType == 4) { AttackNum = 12; } AttackTrigger = "Attack" + AttackNum; ExecuteClientRpc(AttackType, AttackTrigger, FinalSequence); } [ClientRpc] public void ExecuteClientRpc(int attackType, string attackTrigger, int finalSequence) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3536496293u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, attackType); bool flag = attackTrigger != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(attackTrigger, false); } BytePacker.WriteValueBitPacked(val, finalSequence); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3536496293u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AttackManager.SetTrigger(attackTrigger); EyesAudio.PlayOneShot(AttackSounds[attackType]); AttackAudiosources[attackType].Play(); if (finalSequence == 2) { MainManager.SetBool("FinalAttack", true); DoorManager.SetBool("OpenCage1", true); } } } [ClientRpc] public void TriggerMoveClientRpc(bool stay, bool left) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2766850258u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref stay, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref left, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2766850258u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!stay) { MainManager.SetTrigger("Attack"); } else if (left) { MainManager.SetTrigger("MoveToLeft"); } else { MainManager.SetTrigger("MoveToRight"); } } } [ClientRpc] public void TriggerAttackClientRpc(int attacktype, int finalSequence) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2668055731u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, attacktype); BytePacker.WriteValueBitPacked(val, finalSequence); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2668055731u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (FinalSequence == 1) { MainManager.SetBool("FinalAttack", true); CurrentPosition = 1; } else if (FinalSequence == 2) { MainManager.SetBool("FinalAttack", true); DoorManager.SetBool("OpenCage1", true); CurrentPosition = 1; } AttackType = attacktype; } } public void IncreaseThumperCount() { ThumpersKilled++; } public void EyesBlinkSequence() { int index = Random.Range(0, BlinkSounds.Count - 1); ((MonoBehaviour)this).StartCoroutine(EyeSequenceCoroutine(EyeBlink, Open: true, BlinkSounds[index])); } public void EyesFinalSequence() { int index = Random.Range(0, BlinkSounds.Count - 1); ((MonoBehaviour)this).StartCoroutine(EyeSequenceCoroutine(EyeFinal, Open: false, BlinkSounds[index])); } public void EyesOpenSequence() { ((MonoBehaviour)this).StartCoroutine(EyeSequenceCoroutine(EyeOpenTextures, Open: true, AwakeClip)); } public void EyesPoint() { ((Renderer)ExterminatorEye1).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyePoint); ((Renderer)ExterminatorEye2).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyePoint); } public void EyesOpen() { ((Renderer)ExterminatorEye1).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyeOpen); ((Renderer)ExterminatorEye2).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyeOpen); } private IEnumerator EyeSequenceCoroutine(List Eyes, bool Open, AudioClip Clip) { if ((Object)(object)Clip != (Object)null) { EyesAudio.PlayOneShot(Clip, 1f); } if (Eyes != null) { foreach (Texture2D texture in Eyes) { ((Renderer)ExterminatorEye1).materials[1].SetTexture("_BaseColorMap", (Texture)(object)texture); ((Renderer)ExterminatorEye2).materials[1].SetTexture("_BaseColorMap", (Texture)(object)texture); yield return (object)new WaitForSeconds(0.2f); } if (Eyes == EyeBlink) { AttemptThumperSpawn(); } } if (Open) { ((Renderer)ExterminatorEye1).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyeOpen); ((Renderer)ExterminatorEye2).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyeOpen); } else { ((Renderer)ExterminatorEye1).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyePoint); ((Renderer)ExterminatorEye2).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyePoint); } yield return 0; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3536496293u, new RpcReceiveHandler(__rpc_handler_3536496293), "ExecuteClientRpc"); ((NetworkBehaviour)this).__registerRpc(2766850258u, new RpcReceiveHandler(__rpc_handler_2766850258), "TriggerMoveClientRpc"); ((NetworkBehaviour)this).__registerRpc(2668055731u, new RpcReceiveHandler(__rpc_handler_2668055731), "TriggerAttackClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3536496293(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int attackType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref attackType); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string attackTrigger = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref attackTrigger, false); } int finalSequence = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref finalSequence); target.__rpc_exec_stage = (__RpcExecStage)1; ((Exterminator)(object)target).ExecuteClientRpc(attackType, attackTrigger, finalSequence); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2766850258(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool stay = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref stay, default(ForPrimitives)); bool left = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref left, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Exterminator)(object)target).TriggerMoveClientRpc(stay, left); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2668055731(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int attacktype = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref attacktype); int finalSequence = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref finalSequence); target.__rpc_exec_stage = (__RpcExecStage)1; ((Exterminator)(object)target).TriggerAttackClientRpc(attacktype, finalSequence); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Exterminator"; } } internal class FabricationDoor : NetworkBehaviour { private int DoorState = 0; public Animator DoorAnimator; public AudioSource DoorSfx; public AudioClip DoorOpenSfx; public AudioClip KeyUseSfx; public InteractTrigger Trigger; private int PlayersLoaded = 0; public override void OnNetworkSpawn() { ((MonoBehaviour)this).StartCoroutine(WaitForPlayersCoroutine()); NotifyServerRpc(); } [ServerRpc(RequireOwnership = false)] private void NotifyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1958014294u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1958014294u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayersLoaded++; } } } private IEnumerator WaitForPlayersCoroutine() { while (PlayersLoaded < GameNetworkManager.Instance.connectedPlayers) { yield return null; } yield return (object)new WaitForSeconds(1f); if ((((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) && WesleysInteriorToolsPlugin.CurrentSave != null) { DoorState = WesleysInteriorToolsPlugin.CurrentSave.GetFabricationDoor(); if (DoorState == 1) { OpenDoorClientRpc(); } } } public void UnlockDoor() { UnlockDoorServerRpc(); } [ServerRpc(RequireOwnership = false)] private void UnlockDoorServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3772635524u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3772635524u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (WesleysInteriorToolsPlugin.CurrentSave != null && DoorState == 0) { WesleysInteriorToolsPlugin.CurrentSave.SetFabricationdoorOpen(); DoorState = 1; OpenDoorClientRpc(); } } } [ClientRpc] private void OpenDoorClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1183129208u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1183129208u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; DoorAnimator.SetTrigger("open"); DoorSfx.PlayOneShot(KeyUseSfx); DoorSfx.PlayOneShot(DoorOpenSfx); Trigger.interactable = false; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1958014294u, new RpcReceiveHandler(__rpc_handler_1958014294), "NotifyServerRpc"); ((NetworkBehaviour)this).__registerRpc(3772635524u, new RpcReceiveHandler(__rpc_handler_3772635524), "UnlockDoorServerRpc"); ((NetworkBehaviour)this).__registerRpc(1183129208u, new RpcReceiveHandler(__rpc_handler_1183129208), "OpenDoorClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1958014294(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; ((FabricationDoor)(object)target).NotifyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3772635524(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; ((FabricationDoor)(object)target).UnlockDoorServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1183129208(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; ((FabricationDoor)(object)target).OpenDoorClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FabricationDoor"; } } internal class CraftableItem { public string Name = "Item name"; public int[] RequiredMaterials; public int[] RequiredAmounts; public Texture2D Wireframe = null; public CraftableItem(string name, int[] requiredMaterials, int[] requiredAmounts, Texture2D wireframe) { Name = name; RequiredMaterials = requiredMaterials; RequiredAmounts = requiredAmounts; Wireframe = wireframe; } } internal class FactoryCraftingStation : NetworkBehaviour { public bool IsOnGratar = true; [Header("StorageDisplay")] private List CraftingItems; public List ItemAmountDisplays = new List(); [Header("Hatch")] private bool IsHatchOpen; private float HatchCloseTimer; public Animator HatchAnimator; public AudioSource HatchSfx; public AudioSource ScreenSfx; public AudioSource SelectScreenSfx; public AudioSource ButtonSfx; public AudioSource KeyboardSfx; public AudioSource FabricationMachineSfx; public AudioClip HatchOpenClip; public AudioClip HatchCloseClip; public AudioClip HatchInsert; public AudioClip AmountIncrease; public AudioClip AmountDecrease; public AudioClip SelectNext; public AudioClip SelectPrevious; public AudioClip ButtonPress; public AudioClip KeyPress; public AudioClip FabricateClip; [Header("CraftingMenu")] private int CurrentSelectedRecipe = 0; public TMP_Text ItemName; public TMP_Text ItemListInfo; public TMP_Text ItemAmountInfo; public TMP_Text Confirmation; public TMP_Text Selection; public MeshRenderer WireframeRenderer; public List CraftableItems = new List(); public List Wireframe; public List ItemMadeEvent; public InteractTrigger NextTrigger; public InteractTrigger PreviousTrigger; public InteractTrigger ConfirmTrigger; public BoxCollider ConfirmTriggerCollider; public Animator ButtonAnimatorNext; public Animator ButtonAnimatorPrevious; public Animator FabricationMachineAnimator; private bool IsCrafting; private int PlayersLoaded; private void Awake() { if (IsOnGratar) { CraftableItems.Add(new CraftableItem("Operating panel 1x", new int[6] { 0, 1, 2, 3, 4, 5 }, new int[6] { 24, 4, 4, 6, 8, 9 }, Wireframe[0])); } CraftableItems.Add(new CraftableItem("Triangulation device 2x", new int[5] { 1, 2, 3, 4, 6 }, new int[5] { 1, 1, 1, 1, 1 }, Wireframe[1])); CraftableItems.Add(new CraftableItem("Double-barrel shotgun 1x", new int[5] { 0, 1, 3, 5, 6 }, new int[5] { 18, 6, 4, 4, 4 }, Wireframe[2])); CraftableItems.Add(new CraftableItem("Shotgun shell 4x", new int[3] { 0, 3, 7 }, new int[3] { 2, 2, 2 }, Wireframe[3])); CraftableItems.Add(new CraftableItem("Adrenaline stim 2x", new int[2] { 0, 7 }, new int[2] { 1, 1 }, Wireframe[4])); CraftableItems.Add(new CraftableItem("Health stim 2x", new int[2] { 0, 7 }, new int[2] { 1, 1 }, Wireframe[5])); CraftableItems.Add(new CraftableItem("Pulatrum spore emitter 2x", new int[5] { 1, 3, 5, 6, 7 }, new int[5] { 2, 2, 4, 2, 4 }, Wireframe[6])); CraftableItems.Add(new CraftableItem("Boombox 1x", new int[3] { 2, 3, 6 }, new int[3] { 1, 1, 1 }, Wireframe[7])); CraftableItems.Add(new CraftableItem("Advanced flashlights 2x", new int[5] { 0, 3, 4, 5, 6 }, new int[5] { 3, 1, 1, 2, 1 }, Wireframe[8])); CraftableItems.Add(new CraftableItem("Fog reducer 1x", new int[6] { 1, 3, 4, 5, 6, 7 }, new int[6] { 1, 1, 1, 1, 2, 2 }, Wireframe[9])); CraftableItems.Add(new CraftableItem("Radar booster 1x", new int[4] { 1, 3, 4, 6 }, new int[4] { 1, 2, 1, 2 }, Wireframe[10])); CraftableItems.Add(new CraftableItem("Action figure 1x", new int[1], new int[1] { 4 }, Wireframe[11])); CraftableItems.Add(new CraftableItem("Weed killer 1x", new int[3] { 0, 5, 7 }, new int[3] { 2, 1, 2 }, Wireframe[12])); CraftableItems.Add(new CraftableItem("De-weed 1x", new int[3] { 0, 5, 7 }, new int[3] { 5, 2, 4 }, Wireframe[13])); CraftableItems.Add(new CraftableItem("Pesticide sprinkler 1x", new int[6] { 0, 2, 4, 5, 6, 7 }, new int[6] { 4, 1, 1, 3, 2, 5 }, Wireframe[14])); CraftableItems.Add(new CraftableItem("Fabricated key 12x", new int[3] { 1, 3, 5 }, new int[3] { 1, 2, 1 }, Wireframe[15])); if (!IsOnGratar) { CraftableItems.Add(new CraftableItem("Blank floppy disc 1x", new int[3] { 0, 2, 3 }, new int[3] { 2, 1, 3 }, Wireframe[16])); } CraftableItems.Add(new CraftableItem("Single-barrel shotgun 1x", new int[5] { 0, 1, 3, 5, 6 }, new int[5] { 16, 8, 8, 8, 2 }, Wireframe[17])); } public override void OnNetworkSpawn() { ((MonoBehaviour)this).StartCoroutine(WaitForPlayersCoroutine()); NotifyServerRpc(); } [ServerRpc(RequireOwnership = false)] private void NotifyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(299138212u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 299138212u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayersLoaded++; } } } private IEnumerator WaitForPlayersCoroutine() { while (PlayersLoaded < GameNetworkManager.Instance.connectedPlayers) { yield return null; } yield return (object)new WaitForSeconds(1f); if ((((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) && WesleysInteriorToolsPlugin.CurrentSave != null) { SetIntialAmount(); } } private void Update() { if (((NetworkBehaviour)this).IsServer && IsHatchOpen) { if (HatchCloseTimer > 0f) { HatchCloseTimer -= Time.deltaTime; } else if (IsHatchOpen) { OpenHatchClientRpc(value: false); } } } [ServerRpc(RequireOwnership = false)] private void UpdateSelectedItemServerRpc(int page) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2026554651u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, page); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2026554651u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; UpdateSelectedItemClientRpc(CraftingItems.ToArray(), page); } } } [ClientRpc] private void UpdateSelectedItemClientRpc(int[] items, int page) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1939421538u, val2, (RpcDelivery)0); bool flag = items != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(items, default(ForPrimitives)); } BytePacker.WriteValueBitPacked(val, page); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1939421538u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { CurrentSelectedRecipe = page; } ItemName.text = "> " + CraftableItems[page].Name; string text = ""; for (int i = 0; i < CraftableItems[page].RequiredMaterials.Length; i++) { text = text + getNameOfIngredient(CraftableItems[page].RequiredMaterials[i]) + "\n"; } ItemListInfo.text = text; string text2 = ""; for (int j = 0; j < CraftableItems[page].RequiredAmounts.Length; j++) { string text3 = ""; text3 = ((items[CraftableItems[page].RequiredMaterials[j]] >= CraftableItems[page].RequiredAmounts[j]) ? " - O" : " - X"); text2 = text2 + items[CraftableItems[page].RequiredMaterials[j]] + "/" + CraftableItems[page].RequiredAmounts[j] + text3 + "\n"; } ((Renderer)WireframeRenderer).material.SetTexture("_BaseColorMap", (Texture)(object)CraftableItems[page].Wireframe); ItemAmountInfo.text = text2; Confirmation.text = CheckIfEnoughItems(items); Selection.text = SetSelectionText(page); } } private string SetSelectionText(int page) { string text = ""; for (int i = 0; i < CraftableItems.Count; i++) { text = ((i != page) ? (text + ".") : (text + "o")); } return text; } private string CheckIfEnoughItems(int[] items) { bool flag = true; for (int i = 0; i < CraftableItems[CurrentSelectedRecipe].RequiredAmounts.Length; i++) { if (CraftableItems[CurrentSelectedRecipe].RequiredAmounts[i] > items[CraftableItems[CurrentSelectedRecipe].RequiredMaterials[i]]) { flag = false; break; } } if (flag) { ConfirmTrigger.interactable = true; return "> Fabricate item y/n?"; } ConfirmTrigger.interactable = false; return "Not enough resources"; } private string getNameOfIngredient(int item) { return item switch { 0 => "Plastic stock", 1 => "Steel", 2 => "Circuit boards", 3 => "Copper wiring", 4 => "Lithium", 5 => "Rubber", 6 => "Cables", 7 => "Chemicals", _ => "", }; } public void IncreaseItemValue(int item) { IncreaseItemValues(item, large: false); } public void IncreaseItemValueBig(int item) { IncreaseItemValues(item, large: true); } private void IncreaseItemValues(int item, bool large) { int value = 0; switch (item) { case 0: value = ((!large) ? 7 : 14); break; case 1: value = ((!large) ? 3 : 6); break; case 2: value = ((!large) ? 1 : 4); break; case 3: value = ((!large) ? 3 : 6); break; case 4: value = ((!large) ? 4 : 8); break; case 5: value = ((!large) ? 3 : 12); break; case 6: value = ((!large) ? 3 : 8); break; case 7: value = ((!large) ? 5 : 12); break; } IncreaseItemValueServerRpc(item, value); } [ServerRpc(RequireOwnership = false)] private void IncreaseItemValueServerRpc(int item, int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(402753916u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, item); BytePacker.WriteValueBitPacked(val, value); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 402753916u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; WesleysInteriorToolsPlugin.CurrentSave.UpdateItemValue(item, value); CraftingItems = WesleysInteriorToolsPlugin.CurrentSave.GetCraftingList(); bool flag = value > 0; UpdateItemValueClientRpc(CraftingItems.ToArray(), flag); UpdateSelectedItemClientRpc(CraftingItems.ToArray(), CurrentSelectedRecipe); if (flag) { HatchCloseTimer = 3f; } } } [ClientRpc] private void UpdateItemValueClientRpc(int[] items, bool increase) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (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_0127: 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_00ce: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(157012006u, val2, (RpcDelivery)0); bool flag = items != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(items, default(ForPrimitives)); } ((FastBufferWriter)(ref val)).WriteValueSafe(ref increase, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 157012006u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (increase) { HatchSfx.PlayOneShot(HatchInsert); ScreenSfx.PlayOneShot(AmountIncrease); } UpdateAmountVisuals(items); } } public void UpdateAmountVisuals(int[] items) { for (int i = 0; i < items.Length; i++) { if (ItemAmountDisplays.Count > i) { ItemAmountDisplays[i].text = items[i].ToString(); } } } public void SetIntialAmount() { CraftingItems = WesleysInteriorToolsPlugin.CurrentSave.GetCraftingList(); int[] items = CraftingItems.ToArray(); UpdateAllItemValuesClientRpc(items); UpdateSelectedItemClientRpc(items, CurrentSelectedRecipe); } [ClientRpc] private void UpdateAllItemValuesClientRpc(int[] items) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2553770164u, val2, (RpcDelivery)0); bool flag = items != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(items, default(ForPrimitives)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2553770164u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; UpdateAmountVisuals(items); } } public void OpenHatch() { ChangeHatchStateServerRpc(value: true); } public void CloseHatch() { ChangeHatchStateServerRpc(value: false); } [ServerRpc(RequireOwnership = false)] private void ChangeHatchStateServerRpc(bool value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2504342350u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2504342350u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (value) { HatchCloseTimer = 3f; } else { HatchCloseTimer = 0f; } OpenHatchClientRpc(value); } } [ClientRpc] private void OpenHatchClientRpc(bool value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2353059567u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2353059567u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (IsHatchOpen != value) { IsHatchOpen = value; HatchAnimator.SetBool("open", value); if (value) { HatchSfx.PlayOneShot(HatchOpenClip); } else { HatchSfx.PlayOneShot(HatchCloseClip); } } } public void NextPage(int page) { ChangePageServerRpc(page); } [ServerRpc(RequireOwnership = false)] private void ChangePageServerRpc(int page) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4143821699u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, page); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4143821699u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CurrentSelectedRecipe += page; if (CurrentSelectedRecipe >= CraftableItems.Count) { CurrentSelectedRecipe = 0; } else if (CurrentSelectedRecipe < 0) { CurrentSelectedRecipe = CraftableItems.Count - 1; } UpdateSelectedItemClientRpc(CraftingItems.ToArray(), CurrentSelectedRecipe); bool button = page < 0; ChangePageClientRpc(button); } } [ClientRpc] private void ChangePageClientRpc(bool button) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1212384046u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref button, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1212384046u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ButtonSfx.PlayOneShot(ButtonPress); if (!button) { ButtonAnimatorNext.SetTrigger("press"); SelectScreenSfx.PlayOneShot(SelectNext); } else { ButtonAnimatorPrevious.SetTrigger("press"); SelectScreenSfx.PlayOneShot(SelectPrevious); } } } public void TryFabricate() { TryFabricateServerRpc(); } [ServerRpc(RequireOwnership = false)] private void TryFabricateServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3879217258u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3879217258u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (IsCrafting) { return; } bool flag = true; for (int i = 0; i < CraftableItems[CurrentSelectedRecipe].RequiredAmounts.Length; i++) { if (CraftableItems[CurrentSelectedRecipe].RequiredAmounts[i] > CraftingItems[CraftableItems[CurrentSelectedRecipe].RequiredMaterials[i]]) { flag = false; break; } } if (flag) { for (int j = 0; j < CraftableItems[CurrentSelectedRecipe].RequiredMaterials.Length; j++) { IncreaseItemValueServerRpc(CraftableItems[CurrentSelectedRecipe].RequiredMaterials[j], -CraftableItems[CurrentSelectedRecipe].RequiredAmounts[j]); } ItemMadeEvent[CurrentSelectedRecipe].Invoke(); FabricateItemClientRpc(); IsCrafting = true; } } private IEnumerator ReactivateKeyboardCoroutine() { ((Collider)ConfirmTriggerCollider).enabled = false; yield return (object)new WaitForSeconds(3f); ((Collider)ConfirmTriggerCollider).enabled = true; if (((NetworkBehaviour)this).IsServer) { IsCrafting = false; } } [ClientRpc] private void FabricateItemClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(824846258u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 824846258u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(ReactivateKeyboardCoroutine()); KeyboardSfx.PlayOneShot(KeyPress); ScreenSfx.PlayOneShot(AmountDecrease); FabricationMachineSfx.PlayOneShot(FabricateClip); FabricationMachineAnimator.SetTrigger("fabricate"); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(299138212u, new RpcReceiveHandler(__rpc_handler_299138212), "NotifyServerRpc"); ((NetworkBehaviour)this).__registerRpc(2026554651u, new RpcReceiveHandler(__rpc_handler_2026554651), "UpdateSelectedItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(1939421538u, new RpcReceiveHandler(__rpc_handler_1939421538), "UpdateSelectedItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(402753916u, new RpcReceiveHandler(__rpc_handler_402753916), "IncreaseItemValueServerRpc"); ((NetworkBehaviour)this).__registerRpc(157012006u, new RpcReceiveHandler(__rpc_handler_157012006), "UpdateItemValueClientRpc"); ((NetworkBehaviour)this).__registerRpc(2553770164u, new RpcReceiveHandler(__rpc_handler_2553770164), "UpdateAllItemValuesClientRpc"); ((NetworkBehaviour)this).__registerRpc(2504342350u, new RpcReceiveHandler(__rpc_handler_2504342350), "ChangeHatchStateServerRpc"); ((NetworkBehaviour)this).__registerRpc(2353059567u, new RpcReceiveHandler(__rpc_handler_2353059567), "OpenHatchClientRpc"); ((NetworkBehaviour)this).__registerRpc(4143821699u, new RpcReceiveHandler(__rpc_handler_4143821699), "ChangePageServerRpc"); ((NetworkBehaviour)this).__registerRpc(1212384046u, new RpcReceiveHandler(__rpc_handler_1212384046), "ChangePageClientRpc"); ((NetworkBehaviour)this).__registerRpc(3879217258u, new RpcReceiveHandler(__rpc_handler_3879217258), "TryFabricateServerRpc"); ((NetworkBehaviour)this).__registerRpc(824846258u, new RpcReceiveHandler(__rpc_handler_824846258), "FabricateItemClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_299138212(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; ((FactoryCraftingStation)(object)target).NotifyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2026554651(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 page = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref page); target.__rpc_exec_stage = (__RpcExecStage)1; ((FactoryCraftingStation)(object)target).UpdateSelectedItemServerRpc(page); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1939421538(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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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)); int[] items = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref items, default(ForPrimitives)); } int page = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref page); target.__rpc_exec_stage = (__RpcExecStage)1; ((FactoryCraftingStation)(object)target).UpdateSelectedItemClientRpc(items, page); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_402753916(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int item = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref item); int value = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref value); target.__rpc_exec_stage = (__RpcExecStage)1; ((FactoryCraftingStation)(object)target).IncreaseItemValueServerRpc(item, value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_157012006(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_0074: 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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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 flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); int[] items = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref items, default(ForPrimitives)); } bool increase = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref increase, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FactoryCraftingStation)(object)target).UpdateItemValueClientRpc(items, increase); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2553770164(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_006e: 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_0058: 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 flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); int[] items = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref items, default(ForPrimitives)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((FactoryCraftingStation)(object)target).UpdateAllItemValuesClientRpc(items); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2504342350(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 value = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FactoryCraftingStation)(object)target).ChangeHatchStateServerRpc(value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2353059567(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 value = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FactoryCraftingStation)(object)target).OpenHatchClientRpc(value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4143821699(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 page = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref page); target.__rpc_exec_stage = (__RpcExecStage)1; ((FactoryCraftingStation)(object)target).ChangePageServerRpc(page); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1212384046(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 button = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref button, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FactoryCraftingStation)(object)target).ChangePageClientRpc(button); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3879217258(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; ((FactoryCraftingStation)(object)target).TryFabricateServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_824846258(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; ((FactoryCraftingStation)(object)target).FabricateItemClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FactoryCraftingStation"; } } internal class FailSafe : NetworkBehaviour { public string MoonScene; public void AddMoonToFailsafe() { AddMoonToFailsafeServerRpc(); } [ServerRpc(RequireOwnership = false)] private void AddMoonToFailsafeServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1605485431u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1605485431u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; WesleysInteriorToolsPlugin.CurrentSave.TryAddMoonToList(MoonScene); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1605485431u, new RpcReceiveHandler(__rpc_handler_1605485431), "AddMoonToFailsafeServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1605485431(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; ((FailSafe)(object)target).AddMoonToFailsafeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FailSafe"; } } internal class FaultyKnob : NetworkBehaviour { [SerializeField] private KnobsPuzzleController KnobsController; [SerializeField] private VaultObjective VaultPuzzleController; [SerializeField] private Transform KnobTransform; [SerializeField] private List KnobTwistSounds; [SerializeField] private AudioClip KnobCorrect; [SerializeField] private List KnobZap; [SerializeField] private ParticleSystem ZapParticle; [SerializeField] private AudioSource KnobSfx; public InteractTrigger KnobTrigger; public int KnobState = 0; public int CorrectKnobState = 0; public int KnobTurnAmount = 6; public bool IsCorrect; public bool IsKnobSet; public bool Faulty; public bool MakesCorrectSound = true; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } [ServerRpc(RequireOwnership = false)] private void SetKnobValuesServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1499118352u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1499118352u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int knobState = Random.Range(0, KnobTurnAmount); int correctKnobState = Random.Range(0, KnobTurnAmount); KnobState = knobState; CorrectKnobState = correctKnobState; IsKnobSet = true; IsCorrect = KnobState == CorrectKnobState; SetknobValueClientRpc(KnobState, CorrectKnobState, IsCorrect); } } } public void SetSpecificKnobValue(int knobState) { CorrectKnobState = knobState; IsCorrect = KnobState == CorrectKnobState; SetknobValueClientRpc(KnobState, CorrectKnobState, IsCorrect); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); SetKnobValues(); } private void SetKnobValues() { SetKnobValuesServerRpc(); } [ClientRpc] private void SetknobValueClientRpc(int dialState, int correctDialState, bool Correct) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2179545813u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, dialState); BytePacker.WriteValueBitPacked(val, correctDialState); ((FastBufferWriter)(ref val)).WriteValueSafe(ref Correct, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2179545813u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int index = Random.Range(0, KnobTwistSounds.Count); KnobSfx.PlayOneShot(KnobTwistSounds[index]); if (Faulty) { int index2 = Random.Range(0, KnobZap.Count); KnobSfx.PlayOneShot(KnobZap[index2]); ZapParticle.Play(); } else if (Correct && MakesCorrectSound) { KnobSfx.PlayOneShot(KnobCorrect); } float num = 360f / (float)KnobTurnAmount * (float)dialState; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(0f, num, 0f); Quaternion localRotation = Quaternion.Euler(0f, num, 0f); KnobTransform.localRotation = localRotation; } } public void IncreaseKnob() { CorrectKnobStateServerRpc(); KnobsController?.CheckKnobsServerRpc(); VaultPuzzleController?.CheckDials(); } [ServerRpc(RequireOwnership = false)] private void CorrectKnobStateServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3190098194u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3190098194u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (KnobState < KnobTurnAmount - 1) { KnobState++; } else { KnobState = 0; } IsCorrect = KnobState == CorrectKnobState; SetknobValueClientRpc(KnobState, CorrectKnobState, IsCorrect); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1499118352u, new RpcReceiveHandler(__rpc_handler_1499118352), "SetKnobValuesServerRpc"); ((NetworkBehaviour)this).__registerRpc(2179545813u, new RpcReceiveHandler(__rpc_handler_2179545813), "SetknobValueClientRpc"); ((NetworkBehaviour)this).__registerRpc(3190098194u, new RpcReceiveHandler(__rpc_handler_3190098194), "CorrectKnobStateServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1499118352(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; ((FaultyKnob)(object)target).SetKnobValuesServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2179545813(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int dialState = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref dialState); int correctDialState = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref correctDialState); bool correct = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref correct, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FaultyKnob)(object)target).SetknobValueClientRpc(dialState, correctDialState, correct); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3190098194(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; ((FaultyKnob)(object)target).CorrectKnobStateServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FaultyKnob"; } } internal class FlowMachineController : NetworkBehaviour { private int PuzzleState = 0; public UnityEvent Finish1Event; public UnityEvent Finish2Event; public UnityEvent Finish2EventClient; public List Levers; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePuzzle(); } private void InitialisePuzzle() { InitialisePuzzleServerRpc(); } [ServerRpc] private void InitialisePuzzleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1697321013u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1697321013u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (FlowMachineLever lever in Levers) { int num = Random.Range(1, lever.MaxLeverStates); lever.UpdateLeverState(num); int num2 = Random.Range(1, lever.MaxLeverStates); while (num == num2) { num2 = Random.Range(1, lever.MaxLeverStates); } lever.UpdateLeverCurrentState(num2); } } public void CheckLeverPuzzle() { if (!((NetworkBehaviour)this).IsServer) { return; } bool flag = true; foreach (FlowMachineLever lever in Levers) { if (!lever.GoalHit) { flag = false; } } if (!flag) { return; } foreach (FlowMachineLever lever2 in Levers) { lever2.FinishLeverPuzzle(); } FinishSecondObjective(); } public void FinishFirstObjective() { PuzzleState = 1; Finish1Event.Invoke(); } public void FinishSecondObjective() { PuzzleState = 2; Finish2Event.Invoke(); FinishSecondObjectiveClientRpc(); } [ClientRpc] public void FinishSecondObjectiveClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(328730752u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 328730752u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Finish2EventClient.Invoke(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1697321013u, new RpcReceiveHandler(__rpc_handler_1697321013), "InitialisePuzzleServerRpc"); ((NetworkBehaviour)this).__registerRpc(328730752u, new RpcReceiveHandler(__rpc_handler_328730752), "FinishSecondObjectiveClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1697321013(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((FlowMachineController)(object)target).InitialisePuzzleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_328730752(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; ((FlowMachineController)(object)target).FinishSecondObjectiveClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FlowMachineController"; } } internal class FlowMachineLever : NetworkBehaviour { public int LeverState = 0; public int MaxLeverStates = 10; public int LeverGoal = 5; public bool FinishWhenHit; public bool Disabled; public bool Completed; public bool GoalHit = false; public Animator LeverAnimator; public TMP_Text NumberDisplay; public AudioSource LeverSwitchSfx; public AudioSource LeverPostSwitchSfx; public AudioClip LeverSwitchClipUp; public AudioClip LeverSwitchClipDown; public AudioClip LeverPostMoveClip; public AnimationCurve LeverSwitchCurve; public InteractTrigger LeverTriggerDown; public InteractTrigger LeverTriggerUp; public UnityEvent LeverTriggerEnter; public FlowMachineController LeverController; private float LeverAnimationProgress; private void Awake() { InitLever(); } private void InitLever() { if (Disabled) { LeverTriggerDown.interactable = false; LeverTriggerUp.interactable = false; } else { SetLeverTriggers(LeverState); } ((MonoBehaviour)this).StartCoroutine(MoveLeverCoroutine(0f, 0.6f, 0)); if ((Object)(object)NumberDisplay != (Object)null) { NumberDisplay.text = LeverGoal.ToString(); } } public void UpdateLeverState(int NewGoal) { UpdateLeverStateClientRpc(NewGoal); LeverGoal = NewGoal; } public void UpdateLeverCurrentState(int newStartState) { LeverState = newStartState; float leverAnimState = 1f / (float)MaxLeverStates * (float)LeverState; UpdateLeverCurrentStateClientRpc(newStartState, leverAnimState); } [ClientRpc] public void UpdateLeverCurrentStateClientRpc(int newStartState, float leverAnimState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(778468796u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, newStartState); ((FastBufferWriter)(ref val)).WriteValueSafe(ref leverAnimState, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 778468796u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(MoveLeverCoroutine(leverAnimState, 0.6f, newStartState)); LeverState = newStartState; SetLeverTriggers(newStartState); } } } [ClientRpc] public void UpdateLeverStateClientRpc(int NewGoal) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1465329653u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, NewGoal); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1465329653u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)NumberDisplay != (Object)null) { NumberDisplay.text = NewGoal.ToString(); } } } public void EnableLever() { Disabled = false; SetLeverTriggers(LeverState); } private void SetLeverTriggers(int leverState) { if (Disabled) { LeverTriggerDown.interactable = false; LeverTriggerUp.interactable = false; return; } if (leverState == 0) { LeverTriggerDown.interactable = false; } else { LeverTriggerDown.interactable = true; } if (leverState == MaxLeverStates) { LeverTriggerUp.interactable = false; } else { LeverTriggerUp.interactable = true; } if (((NetworkBehaviour)this).IsServer) { GoalHit = leverState == LeverGoal; } if (Completed) { LeverTriggerDown.interactable = false; LeverTriggerUp.interactable = false; } } public void MoveLeverDown() { MoveLeverServerRpc(-1, moveDown: true); } public void MoveLeverUp() { MoveLeverServerRpc(1, moveDown: false); } [ServerRpc(RequireOwnership = false)] private void MoveLeverServerRpc(int leverChange, bool moveDown) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1158357355u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, leverChange); ((FastBufferWriter)(ref val)).WriteValueSafe(ref moveDown, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1158357355u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; LeverState += leverChange; float leverAnimState = 1f / (float)MaxLeverStates * (float)LeverState; MoveLeverClientRpc(leverAnimState, LeverState, moveDown); } } } [ClientRpc] private void MoveLeverClientRpc(float leverAnimState, int newLevers, bool moveDown) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(544525971u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref leverAnimState, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, newLevers); ((FastBufferWriter)(ref val)).WriteValueSafe(ref moveDown, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 544525971u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; LeverTriggerDown.interactable = false; LeverTriggerUp.interactable = false; ((MonoBehaviour)this).StartCoroutine(MoveLeverCoroutine(leverAnimState, 0.6f, newLevers)); if (moveDown) { LeverSwitchSfx.PlayOneShot(LeverSwitchClipDown); } else { LeverSwitchSfx.PlayOneShot(LeverSwitchClipUp); } } } private IEnumerator MoveLeverCoroutine(float leverAnimState, float duration, int newLevers) { float time = 0f; float AnimationProgress = LeverAnimationProgress; while (time < duration) { time += Time.deltaTime; float leverCurve = LeverSwitchCurve.Evaluate(time / duration); LeverAnimationProgress = Mathf.Lerp(AnimationProgress, leverAnimState, leverCurve); LeverAnimator.SetFloat("leverstate", LeverAnimationProgress); yield return 0; } AudioSource leverPostSwitchSfx = LeverPostSwitchSfx; if (leverPostSwitchSfx != null) { leverPostSwitchSfx.PlayOneShot(LeverPostMoveClip); } SetLeverTriggers(newLevers); if (((NetworkBehaviour)this).IsServer) { LeverController?.CheckLeverPuzzle(); } if (((NetworkBehaviour)this).IsServer && GoalHit && FinishWhenHit) { FinishLeverPuzzle(); } yield return 0; } public void FinishLeverPuzzle() { FinishLeverPuzzleClientRpc(); } [ClientRpc] private void FinishLeverPuzzleClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3740122879u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3740122879u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; LeverTriggerDown.interactable = false; LeverTriggerUp.interactable = false; Completed = true; LeverTriggerEnter.Invoke(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(778468796u, new RpcReceiveHandler(__rpc_handler_778468796), "UpdateLeverCurrentStateClientRpc"); ((NetworkBehaviour)this).__registerRpc(1465329653u, new RpcReceiveHandler(__rpc_handler_1465329653), "UpdateLeverStateClientRpc"); ((NetworkBehaviour)this).__registerRpc(1158357355u, new RpcReceiveHandler(__rpc_handler_1158357355), "MoveLeverServerRpc"); ((NetworkBehaviour)this).__registerRpc(544525971u, new RpcReceiveHandler(__rpc_handler_544525971), "MoveLeverClientRpc"); ((NetworkBehaviour)this).__registerRpc(3740122879u, new RpcReceiveHandler(__rpc_handler_3740122879), "FinishLeverPuzzleClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_778468796(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int newStartState = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newStartState); float leverAnimState = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref leverAnimState, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FlowMachineLever)(object)target).UpdateLeverCurrentStateClientRpc(newStartState, leverAnimState); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1465329653(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 newGoal = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newGoal); target.__rpc_exec_stage = (__RpcExecStage)1; ((FlowMachineLever)(object)target).UpdateLeverStateClientRpc(newGoal); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1158357355(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int leverChange = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref leverChange); bool moveDown = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref moveDown, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FlowMachineLever)(object)target).MoveLeverServerRpc(leverChange, moveDown); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_544525971(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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float leverAnimState = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref leverAnimState, default(ForPrimitives)); int newLevers = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newLevers); bool moveDown = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref moveDown, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FlowMachineLever)(object)target).MoveLeverClientRpc(leverAnimState, newLevers, moveDown); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3740122879(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; ((FlowMachineLever)(object)target).FinishLeverPuzzleClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "FlowMachineLever"; } } internal class GlobalNetworkEvent : NetworkBehaviour { public UnityEvent GlobalEventServer; public UnityEvent GlobalEventClient; public void InvokeGlobalEvents() { InvokeGlobalEventsServerRpc(); } [ServerRpc(RequireOwnership = false)] public void InvokeGlobalEventsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(768171751u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 768171751u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; InvokeGlobalEventClientRpc(); List list = new List(); list.AddRange(Object.FindObjectsOfType()); foreach (GlobalNetworkEvent item in list) { item.GlobalEventServer.Invoke(); } } [ClientRpc] private void InvokeGlobalEventClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1404712060u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1404712060u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; List list = new List(); list.AddRange(Object.FindObjectsOfType()); foreach (GlobalNetworkEvent item in list) { item.GlobalEventClient.Invoke(); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(768171751u, new RpcReceiveHandler(__rpc_handler_768171751), "InvokeGlobalEventsServerRpc"); ((NetworkBehaviour)this).__registerRpc(1404712060u, new RpcReceiveHandler(__rpc_handler_1404712060), "InvokeGlobalEventClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_768171751(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; ((GlobalNetworkEvent)(object)target).InvokeGlobalEventsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1404712060(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; ((GlobalNetworkEvent)(object)target).InvokeGlobalEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "GlobalNetworkEvent"; } } internal class GlowFlower : MonoBehaviour { public ParticleSystem ParticleSystem; public float EmissionIntensityTarget = 6f; private float CurrentEmissionIntensity; private bool CanInteract = true; public MeshRenderer Renderer; public SkinnedMeshRenderer SkinnedRenderer; public AnimationCurve AnimationCurve; public int materialEntry; public float Duration; public bool UseManualTrigger = false; public bool CanEnemiesTrigger = false; private void OnTriggerEnter(Collider other) { if (!UseManualTrigger) { if (((Component)other).tag == "Player" && CanInteract) { ((MonoBehaviour)this).StartCoroutine(GlowCoroutine()); } if (((Component)other).tag == "Enemy" && CanEnemiesTrigger && CanInteract) { ((MonoBehaviour)this).StartCoroutine(GlowCoroutine()); } } } public void Glow() { ((MonoBehaviour)this).StartCoroutine(GlowCoroutine()); } private IEnumerator GlowCoroutine() { CanInteract = false; float t = 0f; ParticleSystem particleSystem = ParticleSystem; if (particleSystem != null) { particleSystem.Play(); } while (t < Duration) { t += Time.deltaTime; float calculatedTime = t / Duration; float evaluatedTime = AnimationCurve.Evaluate(calculatedTime); CurrentEmissionIntensity = evaluatedTime * EmissionIntensityTarget; MeshRenderer renderer = Renderer; if (renderer != null) { ((Renderer)renderer).materials[materialEntry].SetColor("_EmissiveColor", Color.white * CurrentEmissionIntensity); } SkinnedMeshRenderer skinnedRenderer = SkinnedRenderer; if (skinnedRenderer != null) { ((Renderer)skinnedRenderer).materials[materialEntry].SetColor("_EmissiveColor", Color.white * CurrentEmissionIntensity); } yield return 0; } yield return (object)new WaitForSeconds(1f); CanInteract = true; } } internal class HitZapChanceCalculator : NetworkBehaviour { public float ZapSuccessChance; public float HitSuccessChance; public AudioSource AudioSource; public AudioClip FailClip; public UnityEvent ZapEventHost; public UnityEvent ZapEventClient; public UnityEvent HitEventHost; public UnityEvent HitEventClient; public void CalculateZap() { float num = Random.Range(0f, 1f); if (num < ZapSuccessChance / 100f) { SuccessServerRpc(zap: true); } else { FailServerRpc(); } } public void CalculateHit() { float num = Random.Range(0f, 1f); if (num < HitSuccessChance / 100f) { SuccessServerRpc(zap: false); } else { FailServerRpc(); } } [ServerRpc(RequireOwnership = false)] private void FailServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4014229628u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4014229628u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; FailClientRpc(); } } } [ClientRpc] private void FailClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3501964888u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3501964888u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioSource audioSource = AudioSource; if (audioSource != null) { audioSource.PlayOneShot(FailClip); } } } [ServerRpc(RequireOwnership = false)] private void SuccessServerRpc(bool zap) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(387141347u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref zap, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 387141347u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (zap) { ZapEventHost.Invoke(); } else { HitEventHost.Invoke(); } SuccessClientRpc(zap); } } [ClientRpc] private void SuccessClientRpc(bool zap) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1910777067u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref zap, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1910777067u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (zap) { ZapEventClient.Invoke(); } else { HitEventClient.Invoke(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(4014229628u, new RpcReceiveHandler(__rpc_handler_4014229628), "FailServerRpc"); ((NetworkBehaviour)this).__registerRpc(3501964888u, new RpcReceiveHandler(__rpc_handler_3501964888), "FailClientRpc"); ((NetworkBehaviour)this).__registerRpc(387141347u, new RpcReceiveHandler(__rpc_handler_387141347), "SuccessServerRpc"); ((NetworkBehaviour)this).__registerRpc(1910777067u, new RpcReceiveHandler(__rpc_handler_1910777067), "SuccessClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4014229628(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; ((HitZapChanceCalculator)(object)target).FailServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3501964888(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; ((HitZapChanceCalculator)(object)target).FailClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_387141347(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 zap = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref zap, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HitZapChanceCalculator)(object)target).SuccessServerRpc(zap); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1910777067(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 zap = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref zap, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HitZapChanceCalculator)(object)target).SuccessClientRpc(zap); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "HitZapChanceCalculator"; } } internal class HostLimiter : NetworkBehaviour { public UnityEvent HostEvent; public void TryInvokeEvent() { if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { HostEvent.Invoke(); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "HostLimiter"; } } internal class HyxAngerManagementIssues : NetworkBehaviour { private int HyxAngeredState; private float HyxAngerMeter; public float AngerLevel1; public float AngerLevel2; public float AngerLevel3; public AudioSource HyxAngerOutsideSfx; public AudioSource HyxAngerInsideSfx; public AudioClip HyxAngerOutside1; public AudioClip HyxAngerOutside2; public AudioClip HyxAngerOutside3; public AudioClip HyxAngerInside1; public AudioClip HyxAngerInside2; public AudioClip HyxAngerInside3; public List Tentacles; public List OutsideTentacles; public List OutsideTentacles2; public UnityEvent AngerEvent; public UnityEvent SpawnEvent; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private void Update() { if (!((NetworkBehaviour)this).IsServer) { return; } float num = TimeOfDay.Instance.currentDayTime / TimeOfDay.Instance.totalTime; if (num < 0.96f && num > 0.8f) { if (HyxAngerMeter < AngerLevel3) { HyxAngerMeter += 0.08f * Time.deltaTime; } CheckAngerValue(); } } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); CalmYourShit(unCalm: false); } private void CalmYourShit(bool unCalm) { foreach (GameObject tentacle in Tentacles) { tentacle.SetActive(unCalm); } } public void IncreaseAnger(float AngerValue) { IncreaseHyxAngerMeterServerRpc(AngerValue); } [ServerRpc(RequireOwnership = false)] private void IncreaseHyxAngerMeterServerRpc(float AngerValue) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2463562447u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref AngerValue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2463562447u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; HyxAngerMeter += AngerValue; CheckAngerValue(); } } } private void CheckAngerValue() { if (HyxAngerMeter > AngerLevel1 && HyxAngeredState < 1) { HyxAngeredState = 1; TriggerAngerEffectClientRpc(HyxAngeredState); } else if (HyxAngerMeter > AngerLevel2 && HyxAngeredState < 2) { HyxAngeredState = 2; TriggerAngerEffectClientRpc(HyxAngeredState); } else if (HyxAngerMeter > AngerLevel3 && HyxAngeredState < 3) { HyxAngeredState = 3; TriggerAngerEffectClientRpc(HyxAngeredState); } } [ClientRpc] private void TriggerAngerEffectClientRpc(int HyxAngeredState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2233233339u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, HyxAngeredState); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2233233339u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; AngerEvent.Invoke(); switch (HyxAngeredState) { case 1: Tentacles[0].SetActive(true); HyxAngerOutsideSfx.PlayOneShot(HyxAngerOutside1); HyxAngerInsideSfx.PlayOneShot(HyxAngerInside1); SpawnEvent.Invoke(); { foreach (Animator outsideTentacle in OutsideTentacles) { outsideTentacle.SetTrigger("start"); } break; } case 2: Tentacles[12].SetActive(true); Tentacles[6].SetActive(true); Tentacles[3].SetActive(true); HyxAngerOutsideSfx.PlayOneShot(HyxAngerOutside2); HyxAngerInsideSfx.PlayOneShot(HyxAngerInside2); { foreach (Animator item in OutsideTentacles2) { item.SetTrigger("start"); } break; } case 3: HyxAngerOutsideSfx.PlayOneShot(HyxAngerOutside3); HyxAngerInsideSfx.PlayOneShot(HyxAngerInside3); CalmYourShit(unCalm: true); break; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2463562447u, new RpcReceiveHandler(__rpc_handler_2463562447), "IncreaseHyxAngerMeterServerRpc"); ((NetworkBehaviour)this).__registerRpc(2233233339u, new RpcReceiveHandler(__rpc_handler_2233233339), "TriggerAngerEffectClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2463562447(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 angerValue = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref angerValue, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HyxAngerManagementIssues)(object)target).IncreaseHyxAngerMeterServerRpc(angerValue); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2233233339(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 hyxAngeredState = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hyxAngeredState); target.__rpc_exec_stage = (__RpcExecStage)1; ((HyxAngerManagementIssues)(object)target).TriggerAngerEffectClientRpc(hyxAngeredState); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "HyxAngerManagementIssues"; } } internal class Hyxifier : MonoBehaviour { public UnityEvent Event; public UnityEvent InverseEvent; private void Awake() { bool flag = false; SelectableLevel currentLevel = RoundManager.Instance.currentLevel; if (currentLevel.sceneName == "HyxScene") { flag = true; } if (flag) { Event.Invoke(); } else { InverseEvent.Invoke(); } } } internal class KnobsPuzzleController : NetworkBehaviour { public List Knobs; public int FaultyAmount; public Animator ButtonAnimator; public ParticleSystem SuccessParticles; public ParticleSystem KillParticles; public AudioSource KnobsPuzzleSfx; public AudioSource ElectricitySfx; public AudioClip KillClip; public AudioClip VictoryClip; private bool AllKnobsCorrect; public UnityEvent PuzzleSolveEvent; public InteractTrigger ButtonTrigger; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePuzzle(); } private void InitialisePuzzle() { InitialisePuzzleServerRpc(); } [ServerRpc] private void InitialisePuzzleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1632431392u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1632431392u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; int[] array = new int[FaultyAmount]; for (int i = 0; i < FaultyAmount; i++) { int num = Random.Range(0, Knobs.Count); while (array.Contains(num)) { num = Random.Range(0, Knobs.Count); } array[i] = num; SetKnobFaultyClientRpc(num); } } [ClientRpc] private void SetKnobFaultyClientRpc(int knob) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4091225552u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, knob); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4091225552u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Knobs[knob].Faulty = true; } } } public void PressButton(PlayerControllerB player) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (!AllKnobsCorrect) { player.DamagePlayer(40, true, true, (CauseOfDeath)11, 3, false, default(Vector3)); } PressButtonServerRpc(force: false); } [ServerRpc(RequireOwnership = false)] private void PressButtonServerRpc(bool force) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(759411258u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref force, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 759411258u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (force) { PuzzleSolveEvent.Invoke(); PressButtonClientRpc(correct: true); return; } if (AllKnobsCorrect) { PuzzleSolveEvent.Invoke(); } PressButtonClientRpc(AllKnobsCorrect); } [ClientRpc] private void PressButtonClientRpc(bool correct) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3880309333u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref correct, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3880309333u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!correct) { ElectricitySfx.PlayOneShot(KillClip); KillParticles.Play(); } else { ElectricitySfx.PlayOneShot(VictoryClip); SuccessParticles.Play(); foreach (FaultyKnob knob in Knobs) { knob.KnobTrigger.interactable = false; } ButtonTrigger.interactable = false; } ButtonAnimator.SetTrigger("press"); } [ServerRpc(RequireOwnership = false)] public void CheckKnobsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(372148130u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 372148130u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; bool correct = true; foreach (FaultyKnob knob in Knobs) { if ((knob.Faulty && knob.KnobState != 0) || (!knob.Faulty && knob.KnobState != knob.CorrectKnobState)) { correct = false; break; } } CheckKnobsClientRpc(correct); } [ClientRpc] private void CheckKnobsClientRpc(bool correct) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(243172592u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref correct, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 243172592u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AllKnobsCorrect = correct; } } } public void FinishPuzzle() { PressButtonServerRpc(force: true); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1632431392u, new RpcReceiveHandler(__rpc_handler_1632431392), "InitialisePuzzleServerRpc"); ((NetworkBehaviour)this).__registerRpc(4091225552u, new RpcReceiveHandler(__rpc_handler_4091225552), "SetKnobFaultyClientRpc"); ((NetworkBehaviour)this).__registerRpc(759411258u, new RpcReceiveHandler(__rpc_handler_759411258), "PressButtonServerRpc"); ((NetworkBehaviour)this).__registerRpc(3880309333u, new RpcReceiveHandler(__rpc_handler_3880309333), "PressButtonClientRpc"); ((NetworkBehaviour)this).__registerRpc(372148130u, new RpcReceiveHandler(__rpc_handler_372148130), "CheckKnobsServerRpc"); ((NetworkBehaviour)this).__registerRpc(243172592u, new RpcReceiveHandler(__rpc_handler_243172592), "CheckKnobsClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1632431392(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((KnobsPuzzleController)(object)target).InitialisePuzzleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4091225552(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 knobFaultyClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref knobFaultyClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((KnobsPuzzleController)(object)target).SetKnobFaultyClientRpc(knobFaultyClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_759411258(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 force = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref force, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KnobsPuzzleController)(object)target).PressButtonServerRpc(force); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3880309333(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 correct = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref correct, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KnobsPuzzleController)(object)target).PressButtonClientRpc(correct); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_372148130(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; ((KnobsPuzzleController)(object)target).CheckKnobsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_243172592(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 correct = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref correct, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KnobsPuzzleController)(object)target).CheckKnobsClientRpc(correct); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "KnobsPuzzleController"; } } public class LampSwitch : NetworkBehaviour { public int Id; public LightsPuzzle Controller; public Animator Animator; public InteractTrigger Trigger; public AudioSource Audio; public AudioClip OnClip; public AudioClip OffClip; public bool Switch; public void SetLightSwitch(bool value) { Switch = value; SetLightSwitchClientRpc(value); } [ClientRpc] private void SetLightSwitchClientRpc(bool value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3013346676u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3013346676u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Animator.SetBool("flicked", value); if (value) { Audio.PlayOneShot(OnClip); } else { Audio.PlayOneShot(OffClip); } } } public void FlickSwitch() { FlickSwitchServerRpc(); } [ServerRpc(RequireOwnership = false)] private void FlickSwitchServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(517458149u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 517458149u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Switch = !Switch; SetLightSwitchClientRpc(Switch); Controller.CheckValues(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3013346676u, new RpcReceiveHandler(__rpc_handler_3013346676), "SetLightSwitchClientRpc"); ((NetworkBehaviour)this).__registerRpc(517458149u, new RpcReceiveHandler(__rpc_handler_517458149), "FlickSwitchServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3013346676(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 lightSwitchClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lightSwitchClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((LampSwitch)(object)target).SetLightSwitchClientRpc(lightSwitchClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_517458149(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; ((LampSwitch)(object)target).FlickSwitchServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "LampSwitch"; } } internal class LassomanCrystalEvent : NetworkBehaviour { public InteractTrigger EnterTrigger; public InteractTrigger LeaveTrigger; public void Enter() { EnterTrigger.interactable = false; LeaveTrigger.interactable = true; } public void InitiateLassoEvent() { InitiateLassoEventServerRpc(); } [ServerRpc(RequireOwnership = false)] private void InitiateLassoEventServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1748784252u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1748784252u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; InitiateLassoEventClientRpc(); } } } [ClientRpc] private void InitiateLassoEventClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(770897845u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 770897845u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; EnterTrigger.interactable = false; LeaveTrigger.interactable = false; LassomanObject[] array = Object.FindObjectsOfType(); LassomanObject[] array2 = array; foreach (LassomanObject lassomanObject in array2) { lassomanObject.LassomanReleasedEvent(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1748784252u, new RpcReceiveHandler(__rpc_handler_1748784252), "InitiateLassoEventServerRpc"); ((NetworkBehaviour)this).__registerRpc(770897845u, new RpcReceiveHandler(__rpc_handler_770897845), "InitiateLassoEventClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1748784252(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; ((LassomanCrystalEvent)(object)target).InitiateLassoEventServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_770897845(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; ((LassomanCrystalEvent)(object)target).InitiateLassoEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "LassomanCrystalEvent"; } } internal class LassomanObject : MonoBehaviour { public Animator Animator; public UnityEvent Event; public void LassomanReleasedEvent() { Animator animator = Animator; if (animator != null) { animator.SetBool("stop", true); } UnityEvent obj = Event; if (obj != null) { obj.Invoke(); } } } internal class LassomanPainting : MonoBehaviour { public LassomanPaintingController Controller; public Animator LassoPaintingAnimator; public AudioSource LassoPaintingSfx; public AudioClip LassoAppearClip; public AudioClip LassoAttackClip; public VanishEffect PaintingStage1; public VanishEffect PaintingStage2; public VanishEffect PaintingStage3; public int ID; public bool IsPaintingActive; public bool CanPaintingHear; public bool IsAttacking; public int NoiseHeard = 0; public int NoiseThreshold = 38; public void MakePaintingActive() { ((MonoBehaviour)this).StartCoroutine(PaintingAppearEffectCoroutine()); IsPaintingActive = true; } public void MakePaintingInactive() { PaintingStage3.MakeVisible(); CanPaintingHear = false; IsPaintingActive = false; } private IEnumerator PaintingAppearEffectCoroutine() { PaintingStage1.MakeInvisible(); yield return (object)new WaitForSeconds(4f); PaintingStage2.MakeInvisible(); yield return (object)new WaitForSeconds(4f); PaintingStage1.MakeVisible(); PaintingStage2.MakeVisible(); PaintingStage3.MakeInvisible(); LassoPaintingSfx.PlayOneShot(LassoAppearClip); CanPaintingHear = true; } public void IncreaseNoiseHeard() { if (CanPaintingHear && IsPaintingActive) { if (NoiseHeard < NoiseThreshold) { NoiseHeard++; } else if (!IsAttacking) { IsAttacking = true; PaintingAttack(); } } } public void DoPaintingAttackSequence() { ((MonoBehaviour)this).StartCoroutine(PaintingAttackSequence()); } private IEnumerator PaintingAttackSequence() { LassoPaintingSfx.PlayOneShot(LassoAttackClip); LassoPaintingAnimator.SetTrigger("attack"); yield return (object)new WaitForSeconds(15f); IsPaintingActive = false; PaintingStage3.MakeVisible(); IsAttacking = false; NoiseHeard = 0; } public void PaintingAttack() { Controller.PaintingAttackServerRpc(ID); } private void OnTriggerEnter(Collider other) { if (((Component)other).tag == "Player") { Controller.TryPingPainting(ID); } } } internal class LassomanPaintingController : NetworkBehaviour { private LassomanPainting[] Paintings; private LassomanPainting ActivePainting; public float SwitchPaintingCooldown = 30f; private float SwitchPaintingTimer = 0f; private bool CanSwitchPainting = true; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private void Update() { if (((NetworkBehaviour)this).IsServer && SwitchPaintingTimer > 0f) { SwitchPaintingTimer -= Time.deltaTime; } } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePaintings(); } private void InitialisePaintings() { Paintings = Object.FindObjectsOfType(); for (int i = 0; i < Paintings.Length; i++) { Paintings[i].Controller = this; Paintings[i].ID = i; } } public void TryPingPainting(int id) { TryPingPaintingServerRpc(id); } [ServerRpc(RequireOwnership = false)] private void TryPingPaintingServerRpc(int id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1665481977u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, id); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1665481977u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (CanSwitchPainting) { int num = -1; if ((Object)(object)ActivePainting != (Object)null) { num = ActivePainting.ID; } if ((num == -1 || num != id) && SwitchPaintingTimer <= 0f && (num == -1 || !Paintings[num].IsAttacking)) { ActivePainting = Paintings[id]; SwitchPaintingTimer = SwitchPaintingCooldown; SwitchPaintingClientRpc(id, num); } } } [ClientRpc] private void SwitchPaintingClientRpc(int id, int prevId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2605237581u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, id); BytePacker.WriteValueBitPacked(val, prevId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2605237581u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (prevId != -1) { Paintings[prevId].MakePaintingInactive(); } Paintings[id].MakePaintingActive(); } } [ServerRpc] public void PaintingAttackServerRpc(int id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(97129415u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, id); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 97129415u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SwitchPaintingTimer += 30f; PaintingAttackClientRpc(id); } } [ClientRpc] private void PaintingAttackClientRpc(int id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(24319310u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, id); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 24319310u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Paintings[id].CanPaintingHear = false; Paintings[id].IsAttacking = true; Paintings[id].DoPaintingAttackSequence(); } } } public void StopLasso() { StopLassoServerRpc(); } [ServerRpc] private void StopLassoServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1745949478u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1745949478u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)ActivePainting == (Object)null)) { CanSwitchPainting = false; ActivePainting = null; DisablePaintingClientRpc(ActivePainting.ID); } } } [ClientRpc] private void DisablePaintingClientRpc(int id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1549551505u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, id); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1549551505u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Paintings[id].MakePaintingInactive(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1665481977u, new RpcReceiveHandler(__rpc_handler_1665481977), "TryPingPaintingServerRpc"); ((NetworkBehaviour)this).__registerRpc(2605237581u, new RpcReceiveHandler(__rpc_handler_2605237581), "SwitchPaintingClientRpc"); ((NetworkBehaviour)this).__registerRpc(97129415u, new RpcReceiveHandler(__rpc_handler_97129415), "PaintingAttackServerRpc"); ((NetworkBehaviour)this).__registerRpc(24319310u, new RpcReceiveHandler(__rpc_handler_24319310), "PaintingAttackClientRpc"); ((NetworkBehaviour)this).__registerRpc(1745949478u, new RpcReceiveHandler(__rpc_handler_1745949478), "StopLassoServerRpc"); ((NetworkBehaviour)this).__registerRpc(1549551505u, new RpcReceiveHandler(__rpc_handler_1549551505), "DisablePaintingClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1665481977(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((LassomanPaintingController)(object)target).TryPingPaintingServerRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2605237581(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); int prevId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref prevId); target.__rpc_exec_stage = (__RpcExecStage)1; ((LassomanPaintingController)(object)target).SwitchPaintingClientRpc(id, prevId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_97129415(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((LassomanPaintingController)(object)target).PaintingAttackServerRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_24319310(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((LassomanPaintingController)(object)target).PaintingAttackClientRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1745949478(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((LassomanPaintingController)(object)target).StopLassoServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1549551505(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((LassomanPaintingController)(object)target).DisablePaintingClientRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "LassomanPaintingController"; } } internal class LightDimmer : MonoBehaviour { public Animator Dimmer; public void DimLights(bool dim) { Dimmer.SetBool("dimmer", dim); } } [Serializable] public class SmallLight { public MeshRenderer Renderer; public List CordRenderers; public bool enabled; public int connectedId; } public class LightsPuzzle : NetworkBehaviour { public List Lights; public Material LedOff; public Material LedOn; public List LampSwitches; private int[] LightIds; private bool[] LightStatuses; public ParticleSystem FinishParticles; public AudioSource AudioSource; public AudioClip FinishAudioClip; public UnityEvent PuzzleCompleteEvent; private bool HasFinished = false; private void Awake() { for (int i = 0; i < LampSwitches.Count; i++) { LampSwitches[i].Controller = this; LampSwitches[i].Id = i; } ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePuzzle(); } private void InitialisePuzzle() { InitialisePuzzleServerRpc(); } [ServerRpc] private void InitialisePuzzleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1678332150u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1678332150u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; LightIds = new int[Lights.Count]; LightStatuses = new bool[Lights.Count]; int[] array = new int[LampSwitches.Count]; for (int i = 0; i < array.Length; i++) { array[i] = -1; } for (int j = 0; j < LightIds.Length; j++) { bool flag = Random.Range(0f, 1f) < 0.5f; LightStatuses[j] = flag; Lights[j].enabled = flag; bool lightSwitch = Random.Range(0f, 1f) < 0.5f; LampSwitches[j].SetLightSwitch(lightSwitch); int num = Random.Range(0, LampSwitches.Count); while (array.Contains(num)) { num = Random.Range(0, LampSwitches.Count); } array[j] = num; LightIds[j] = LampSwitches[num].Id; Lights[j].connectedId = LampSwitches[num].Id; } SetSwitchesClientRpc(LightIds, LightStatuses); } [ClientRpc] private void SetSwitchesClientRpc(int[] lightIds, bool[] lightStatuses) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1199730496u, val2, (RpcDelivery)0); bool flag = lightIds != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(lightIds, default(ForPrimitives)); } bool flag2 = lightStatuses != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val)).WriteValueSafe(lightStatuses, default(ForPrimitives)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1199730496u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; for (int i = 0; i < lightIds.Length; i++) { if (lightStatuses[i]) { ((Renderer)Lights[i].Renderer).material = LedOn; } else { ((Renderer)Lights[i].Renderer).material = LedOff; } ((Renderer)Lights[i].CordRenderers[lightIds[i]]).enabled = true; } } public void CheckValues() { if (HasFinished) { return; } bool flag = true; for (int i = 0; i < LampSwitches.Count; i++) { if (LightStatuses[i] != LampSwitches[Lights[i].connectedId].Switch) { flag = false; } } if (flag) { HasFinished = true; PuzzleCompleteEvent.Invoke(); FinishPuzzleClientRpc(); } } [ClientRpc] public void FinishPuzzleClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1166993982u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1166993982u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (LampSwitch lampSwitch in LampSwitches) { lampSwitch.Trigger.interactable = false; } AudioSource.PlayOneShot(FinishAudioClip); FinishParticles.Play(); } public void ForceFinish() { HasFinished = true; PuzzleCompleteEvent.Invoke(); FinishPuzzleClientRpc(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1678332150u, new RpcReceiveHandler(__rpc_handler_1678332150), "InitialisePuzzleServerRpc"); ((NetworkBehaviour)this).__registerRpc(1199730496u, new RpcReceiveHandler(__rpc_handler_1199730496), "SetSwitchesClientRpc"); ((NetworkBehaviour)this).__registerRpc(1166993982u, new RpcReceiveHandler(__rpc_handler_1166993982), "FinishPuzzleClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1678332150(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((LightsPuzzle)(object)target).InitialisePuzzleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1199730496(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_0074: 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_0058: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); int[] lightIds = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref lightIds, default(ForPrimitives)); } bool flag2 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag2, default(ForPrimitives)); bool[] lightStatuses = null; if (flag2) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref lightStatuses, default(ForPrimitives)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((LightsPuzzle)(object)target).SetSwitchesClientRpc(lightIds, lightStatuses); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1166993982(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; ((LightsPuzzle)(object)target).FinishPuzzleClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "LightsPuzzle"; } } internal class MaskStatue : NetworkBehaviour { private MaskStatueManager StatueManager; [SerializeField] private OptionalObjectivePrefab OptionalObjectivePrefab; [SerializeField] private AudioSource StatueSfx; [SerializeField] private List StatueTurnSounds; [SerializeField] private AnimationCurve StatueTurnCurve; private int Pose = 0; private int MaskType = 0; private int Direction = 0; private float YRotation = 0f; private float CurrentYRotation = 0f; private int CorrectDirection = 0; private bool IsRotationCorrect; public Animator PoseAnimator; public List MaskObjects; public Transform PlatformTransform; public InteractTrigger InteractTrigger; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(7f); PickRandomStatueValues(); } public void PickRandomStatueValues() { PickRandomStatueValuesServerRpc(); } [ServerRpc] private void PickRandomStatueValuesServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2446439539u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2446439539u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int pose = Random.Range(0, 7); int maskType = Random.Range(0, 2); int direction = Random.Range(0, 4); Pose = pose; MaskType = maskType; Direction = direction; StatueManager = Object.FindObjectOfType(); if (MaskType == 0) { CorrectDirection = StatueManager.TragedyDirection; } else { CorrectDirection = StatueManager.ComedyDirection; } SetRandomPoseClientRpc(Pose, MaskType, Direction, CorrectDirection); } } [ClientRpc] private void SetRandomPoseClientRpc(int pose, int maskType, int direction, int correctDirection) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1005305886u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, pose); BytePacker.WriteValueBitPacked(val, maskType); BytePacker.WriteValueBitPacked(val, direction); BytePacker.WriteValueBitPacked(val, correctDirection); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1005305886u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; string trigger = "pose" + pose; string text = "direction" + direction; PoseAnimator.SetTrigger(trigger); MaskObjects[maskType].SetActive(true); Pose = pose; MaskType = maskType; Direction = direction; CorrectDirection = correctDirection; SetInitialRotation(); CheckRotationCorrect(); } } } private void SetInitialRotation() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) switch (Direction) { case 0: YRotation = 0f; break; case 1: YRotation = 90f; break; case 2: YRotation = 180f; break; case 3: YRotation = 270f; break; } CurrentYRotation = YRotation; PlatformTransform.eulerAngles = new Vector3(0f, CurrentYRotation, 0f); } public void TurnStatue() { SetNewTurnValueServerRpc(); } [ServerRpc(RequireOwnership = false)] private void SetNewTurnValueServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2369159840u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2369159840u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (Direction == 0) { YRotation = 0f; } if (Direction < 3) { Direction++; } else { Direction = 0; } float yRotation = YRotation; YRotation += 90f; CheckRotationCorrect(); SetStatueRotationClientRpc(Direction, yRotation, YRotation); } } [ClientRpc] private void SetStatueRotationClientRpc(int direction, float previousRotation, float newRotation) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2782886588u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, direction); ((FastBufferWriter)(ref val)).WriteValueSafe(ref previousRotation, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref newRotation, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2782886588u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; InteractTrigger.interactable = false; Direction = direction; int index = Random.Range(0, StatueTurnSounds.Count); StatueSfx.PlayOneShot(StatueTurnSounds[index], 1f); ((MonoBehaviour)this).StartCoroutine(RotateCoroutine(previousRotation, newRotation, 1.5f)); } } } private IEnumerator RotateCoroutine(float startRotation, float endRotation, float duration) { float t = 0f; while (t < duration) { t += Time.deltaTime; float curvedT = StatueTurnCurve.Evaluate(t / duration); CurrentYRotation = Mathf.Lerp(startRotation, endRotation, curvedT); PlatformTransform.eulerAngles = new Vector3(0f, CurrentYRotation, 0f); yield return 0; } InteractTrigger interactTrigger = InteractTrigger; interactTrigger.interactable = (byte)((interactTrigger.interactable ? 1u : 0u) | 1u) != 0; yield return 0; } private void CheckRotationCorrect() { if (Direction == CorrectDirection) { if (!IsRotationCorrect) { IsRotationCorrect = true; OptionalObjectivePrefab.ObjectiveCompleted(); } } else if (IsRotationCorrect) { IsRotationCorrect = false; OptionalObjectivePrefab.ObjectiveUnCompleted(); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2446439539u, new RpcReceiveHandler(__rpc_handler_2446439539), "PickRandomStatueValuesServerRpc"); ((NetworkBehaviour)this).__registerRpc(1005305886u, new RpcReceiveHandler(__rpc_handler_1005305886), "SetRandomPoseClientRpc"); ((NetworkBehaviour)this).__registerRpc(2369159840u, new RpcReceiveHandler(__rpc_handler_2369159840), "SetNewTurnValueServerRpc"); ((NetworkBehaviour)this).__registerRpc(2782886588u, new RpcReceiveHandler(__rpc_handler_2782886588), "SetStatueRotationClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2446439539(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskStatue)(object)target).PickRandomStatueValuesServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1005305886(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_005d: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int pose = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref pose); int maskType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref maskType); int direction = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref direction); int correctDirection = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref correctDirection); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskStatue)(object)target).SetRandomPoseClientRpc(pose, maskType, direction, correctDirection); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2369159840(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; ((MaskStatue)(object)target).SetNewTurnValueServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2782886588(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int direction = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref direction); float previousRotation = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref previousRotation, default(ForPrimitives)); float newRotation = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newRotation, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskStatue)(object)target).SetStatueRotationClientRpc(direction, previousRotation, newRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "MaskStatue"; } } internal class MaskStatueManager : NetworkBehaviour { public int ComedyDirection = 0; public int TragedyDirection = 0; [SerializeField] private Texture2D NorthImg; [SerializeField] private Texture2D EastImg; [SerializeField] private Texture2D SouthImg; [SerializeField] private Texture2D WestImg; [SerializeField] private MeshRenderer ComedyPlate; [SerializeField] private MeshRenderer TragedyPlate; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); SetMaskValueServerRpc(); } [ServerRpc] private void SetMaskValueServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2455009939u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2455009939u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int num = Random.Range(0, 4); int num2; for (num2 = Random.Range(0, 4); num2 == num; num2 = Random.Range(0, 4)) { } ComedyDirection = num; TragedyDirection = num2; SetMaskValueClientRpc(ComedyDirection, TragedyDirection); } } [ClientRpc] private void SetMaskValueClientRpc(int comedyDirecion, int tragedyDirecion) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1153720808u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, comedyDirecion); BytePacker.WriteValueBitPacked(val, tragedyDirecion); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1153720808u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetPlateTexture(comedyDirecion, ComedyPlate); SetPlateTexture(tragedyDirecion, TragedyPlate); } } } private void SetPlateTexture(int direction, MeshRenderer renderer) { switch (direction) { case 0: ((Renderer)renderer).material.SetTexture("_BaseColorMap", (Texture)(object)NorthImg); break; case 1: ((Renderer)renderer).material.SetTexture("_BaseColorMap", (Texture)(object)EastImg); break; case 2: ((Renderer)renderer).material.SetTexture("_BaseColorMap", (Texture)(object)SouthImg); break; case 3: ((Renderer)renderer).material.SetTexture("_BaseColorMap", (Texture)(object)WestImg); break; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2455009939u, new RpcReceiveHandler(__rpc_handler_2455009939), "SetMaskValueServerRpc"); ((NetworkBehaviour)this).__registerRpc(1153720808u, new RpcReceiveHandler(__rpc_handler_1153720808), "SetMaskValueClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2455009939(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskStatueManager)(object)target).SetMaskValueServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1153720808(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int comedyDirecion = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref comedyDirecion); int tragedyDirecion = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref tragedyDirecion); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskStatueManager)(object)target).SetMaskValueClientRpc(comedyDirecion, tragedyDirecion); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "MaskStatueManager"; } } internal class MassAudioManager : MonoBehaviour { public AudioSource AudioSource; private List AudioManagers = new List(); private void Awake() { AudioSource = ((Component)this).GetComponent(); } public void FadeAudio(bool off) { GatherAudioSources(off); } private void GatherAudioSources(bool off) { if (AudioManagers.Count == 0) { MassAudioManager[] array = Object.FindObjectsByType((FindObjectsSortMode)0); MassAudioManager[] array2 = array; foreach (MassAudioManager item in array2) { AudioManagers.Add(item); } } foreach (MassAudioManager audioManager in AudioManagers) { if (!off) { if ((Object)(object)audioManager.AudioSource != (Object)null) { ((MonoBehaviour)this).StartCoroutine(AudioFade(audioManager.AudioSource, 0f)); } } else if ((Object)(object)audioManager.AudioSource != (Object)null) { ((MonoBehaviour)this).StartCoroutine(AudioFade(audioManager.AudioSource, 1f)); } } } private IEnumerator AudioFade(AudioSource audio, float audioValue) { float time = 0f; float duration = 1f; float startVolume = audio.volume; while (time < duration) { time += Time.deltaTime; float progress = time / duration; audio.volume = Mathf.Lerp(startVolume, audioValue, progress); yield return null; } } } internal class MassMaterialReplacer : MonoBehaviour { public int Id; public List OriginalMaterials; public List ReplaceMaterials; private List Objects = new List(); public void Replace() { ((MonoBehaviour)this).StartCoroutine(ReplaceMaterialsCoroutine()); } private IEnumerator ReplaceMaterialsCoroutine() { yield return (object)new WaitForSeconds(6f); MaterialReplacer[] replacers = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); MaterialReplacer[] array = replacers; foreach (MaterialReplacer replacer in array) { if (replacer.Id == Id) { Objects.Add(((Component)replacer).gameObject); if (replacer.InvokeEvent) { replacer.ReplaceEvent.Invoke(); } if ((Object)(object)replacer.Light != (Object)null) { replacer.Light.colorTemperature = replacer.Temperature; replacer.Light.intensity = replacer.Intensity; replacer.Light.range = replacer.Range; replacer.Light.color = replacer.Color; } if ((Object)(object)replacer.LightData != (Object)null) { replacer.LightData.intensity = replacer.Intensity; } } } foreach (GameObject gameObject in Objects) { int replaceCounter = 0; MeshRenderer[] renderers = gameObject.GetComponentsInChildren(); MeshRenderer[] array2 = renderers; foreach (MeshRenderer renderer in array2) { Material[] materials = ((Renderer)renderer).sharedMaterials; for (int k = 0; k < materials.Length; k++) { for (int x = 0; x < OriginalMaterials.Count; x++) { if ((Object)(object)materials[k] == (Object)(object)OriginalMaterials[x]) { materials[k] = ReplaceMaterials[x]; break; } } } ((Renderer)renderer).sharedMaterials = materials; if (replaceCounter < 8) { replaceCounter++; continue; } replaceCounter = 0; yield return null; } } yield return null; WesleysInteriorToolsPlugin.TheWhispers.LogInfo((object)"Replacing finished"); } } internal class MaterialReplacer : MonoBehaviour { public int Id; public bool InvokeEvent = false; public UnityEvent ReplaceEvent; public Light Light; public HDAdditionalLightData LightData; public float Temperature; public float Range; public float Intensity; public Color Color; } internal class Medallion : NetworkBehaviour { private PhysicsProp PhysicsProp; private bool CurseActivated; private bool CanCurseActivate = true; [SerializeField] private float CurseTimeMinutes = 8f; [SerializeField] private float CurseIntervalMinutes = 2f; [SerializeField] private AudioSource CurseAudioSource; [SerializeField] private Animator CurseAnimator; [SerializeField] private List CurseAnimationsA; [SerializeField] private List CurseAnimationsB; [SerializeField] private List CurseAudioClips; [SerializeField] private List CurseAudioClipsB; public UnityEvent FinalCurseStageEvent; public UnityEvent Stage3Event; private float TimeCursed = 0f; private float CurseIntervalTimer = 0f; private int CurseStage = 0; private void Awake() { PhysicsProp = ((Component)this).GetComponent(); } private void Update() { if (!((GrabbableObject)PhysicsProp).hasBeenHeld) { return; } if (CanCurseActivate) { if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)((GrabbableObject)PhysicsProp).playerHeldBy) { CurseActivated = true; } CurseActivatedServerRpc(); } if (!CurseActivated || !(TimeCursed < CurseTimeMinutes * 60f) || !TimeOfDay.Instance.currentDayTimeStarted) { return; } if (CurseIntervalTimer < CurseIntervalMinutes * 60f) { CurseIntervalTimer += Time.deltaTime; } else { CurseIntervalTimer = 0f; PickCurseEffect(); float num = Random.Range(0, 1); if (num < 0.2f && CurseStage < 3) { CurseStage++; } } TimeCursed += Time.deltaTime; } private void PickCurseEffect() { int index = Random.Range(0, CurseAudioClips.Count); int index2 = Random.Range(0, CurseAudioClipsB.Count); int index3 = Random.Range(0, CurseAnimationsA.Count); int index4 = Random.Range(0, CurseAnimationsB.Count); switch (CurseStage) { case 0: CurseAudioSource.PlayOneShot(CurseAudioClips[index]); break; case 1: CurseAudioSource.PlayOneShot(CurseAudioClips[index]); CurseAnimator.SetTrigger(CurseAnimationsA[index3]); break; case 2: CurseAudioSource.PlayOneShot(CurseAudioClipsB[index2]); CurseAnimator.SetTrigger(CurseAnimationsB[index4]); Stage3Event.Invoke(); break; case 3: CurseActivated = false; FinalCurseStageEvent.Invoke(); GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(1f, true); break; } } [ServerRpc(RequireOwnership = false)] private void CurseActivatedServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2076072221u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2076072221u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CurseActivatedClientRpc(); } } } [ClientRpc] private void CurseActivatedClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1910442783u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1910442783u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CanCurseActivate = false; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2076072221u, new RpcReceiveHandler(__rpc_handler_2076072221), "CurseActivatedServerRpc"); ((NetworkBehaviour)this).__registerRpc(1910442783u, new RpcReceiveHandler(__rpc_handler_1910442783), "CurseActivatedClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2076072221(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; ((Medallion)(object)target).CurseActivatedServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1910442783(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; ((Medallion)(object)target).CurseActivatedClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Medallion"; } } internal class MoldSpikes : NetworkBehaviour { public float DelayTime = 5f; private float CurrentDelayTime = 0f; public AudioSource MoldAudio; public List MoldNotice; public AudioClip MoldAttack; public List SpikeTransforms; public AnimationCurve SpikeCurve; public AnimationCurve SpikeAttackScaleCurve; public AnimationCurve SpikeAttackCurve; private void OnTriggerEnter(Collider other) { if (((NetworkBehaviour)this).IsServer && ((Component)other).tag == "Player") { SpikesNoticeServerRpc(); } } private void Update() { if (CurrentDelayTime > 0f) { CurrentDelayTime -= Time.deltaTime; } } [ServerRpc] public void SpikesNoticeServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2087742809u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2087742809u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (CurrentDelayTime <= 0f) { CurrentDelayTime = DelayTime; SpikesNoticeClientRpc(); } } } [ServerRpc(RequireOwnership = false)] public void SpikesAttackServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(236424320u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 236424320u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SpikesAttackClientRpc(); } } } [ClientRpc] private void SpikesNoticeClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1228536147u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1228536147u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(WiggleSpikesCoroutine(attack: false)); int index = Random.Range(0, MoldNotice.Count); MoldAudio.PlayOneShot(MoldNotice[index]); } } } [ClientRpc] private void SpikesAttackClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2493160090u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2493160090u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(WiggleSpikesCoroutine(attack: true)); MoldAudio.PlayOneShot(MoldAttack); } } } private IEnumerator WiggleSpikesCoroutine(bool attack) { foreach (Transform transform in SpikeTransforms) { if (attack) { ((MonoBehaviour)this).StartCoroutine(SpikeAttackEffectCoroutine(transform)); } else { ((MonoBehaviour)this).StartCoroutine(SpikeWiggleEffectCoroutine(transform)); } yield return (object)new WaitForSeconds(Random.Range(0.001f, 0.03f)); } } private IEnumerator SpikeAttackEffectCoroutine(Transform transform) { float time = 0f; float spikeAttackTime = 0f; float SpikeAttackDuration = 0.4f; float SpikeAngleChange = 0.03f; float SpikeAngleChangeTime = 0f; float senseTime = 1.2f; float spikeXRot = 0f; float spikeZRot = 0f; float randX = 0f; float randZ = 0f; while (spikeAttackTime < SpikeAttackDuration) { spikeAttackTime += Time.deltaTime; float scaleLevel = SpikeAttackScaleCurve.Evaluate(spikeAttackTime / SpikeAttackDuration); float scaleIncrease = 1f + scaleLevel * 2.5f; Vector3 newScale = new Vector3(scaleIncrease, scaleIncrease, scaleIncrease); transform.localScale = newScale; yield return 0; } while (time < senseTime) { time += Time.deltaTime; float effectLevel = SpikeAttackCurve.Evaluate(time / senseTime); if (SpikeAngleChangeTime < SpikeAngleChange) { SpikeAngleChangeTime += Time.deltaTime; } else { float maxRandRange = 2f * effectLevel; randX = ((Random.value < 0.5f) ? (0f - maxRandRange) : maxRandRange); randZ = ((Random.value < 0.5f) ? (0f - maxRandRange) : maxRandRange); SpikeAngleChangeTime = 0f; } spikeXRot = Mathf.LerpAngle(spikeXRot, randX, Time.deltaTime * 24f); spikeZRot = Mathf.LerpAngle(spikeZRot, randZ, Time.deltaTime * 24f); transform.localRotation = Quaternion.Euler(spikeXRot, 0f, 0f); transform.localRotation = Quaternion.Euler(0f, 0f, spikeZRot); yield return 0; } } private IEnumerator SpikeWiggleEffectCoroutine(Transform transform) { float time = 0f; float spikeAngleChange = 0.03f; float spikeAngleChangeTime = 0f; float senseTime = 1.2f; float spikeXRot = 0f; float spikeZRot = 0f; float randX = 0f; float randZ = 0f; while (time < senseTime) { time += Time.deltaTime; float effectLevel = SpikeCurve.Evaluate(time / senseTime); if (spikeAngleChangeTime < spikeAngleChange) { spikeAngleChangeTime += Time.deltaTime; } else { float maxRandRange = 2f * effectLevel; randX = ((Random.value < 0.5f) ? (0f - maxRandRange) : maxRandRange); randZ = ((Random.value < 0.5f) ? (0f - maxRandRange) : maxRandRange); spikeAngleChangeTime = 0f; } spikeXRot = Mathf.LerpAngle(spikeXRot, randX, Time.deltaTime * 24f); spikeZRot = Mathf.LerpAngle(spikeZRot, randZ, Time.deltaTime * 24f); transform.localRotation = Quaternion.Euler(spikeXRot, 0f, 0f); transform.localRotation = Quaternion.Euler(0f, 0f, spikeZRot); yield return 0; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2087742809u, new RpcReceiveHandler(__rpc_handler_2087742809), "SpikesNoticeServerRpc"); ((NetworkBehaviour)this).__registerRpc(236424320u, new RpcReceiveHandler(__rpc_handler_236424320), "SpikesAttackServerRpc"); ((NetworkBehaviour)this).__registerRpc(1228536147u, new RpcReceiveHandler(__rpc_handler_1228536147), "SpikesNoticeClientRpc"); ((NetworkBehaviour)this).__registerRpc(2493160090u, new RpcReceiveHandler(__rpc_handler_2493160090), "SpikesAttackClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2087742809(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((MoldSpikes)(object)target).SpikesNoticeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_236424320(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; ((MoldSpikes)(object)target).SpikesAttackServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1228536147(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; ((MoldSpikes)(object)target).SpikesNoticeClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2493160090(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; ((MoldSpikes)(object)target).SpikesAttackClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "MoldSpikes"; } } internal class MoldspikeSpawner : NetworkBehaviour { public GameObject MoldSpikeObject; public List nObjects = new List(); public int MoldSpikeCount; public override void OnNetworkSpawn() { if (((NetworkBehaviour)this).IsServer) { FindMoldSpikePoints(); } } private void FindMoldSpikePoints() { //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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) float num = Random.Range(5, 20); float num2 = 0f; RaycastHit val = default(RaycastHit); if (Physics.Raycast(((Component)this).transform.position, Vector3.up, ref val, 30f, LayerMask.GetMask(new string[1] { "Room" }))) { num2 = ((RaycastHit)(ref val)).distance; num = num2 / 2f + (float)Random.Range(-1, 1); } Vector3 position = ((Component)this).transform.position; position.y += num; RaycastHit val2 = default(RaycastHit); for (int i = 0; i < MoldSpikeCount; i++) { Vector3 onUnitSphere = Random.onUnitSphere; if (Physics.Raycast(position, onUnitSphere, ref val2, 20f, LayerMask.GetMask(new string[1] { "Room" }))) { Quaternion val3 = Quaternion.FromToRotation(Vector3.up, ((RaycastHit)(ref val2)).normal); GameObject val4 = Object.Instantiate(MoldSpikeObject, ((RaycastHit)(ref val2)).point, val3, ((Component)this).gameObject.transform); val4.GetComponent().Spawn(false); val4.transform.SetParent(((Component)this).gameObject.transform); nObjects.Add(val4.GetComponent()); GameObject gameObject = ((Component)((RaycastHit)(ref val2)).collider).gameObject; ChangeRendererLayerMasksInAreaClientRpc(num2); } } } [ClientRpc] private void ChangeRendererLayerMasksInAreaClientRpc(float radius) { //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_00e8: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2670521959u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref radius, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2670521959u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; Collider[] array = Physics.OverlapSphere(((Component)this).transform.position, radius, LayerMask.GetMask(new string[1] { "Room" })); Collider[] array2 = array; foreach (Collider val3 in array2) { MeshRenderer component = ((Component)val3).GetComponent(); if ((Object)(object)component != (Object)null) { ((Renderer)component).renderingLayerMask = ((Renderer)component).renderingLayerMask | 0x1000; } } } public override void OnDestroy() { foreach (NetworkObject nObject in nObjects) { nObject.Despawn(true); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2670521959u, new RpcReceiveHandler(__rpc_handler_2670521959), "ChangeRendererLayerMasksInAreaClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2670521959(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 radius = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref radius, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MoldspikeSpawner)(object)target).ChangeRendererLayerMasksInAreaClientRpc(radius); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "MoldspikeSpawner"; } } internal class MorgueholeChecker : MonoBehaviour { [SerializeField] private int Id; public AutopsyObjective AutopsyObjective; public UnityEvent CorrectEvent; public InteractEvent WrongEvent; public void AutopsyCheck() { if (Id == AutopsyObjective.ChosenReportId) { CorrectEvent.Invoke(); } else { ((UnityEvent)(object)WrongEvent).Invoke((PlayerControllerB)null); } } } internal class MorseCodePlayer : MonoBehaviour { public string Code; private List Numbers = new List(); [SerializeField] private AudioSource MorseSfx; [SerializeField] private CodepadController CodepadController; [SerializeField] private List MorseCodeClips; public void StartMorseCode() { Code = CodepadController.Code; int[] array = Code.Select((char x) => x - 48).ToArray(); int[] array2 = array; foreach (int item in array2) { Numbers.Add(item); } ((MonoBehaviour)this).StartCoroutine(LoopMorsecodeCoroutine()); } private IEnumerator LoopMorsecodeCoroutine() { for (int i = 0; i < Numbers.Count; i++) { MorseSfx.PlayOneShot(MorseCodeClips[Numbers[i]]); yield return (object)new WaitForSeconds(1.3f); } yield return (object)new WaitForSeconds(1.3f); if (!CodepadController.Completed) { yield return ((MonoBehaviour)this).StartCoroutine(LoopMorsecodeCoroutine()); } else { yield return 0; } } } internal class MoveableBook : MonoBehaviour { public BookPuzzleController Controller; public Animator BookAnimator; public AudioSource BookSfx; public AudioClip MoveClip; public AudioClip MoveBackClip; public InteractTrigger Trigger; public bool BookMoved; public void MoveBook() { MoveBookServerRpc(); } [ServerRpc(RequireOwnership = false)] private void MoveBookServerRpc() { BookMoved = true; MoveBookClientRpc(move: true); Controller.CheckValues(); Controller.BooksPulled++; } [ClientRpc] public void MoveBookClientRpc(bool move) { BookAnimator.SetBool("moved", move); if (move) { BookSfx.PlayOneShot(MoveClip); Trigger.interactable = false; } else { BookSfx.PlayOneShot(MoveBackClip); Trigger.interactable = true; } } } internal class NetworkObjectRemover : NetworkBehaviour { public NetworkObject networkObject; public bool RemoveInOrbit; public void RemoveObject() { if (((NetworkBehaviour)this).IsServer && (Object)(object)networkObject != (Object)null) { networkObject.Despawn(true); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "NetworkObjectRemover"; } } internal class OldredLantern : NetworkBehaviour { public List Lights; public List LightComponents; public bool Eclipsed; public AudioSource AudioSource; public List FlickerAudioClips; public float LightDuration = 80f; public float LightFullSeconds = 20f; public float LightOffSeconds = 20f; public float RandomDelay = 4f; public float BlinkChance = 0.1f; public float BlinkInterval = 1f; private float LightValue = 1f; private float LightIncrease = 0f; private float LightTimeFull = 0f; private float LightTimeOff = 0f; private float BlinkTime = 0f; private void Awake() { LightIncrease = 1f / LightDuration; LightOffSeconds += Random.Range(0f, RandomDelay); ((MonoBehaviour)this).StartCoroutine(LightBrightenCoroutine()); } private void Update() { if (!((NetworkBehaviour)this).IsServer) { return; } if (BlinkTime < BlinkInterval) { BlinkTime += Time.deltaTime; return; } BlinkTime = 0f; if (Random.Range(0f, 1f) < BlinkChance) { BlinkLightClientRpc(); } } private IEnumerator LightBrightenCoroutine() { bool flag = false; LightValue = 1f; foreach (HDAdditionalLightData light in Lights) { light.lightDimmer = LightValue; light.volumetricDimmer = LightValue; } while (!flag) { if (LightTimeOff < LightOffSeconds) { LightTimeOff += Time.deltaTime; } else if (LightValue > 0f) { LightValue -= Time.deltaTime * LightIncrease; foreach (HDAdditionalLightData light2 in Lights) { light2.lightDimmer = LightValue; light2.volumetricDimmer = LightValue; } } else if (LightTimeFull < LightFullSeconds) { LightTimeFull += Time.deltaTime; } else { LightValue = 1f; LightTimeOff = 0f; LightTimeFull = 0f; flag = true; } foreach (HDAdditionalLightData light3 in Lights) { light3.lightDimmer = LightValue; light3.volumetricDimmer = LightValue; } yield return null; } if (flag) { ((MonoBehaviour)this).StartCoroutine(LightBrightenCoroutine()); } yield return null; } public void SetEclipsedLighting() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)this).StopCoroutine(LightBrightenCoroutine()); ((MonoBehaviour)this).StartCoroutine(LightBrightenCoroutine()); Color color = default(Color); ((Color)(ref color))..ctor(77f / 106f, 0.2706924f, 0.2706924f); foreach (Light lightComponent in LightComponents) { lightComponent.color = color; } } private IEnumerator EclipsedLightCoroutine() { bool flag = false; while (flag) { if (LightTimeOff < LightOffSeconds / 4f) { LightTimeOff += Time.deltaTime; } else if (LightTimeFull < LightFullSeconds / 4f) { LightValue = 0f; LightTimeFull += Time.deltaTime; } else { LightValue = 1f; LightTimeOff = 0f; LightTimeFull = 0f; flag = true; } foreach (HDAdditionalLightData light in Lights) { light.lightDimmer = LightValue; light.volumetricDimmer = LightValue; } yield return null; } if (flag) { ((MonoBehaviour)this).StartCoroutine(EclipsedLightCoroutine()); } yield return null; } [ClientRpc] private void BlinkLightClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1330330054u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1330330054u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(BlinkCoroutine()); } } } private IEnumerator BlinkCoroutine() { float time = 0f; foreach (Light light in LightComponents) { ((Behaviour)light).enabled = false; } int rand = Random.Range(0, FlickerAudioClips.Count); AudioSource.PlayOneShot(FlickerAudioClips[rand]); while (time < 0.14f) { time += Time.deltaTime; yield return null; } foreach (Light light2 in LightComponents) { ((Behaviour)light2).enabled = true; } yield return null; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1330330054u, new RpcReceiveHandler(__rpc_handler_1330330054), "BlinkLightClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1330330054(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; ((OldredLantern)(object)target).BlinkLightClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "OldredLantern"; } } public class OptionalObjective : MonoBehaviour { [Header("OBSOLETE")] public string Name = ""; public int CompletionsRequired = 0; public int CompletionsAmount = 0; public string EnabledTriggerName = ""; public string DisabledTriggerName = ""; public string AnimationTrigger = ""; public string ObjectiveStartAnimationTrigger = ""; public string ObjectiveCompletionAnimationTrigger = ""; } [Serializable] public class OptionalObjectiveEntry { public string Name = ""; public int CompletionsRequired = 0; public int CompletionsAmount = 0; public string EnabledTriggerName = ""; public string DisabledTriggerName = ""; public string AnimationTrigger = ""; public string ObjectiveStartAnimationTrigger = ""; public string ObjectiveCompletionAnimationTrigger = ""; public bool PlayProgressionSound = true; public bool CanChoose = true; public ObjectiveDifficultyEnums.ObjectiveDifficulty Difficulty; } public class OptionalObjectiveController : NetworkBehaviour { public Animator EventAnimator; public List ObjectiveEntries; public BoxCollider TriggerCollider; public UnityEvent CompletionEvent; public InteractTrigger InteractTrigger; public List Prefabs; public AudioSource GlobalAudio; public AudioClip ObjectiveCompleteClip; public AudioClip ObjectiveProgressClip; private int CurrentEnabledObjective = 0; private bool IsObjectiveCompleted; private bool ObjectivesSearched = true; private float ObjectiveSearchCounter; private bool hasPlayedFinishAudio; private bool RewardSpawned; public Transform RewardSpawnTransform; public Item RewardItemBad; public Item RewardItemMedium; public Item RewardItemGood; private int BadValue = 0; private int BadValueGoal = 140; private int BadValueCurrent = 0; private int MidValue = 280; private int MidValueGoal = 40; private int MidValueCurrent = 0; private int GodValue = 15; private int GodValueGoal = 4; private int GodValueCurrent = 0; private void Awake() { ObjectivesSearched = false; ObjectiveSearchCounter = 2.5f; float luckValue = TimeOfDay.Instance.luckValue; BadValueGoal -= (int)(8f * (luckValue * 10f)); MidValueGoal += (int)(20f * (luckValue * 10f)); GodValueGoal += (int)(8f * (luckValue * 10f)); } private void Update() { float num = TimeOfDay.Instance.currentDayTime / TimeOfDay.Instance.totalTime; if (num < 0.35f) { BadValueCurrent = 0; } else if (num < 0.8f) { BadValueCurrent = (int)(Mathf.Lerp((float)BadValue, (float)BadValueGoal, num) * 0.5f); } else { BadValueCurrent = (int)Mathf.Lerp((float)BadValue, (float)BadValueGoal, num); } MidValueCurrent = (int)Mathf.Lerp((float)MidValue, (float)MidValueGoal, num); if (num < 0.25f) { GodValueCurrent = 150; } else { GodValueCurrent = (int)Mathf.Lerp((float)GodValue, (float)GodValueGoal, num); } if (!ObjectivesSearched) { if (ObjectiveSearchCounter > 0f) { ObjectiveSearchCounter -= Time.deltaTime; return; } PickObjective(); InitialiseObjective(); ObjectivesSearched = true; } } private void FindAllObjectivePrefabs() { OptionalObjectivePrefab[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); OptionalObjectivePrefab[] array2 = array; foreach (OptionalObjectivePrefab optionalObjectivePrefab in array2) { foreach (OptionalObjectiveEntry objectiveEntry in ObjectiveEntries) { if (optionalObjectivePrefab.ObjectiveName == objectiveEntry.Name) { Prefabs.Add(optionalObjectivePrefab); break; } } } if (!((NetworkBehaviour)this).IsServer) { return; } bool flag = false; switch (WesleysInteriorToolsPlugin.GetSecondaryValue()) { case 0: flag = true; break; case 2: { SelectableLevel currentLevel = RoundManager.Instance.currentLevel; ExtendedLevel val = null; foreach (ExtendedLevel extendedLevel in PatchedContent.ExtendedLevels) { if (extendedLevel.SelectableLevel.sceneName == currentLevel.sceneName) { val = extendedLevel; } } if (!((Object)(object)val != (Object)null)) { break; } foreach (ContentTag contentTag in ((ExtendedContent)val).ContentTags) { if (contentTag.contentTagName == "IndoorTrials") { flag = true; break; } } break; } } if (!flag) { return; } DestroyNonNetworkObjectsClientRpc(); foreach (OptionalObjectivePrefab prefab in Prefabs) { if ((Object)(object)prefab == (Object)null) { continue; } if (prefab.EnableObject) { ((Component)prefab).gameObject.SetActive(true); continue; } NetworkObject component = ((Component)prefab).GetComponent(); if ((Object)(object)component != (Object)null && component.IsSpawned) { component.Despawn(true); } } NetworkObject component2 = ((Component)this).GetComponent(); if ((Object)(object)component2 != (Object)null && ((NetworkBehaviour)this).IsSpawned) { component2.Despawn(true); } } [ClientRpc] private void DestroyNonNetworkObjectsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3073905778u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3073905778u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (OptionalObjectivePrefab prefab in Prefabs) { if (!((Object)(object)prefab == (Object)null)) { if (prefab.EnableObject) { ((Component)prefab).gameObject.SetActive(true); } else if ((Object)(object)((Component)prefab).GetComponent() == (Object)null) { Object.Destroy((Object)(object)prefab); } } } } private void PickObjective() { FindAllObjectivePrefabs(); if (!((NetworkBehaviour)this).IsServer) { return; } int num = Random.Range(0, ObjectiveEntries.Count); while (!ObjectiveEntries[num].CanChoose) { num = Random.Range(0, ObjectiveEntries.Count); } CurrentEnabledObjective = num; SetEnabledObjectiveClientRpc(num); foreach (OptionalObjectivePrefab prefab in Prefabs) { if ((Object)(object)prefab == (Object)null) { continue; } if (prefab.ObjectiveName == ObjectiveEntries[CurrentEnabledObjective].Name && prefab.EnableObject) { NetworkObject component = ((Component)prefab).GetComponent(); if (component.IsSpawned) { component.Despawn(true); } } if (!(prefab.ObjectiveName != ObjectiveEntries[CurrentEnabledObjective].Name)) { continue; } if (prefab.EnableObject) { ((Component)prefab).gameObject.SetActive(true); continue; } NetworkObject component2 = ((Component)prefab).GetComponent(); if (component2.IsSpawned) { component2.Despawn(true); } } SetEnabledObjectActiveClientRpc(ObjectiveEntries[CurrentEnabledObjective].Name); } [ClientRpc] private void SetEnabledObjectActiveClientRpc(string activeObjectiveName) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(382973577u, val2, (RpcDelivery)0); bool flag = activeObjectiveName != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(activeObjectiveName, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 382973577u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (OptionalObjectivePrefab prefab in Prefabs) { if (!((Object)(object)prefab == (Object)null)) { if (prefab.ObjectiveName == activeObjectiveName && prefab.EnableObject) { ((Component)prefab).gameObject.SetActive(false); } if (prefab.ObjectiveName != activeObjectiveName && prefab.EnableObject) { ((Component)prefab).gameObject.SetActive(true); } } } } [ClientRpc] private void SetEnabledObjectiveClientRpc(int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2169815759u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2169815759u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CurrentEnabledObjective = value; } } } private void InitialiseObjective() { OptionalObjectiveEntry optionalObjectiveEntry = ObjectiveEntries[CurrentEnabledObjective]; EventAnimator.SetTrigger(ObjectiveEntries[CurrentEnabledObjective].ObjectiveStartAnimationTrigger); if (!((Object)(object)InteractTrigger == (Object)null)) { InteractTrigger.hoverTip = optionalObjectiveEntry.EnabledTriggerName + " : [E]"; InteractTrigger.disabledHoverTip = optionalObjectiveEntry.DisabledTriggerName; if (!IsObjectiveCompleted) { InteractTrigger.interactable = false; } } } public void InteractWithTrigger() { UpdateTriggerInteractServerRpc(); PickAndSpawnReward(); } public void PickAndSpawnReward() { PickAndSpawnRewardServerRpc(); } [ServerRpc(RequireOwnership = false)] private void PickAndSpawnRewardServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3827270415u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3827270415u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (RewardSpawned) { return; } int[] array = new int[3] { BadValueCurrent, MidValueCurrent, GodValueCurrent }; int num = 0; int num2 = 0; int chosenReward = -1; int[] array2 = array; foreach (int num3 in array2) { num2 += num3; } int num4 = Random.Range(0, num2); for (int j = 0; j < array.Length; j++) { num += array[j]; if (num4 < num) { chosenReward = j; break; } } SpawnRewardAndCalculateValue(chosenReward); RewardSpawned = true; } private void SpawnRewardAndCalculateValue(int chosenReward) { Item item = null; int secondaryRewardValue = WesleysInteriorToolsPlugin.GetSecondaryRewardValue(chosenReward); float secondaryMultiplier = WesleysInteriorToolsPlugin.GetSecondaryMultiplier((int)ObjectiveEntries[CurrentEnabledObjective].Difficulty); float secondarySoloRewardMultiplier = WesleysInteriorToolsPlugin.GetSecondarySoloRewardMultiplier(); switch (chosenReward) { case 0: item = RewardItemBad; break; case 1: item = RewardItemMedium; break; case 2: item = RewardItemGood; break; } secondaryRewardValue = (int)((float)secondaryRewardValue * secondaryMultiplier); if (GameNetworkManager.Instance.connectedPlayers <= 1) { secondaryRewardValue = (int)((float)secondaryRewardValue * secondarySoloRewardMultiplier); } GrabbableObject val = SpawnItem(item, RewardSpawnTransform, secondaryRewardValue); } public GrabbableObject SpawnItem(Item item, Transform parent, int value) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { GrabbableObject component = Object.Instantiate(item.spawnPrefab, RewardSpawnTransform.position, RewardSpawnTransform.rotation, parent).GetComponent(); ((NetworkBehaviour)component).NetworkObject.Spawn(false); JLLNetworkManager.Instance.UpdateScanNodeServerRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)component).NetworkObject), value); return component; } return null; } [ServerRpc(RequireOwnership = false)] private void UpdateTriggerInteractServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1349207700u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1349207700u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; UpdateTriggerInteractClientRpc(); } } } [ClientRpc] private void UpdateTriggerInteractClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(331561127u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 331561127u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)TriggerCollider != (Object)null) { ((Collider)TriggerCollider).enabled = false; } if (!hasPlayedFinishAudio) { hasPlayedFinishAudio = true; GlobalAudio.PlayOneShot(ObjectiveCompleteClip); } CompletionEvent.Invoke(); EventAnimator.SetTrigger(ObjectiveEntries[CurrentEnabledObjective].AnimationTrigger); } } public void ReceiveObjectiveCompletion(string name) { IncreaseObjectiveCounterServerRpc(name); } public void ReceiveObjectiveCompletionHostOnly(string name) { if (((NetworkBehaviour)this).IsServer) { IncreaseObjectiveCounterServerRpc(name); } } public void ReceiveObjectiveUnCompletion(string name) { DecreaseObjectiveCounterServerRpc(name); } [ServerRpc(RequireOwnership = false)] private void DecreaseObjectiveCounterServerRpc(string name) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3359181291u, val2, (RpcDelivery)0); bool flag = name != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(name, false); } ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3359181291u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; OptionalObjectiveEntry optionalObjectiveEntry = ObjectiveEntries[CurrentEnabledObjective]; optionalObjectiveEntry.CompletionsAmount--; } } [ServerRpc(RequireOwnership = false)] private void IncreaseObjectiveCounterServerRpc(string name) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1778089955u, val2, (RpcDelivery)0); bool flag = name != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(name, false); } ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1778089955u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; OptionalObjectiveEntry optionalObjectiveEntry = ObjectiveEntries[CurrentEnabledObjective]; optionalObjectiveEntry.CompletionsAmount++; bool completed = false; if (optionalObjectiveEntry.CompletionsAmount >= optionalObjectiveEntry.CompletionsRequired) { ObjectivesCompletedEventClientRpc(); PickAndSpawnReward(); completed = true; } if (WesleysInteriorToolsPlugin.GetObjectiveSoundValue()) { PlayGlobalCompletionClientRpc(completed); } } } [ClientRpc] private void PlayGlobalCompletionClientRpc(bool completed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1093592608u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref completed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1093592608u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(CompletionAudioDelayCoroutine(completed)); } } } private IEnumerator CompletionAudioDelayCoroutine(bool completed) { yield return (object)new WaitForSeconds(1f); if (completed) { if (!hasPlayedFinishAudio) { hasPlayedFinishAudio = true; GlobalAudio.PlayOneShot(ObjectiveCompleteClip); } } else if (ObjectiveEntries[CurrentEnabledObjective].PlayProgressionSound) { GlobalAudio.PlayOneShot(ObjectiveProgressClip); } } [ClientRpc] private void ObjectivesCompletedEventClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1248841916u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1248841916u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; IsObjectiveCompleted = true; if ((Object)(object)InteractTrigger != (Object)null) { InteractTrigger.interactable = true; } EventAnimator.SetTrigger(ObjectiveEntries[CurrentEnabledObjective].ObjectiveCompletionAnimationTrigger); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3073905778u, new RpcReceiveHandler(__rpc_handler_3073905778), "DestroyNonNetworkObjectsClientRpc"); ((NetworkBehaviour)this).__registerRpc(382973577u, new RpcReceiveHandler(__rpc_handler_382973577), "SetEnabledObjectActiveClientRpc"); ((NetworkBehaviour)this).__registerRpc(2169815759u, new RpcReceiveHandler(__rpc_handler_2169815759), "SetEnabledObjectiveClientRpc"); ((NetworkBehaviour)this).__registerRpc(3827270415u, new RpcReceiveHandler(__rpc_handler_3827270415), "PickAndSpawnRewardServerRpc"); ((NetworkBehaviour)this).__registerRpc(1349207700u, new RpcReceiveHandler(__rpc_handler_1349207700), "UpdateTriggerInteractServerRpc"); ((NetworkBehaviour)this).__registerRpc(331561127u, new RpcReceiveHandler(__rpc_handler_331561127), "UpdateTriggerInteractClientRpc"); ((NetworkBehaviour)this).__registerRpc(3359181291u, new RpcReceiveHandler(__rpc_handler_3359181291), "DecreaseObjectiveCounterServerRpc"); ((NetworkBehaviour)this).__registerRpc(1778089955u, new RpcReceiveHandler(__rpc_handler_1778089955), "IncreaseObjectiveCounterServerRpc"); ((NetworkBehaviour)this).__registerRpc(1093592608u, new RpcReceiveHandler(__rpc_handler_1093592608), "PlayGlobalCompletionClientRpc"); ((NetworkBehaviour)this).__registerRpc(1248841916u, new RpcReceiveHandler(__rpc_handler_1248841916), "ObjectivesCompletedEventClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3073905778(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; ((OptionalObjectiveController)(object)target).DestroyNonNetworkObjectsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_382973577(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 enabledObjectActiveClientRpc = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref enabledObjectActiveClientRpc, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((OptionalObjectiveController)(object)target).SetEnabledObjectActiveClientRpc(enabledObjectActiveClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2169815759(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 enabledObjectiveClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref enabledObjectiveClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((OptionalObjectiveController)(object)target).SetEnabledObjectiveClientRpc(enabledObjectiveClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3827270415(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; ((OptionalObjectiveController)(object)target).PickAndSpawnRewardServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1349207700(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; ((OptionalObjectiveController)(object)target).UpdateTriggerInteractServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_331561127(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; ((OptionalObjectiveController)(object)target).UpdateTriggerInteractClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3359181291(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 name = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref name, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((OptionalObjectiveController)(object)target).DecreaseObjectiveCounterServerRpc(name); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1778089955(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 name = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref name, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((OptionalObjectiveController)(object)target).IncreaseObjectiveCounterServerRpc(name); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1093592608(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 completed = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref completed, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((OptionalObjectiveController)(object)target).PlayGlobalCompletionClientRpc(completed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1248841916(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; ((OptionalObjectiveController)(object)target).ObjectivesCompletedEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "OptionalObjectiveController"; } } public class OptionalObjectivePrefab : MonoBehaviour { public string ObjectiveName; public OptionalObjectiveController Controller; public bool EnableObject; private void Awake() { ((MonoBehaviour)this).StartCoroutine(FindControllerCoroutine()); } public void ObjectiveCompleted() { Controller?.ReceiveObjectiveCompletion(ObjectiveName); } public void ObjectiveCompletedHostOnly() { Controller?.ReceiveObjectiveCompletionHostOnly(ObjectiveName); } public void ObjectiveUnCompleted() { Controller?.ReceiveObjectiveUnCompletion(ObjectiveName); } private IEnumerator FindControllerCoroutine() { yield return (object)new WaitForSeconds(5f); Controller = Object.FindObjectOfType(); Controller?.Prefabs.Add(this); yield return (object)new WaitForSeconds(3f); if ((Object)(object)Controller == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } yield return null; } } internal class PaintingTextureSwitcher : MonoBehaviour { public bool PaintingSetter; public List Textures; public MeshRenderer Renderer; private List paintingTextureSwitchers = new List(); public void SetPaintingTexture(int painting) { ((Renderer)Renderer).materials[3].SetTexture("_BaseColorMap", (Texture)(object)Textures[painting]); } public void Start() { if (PaintingSetter) { ((MonoBehaviour)this).StartCoroutine(DelayPaintingCoroutine()); } } private IEnumerator DelayPaintingCoroutine() { while (!RoundManager.Instance.dungeonCompletedGenerating) { yield return null; } yield return (object)new WaitForSeconds(6f); SetPainting(); } private void SetPainting() { PaintingTextureSwitcher[] array = Object.FindObjectsOfType(); int num = 0; PaintingTextureSwitcher[] array2 = array; foreach (PaintingTextureSwitcher paintingTextureSwitcher in array2) { if (!paintingTextureSwitcher.PaintingSetter) { int num2; for (num2 = num; num2 > paintingTextureSwitcher.Textures.Count; num2 -= paintingTextureSwitcher.Textures.Count) { } num2 = Mathf.Clamp(num2, 0, paintingTextureSwitcher.Textures.Count - 1); ((Renderer)paintingTextureSwitcher.Renderer).materials[3].SetTexture("_BaseColorMap", (Texture)(object)paintingTextureSwitcher.Textures[num2]); num++; } } } } [Serializable] public class PlayerSound { public ulong SteamId; public AudioClip AudioClip; } internal class PlayerSpecificSound : MonoBehaviour { public AudioSource AudioSource; public AudioClip BaseAudioClip; public List Sounds; public void PickAudioToPlay() { bool flag = true; ulong playerSteamId = GameNetworkManager.Instance.localPlayerController.playerSteamId; foreach (PlayerSound sound in Sounds) { if (playerSteamId == sound.SteamId) { AudioSource.PlayOneShot(sound.AudioClip); flag = false; break; } } if (flag) { AudioSource.PlayOneShot(BaseAudioClip); } } } internal class PowerEvents : MonoBehaviour { public float Delay = 0.1f; public float DelayBeforeRadiationMessage = 0.75f; public bool DisplayRadiationMessage; public void FlickerLights() { ((MonoBehaviour)this).StartCoroutine(EventDelayCoroutine(flicker: true)); } public void ApparatusEventEffect() { ((MonoBehaviour)this).StartCoroutine(EventDelayCoroutine(flicker: false)); } private IEnumerator EventDelayCoroutine(bool flicker) { yield return (object)new WaitForSeconds(Delay); if (flicker) { RoundManager.Instance.FlickerLights(false, false); yield break; } RoundManager.Instance.SwitchPower(false); RoundManager.Instance.powerOffPermanently = true; yield return (object)new WaitForSeconds(DelayBeforeRadiationMessage); if (DisplayRadiationMessage) { HUDManager.Instance.RadiationWarningHUD(); } } } internal class PressureMachine : NetworkBehaviour { private float Pressure = 0f; public Transform PressureMeterTransform; public Animator Animator; public AudioSource PressureAudio; public AudioClip PressureSound; public AudioClip StableSound; public AudioClip UnstableSound; public InteractTrigger Trigger; public float PressureDecreaseMultiplier = 0.1f; public bool IsStable = false; public bool Completed = false; private bool CompletedSet = false; private Vector3 PressureScale = new Vector3(1f, 0f, 1f); private void Update() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) if (Completed) { if (!CompletedSet) { PressureScale.y = 0.7f; PressureMeterTransform.localScale = PressureScale; PressureAudio.PlayOneShot(StableSound); Trigger.interactable = false; CompletedSet = true; } return; } if (Pressure > 0f) { Pressure -= Time.deltaTime * PressureDecreaseMultiplier; } if (Pressure > 0.6f && Pressure < 0.9f) { if (!IsStable) { IsStable = true; PressureAudio.PlayOneShot(StableSound); } } else if (IsStable) { IsStable = false; PressureAudio.PlayOneShot(UnstableSound); } PressureScale.y = Pressure; PressureMeterTransform.localScale = PressureScale; } public void PressButton() { PressButtonServerRpc(); } [ServerRpc(RequireOwnership = false)] private void PressButtonServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3482349740u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3482349740u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (Pressure < 1f) { Pressure += 0.08f; if (Pressure > 1f) { Pressure = 1f; } } PressButtonClientRpc(Pressure); } [ClientRpc] private void PressButtonClientRpc(float pressure) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1261059620u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pressure, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1261059620u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Pressure = pressure; Animator.SetTrigger("press"); PressureAudio.PlayOneShot(PressureSound); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3482349740u, new RpcReceiveHandler(__rpc_handler_3482349740), "PressButtonServerRpc"); ((NetworkBehaviour)this).__registerRpc(1261059620u, new RpcReceiveHandler(__rpc_handler_1261059620), "PressButtonClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3482349740(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; ((PressureMachine)(object)target).PressButtonServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1261059620(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 pressure = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pressure, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PressureMachine)(object)target).PressButtonClientRpc(pressure); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PressureMachine"; } } internal class PressureMachineController : NetworkBehaviour { private float PressureKeptTimer; public float PressureTimeGoal; public List pressureMachines; public List Particles; public AudioSource PressureAudiosource; public AudioSource PressureAudiosource2; public AudioClip PressureClip; public AudioClip IncreaseSound; public AudioClip StopSound; private float CheckDelay = 0.5f; private float Progress = 0f; private bool AllMachinesStable = false; private bool AllMachineStablePrevious = false; private bool Completed = false; public UnityEvent CompletedEvent; public UnityEvent CompletedEventClients; private void Update() { if (Completed) { return; } if (AllMachinesStable) { if (PressureKeptTimer < PressureTimeGoal) { PressureKeptTimer += Time.deltaTime; } else if (((NetworkBehaviour)this).IsServer) { Completed = true; CompletedEvent.Invoke(); EventCompletedClientRpc(); } } Progress = 1f / PressureTimeGoal * PressureKeptTimer; PressureAudiosource.volume = 0.5f + Progress / 0.5f; PressureAudiosource.pitch = 0.5f + Progress / 0.5f; if (!((NetworkBehaviour)this).IsServer) { return; } if (CheckDelay > 0f) { CheckDelay -= Time.deltaTime; return; } CheckDelay = 0.5f; bool allMachinesStable = true; foreach (PressureMachine pressureMachine in pressureMachines) { if (!pressureMachine.IsStable) { allMachinesStable = false; } } AllMachinesStable = allMachinesStable; if (AllMachinesStable != AllMachineStablePrevious) { AllMachineStablePrevious = AllMachinesStable; SetMachineStableStateClientRpc(AllMachinesStable); } } [ClientRpc] private void SetMachineStableStateClientRpc(bool AllStable) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(186792081u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref AllStable, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 186792081u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AllMachinesStable = AllStable; if (AllStable) { PressureAudiosource2.PlayOneShot(IncreaseSound); } else { PressureAudiosource2.PlayOneShot(StopSound); } } } [ClientRpc] private void EventCompletedClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1340661200u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1340661200u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; Completed = true; PressureKeptTimer = PressureTimeGoal; PressureAudiosource.PlayOneShot(PressureClip); ((MonoBehaviour)this).StartCoroutine(SteamCoroutine()); foreach (PressureMachine pressureMachine in pressureMachines) { pressureMachine.Completed = true; } CompletedEventClients.Invoke(); } private IEnumerator SteamCoroutine() { foreach (ParticleSystem particle in Particles) { yield return (object)new WaitForSeconds(0.1f); particle.Play(); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(186792081u, new RpcReceiveHandler(__rpc_handler_186792081), "SetMachineStableStateClientRpc"); ((NetworkBehaviour)this).__registerRpc(1340661200u, new RpcReceiveHandler(__rpc_handler_1340661200), "EventCompletedClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_186792081(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 machineStableStateClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref machineStableStateClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PressureMachineController)(object)target).SetMachineStableStateClientRpc(machineStableStateClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1340661200(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; ((PressureMachineController)(object)target).EventCompletedClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PressureMachineController"; } } internal class PressureValve : NetworkBehaviour { public PressureValvePuzzleController Controller; private int ValveState = 1; public int ValveValue = 0; public Animator ValveAnimator; public InteractTrigger LeftTrigger; public InteractTrigger RightTrigger; public AudioSource ValveAudio; public AudioClip ValveAudioClip; public ParticleSystem Particles; public TMP_Text LeftText; public TMP_Text RightText; public bool Completed; public void TurnRight() { TurnValveServerRpc(left: false); } public void TurnLeft() { TurnValveServerRpc(left: true); } public void InitialiseValve(int value) { ValveValue = value; InitialiseValveClientRpc(value); } [ClientRpc] private void InitialiseValveClientRpc(int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2262410321u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2262410321u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ValveValue = value; LeftText.text = "+" + value; RightText.text = "-" + value; } } } [ServerRpc(RequireOwnership = false)] public void TurnValveServerRpc(bool left) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3969038678u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref left, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3969038678u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!left && ValveState < 2) { ValveState++; Controller.AddValue(add: false, ValveValue); } else if (ValveState > 0) { ValveState--; Controller.AddValue(add: true, ValveValue); } Controller.CheckPuzzleCompletion(); TurnValveClientRpc(ValveState); } } [ClientRpc] private void TurnValveClientRpc(int valveState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2865871422u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, valveState); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2865871422u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ValveAnimator.SetInteger("valveState", valveState); LeftTrigger.interactable = false; RightTrigger.interactable = false; ValveAudio.PlayOneShot(ValveAudioClip); ((MonoBehaviour)this).StartCoroutine(EnableDelayCoroutine()); } } } private IEnumerator EnableDelayCoroutine() { yield return (object)new WaitForSeconds(1f); SetValveTriggers(); Particles.Play(); } private void SetValveTriggers() { if (Completed) { LeftTrigger.interactable = false; RightTrigger.interactable = false; return; } LeftTrigger.interactable = true; RightTrigger.interactable = true; if (ValveState == 0) { LeftTrigger.interactable = false; } else if (ValveState == 2) { RightTrigger.interactable = false; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2262410321u, new RpcReceiveHandler(__rpc_handler_2262410321), "InitialiseValveClientRpc"); ((NetworkBehaviour)this).__registerRpc(3969038678u, new RpcReceiveHandler(__rpc_handler_3969038678), "TurnValveServerRpc"); ((NetworkBehaviour)this).__registerRpc(2865871422u, new RpcReceiveHandler(__rpc_handler_2865871422), "TurnValveClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2262410321(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 value = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref value); target.__rpc_exec_stage = (__RpcExecStage)1; ((PressureValve)(object)target).InitialiseValveClientRpc(value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3969038678(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 left = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref left, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PressureValve)(object)target).TurnValveServerRpc(left); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2865871422(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 valveState = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref valveState); target.__rpc_exec_stage = (__RpcExecStage)1; ((PressureValve)(object)target).TurnValveClientRpc(valveState); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PressureValve"; } } internal class PressureValvePuzzleController : NetworkBehaviour { public List PressureValves; private int TargetValue; private int CurrentValue; private float CurrentValueDisplay; private bool Completed; public AudioSource AudioSource; public AudioClip AudioClip; public TMP_Text DisplayText; public TMP_Text TargetText; public UnityEvent CompleteEvent; public UnityEvent CompleteEventClients; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePuzzle(); } private void InitialisePuzzle() { InitialisePuzzleServerRpc(); } private void Update() { if (CurrentValueDisplay < (float)CurrentValue) { CurrentValueDisplay += Time.deltaTime * 5f; Updatetext(); } else if (CurrentValueDisplay > (float)CurrentValue) { CurrentValueDisplay -= Time.deltaTime * 5f; Updatetext(); } } private void Updatetext() { DisplayText.text = Mathf.RoundToInt(CurrentValueDisplay).ToString(); } public void AddValue(bool add, int value) { if (add) { CurrentValue += value; } else { CurrentValue -= value; } SetCurrentValueClientRpc(CurrentValue); } [ClientRpc] public void SetCurrentValueClientRpc(int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1756265663u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1756265663u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CurrentValue = value; } } } public void CheckPuzzleCompletion() { if (CurrentValue == TargetValue && !Completed) { CompletePuzzle(); } } private void CompletePuzzle() { Completed = true; CompletePuzzleClientRpc(); CompleteEvent.Invoke(); } [ClientRpc] private void CompletePuzzleClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4293894054u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4293894054u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; AudioSource.PlayOneShot(AudioClip); CompleteEventClients.Invoke(); foreach (PressureValve pressureValf in PressureValves) { pressureValf.LeftTrigger.interactable = false; pressureValf.RightTrigger.interactable = false; pressureValf.Completed = true; } } [ServerRpc] private void InitialisePuzzleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3771908042u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3771908042u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; TargetValue = (CurrentValue = Random.Range(40, 120)); int num = Random.Range(0, 1); List list = new List(); foreach (PressureValve pressureValf in PressureValves) { bool flag = false; int num2 = 0; while (!flag) { num2 = Random.Range(2, 22); if (!list.Contains(num2)) { flag = true; } } list.Add(num2); pressureValf.InitialiseValve(num2); } List list2 = new List(); list2.AddRange(PressureValves); for (int i = 0; i < list2.Count + num; i++) { bool flag2 = Random.Range(0f, 1f) < 0.5f; int index = Random.Range(0, list2.Count); if (flag2) { TargetValue += list2[index].ValveValue; } else { TargetValue -= list2[index].ValveValue; } list2.RemoveAt(index); } InitialisePuzzleClientRpc(CurrentValue, TargetValue); } [ClientRpc] private void InitialisePuzzleClientRpc(int currentValue, int targetValue) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(315793332u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, currentValue); BytePacker.WriteValueBitPacked(val, targetValue); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 315793332u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CurrentValue = currentValue; TargetText.text = targetValue.ToString(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1756265663u, new RpcReceiveHandler(__rpc_handler_1756265663), "SetCurrentValueClientRpc"); ((NetworkBehaviour)this).__registerRpc(4293894054u, new RpcReceiveHandler(__rpc_handler_4293894054), "CompletePuzzleClientRpc"); ((NetworkBehaviour)this).__registerRpc(3771908042u, new RpcReceiveHandler(__rpc_handler_3771908042), "InitialisePuzzleServerRpc"); ((NetworkBehaviour)this).__registerRpc(315793332u, new RpcReceiveHandler(__rpc_handler_315793332), "InitialisePuzzleClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1756265663(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 currentValueClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref currentValueClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((PressureValvePuzzleController)(object)target).SetCurrentValueClientRpc(currentValueClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4293894054(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; ((PressureValvePuzzleController)(object)target).CompletePuzzleClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3771908042(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((PressureValvePuzzleController)(object)target).InitialisePuzzleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_315793332(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int currentValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref currentValue); int targetValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref targetValue); target.__rpc_exec_stage = (__RpcExecStage)1; ((PressureValvePuzzleController)(object)target).InitialisePuzzleClientRpc(currentValue, targetValue); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PressureValvePuzzleController"; } } internal class ProximityBomb : NetworkBehaviour { public CoreHeaterBomb MegaBomb; public UnityEvent ExplodeEvent; public float ExplodeTime; public MeshRenderer LightRenderer; public Material LightOnMaterial; public Material LightOffMaterial; public Light Light; public List DisableRenderers; public AudioSource BlinkSfx; public AudioSource BlinkFarSfx; public AudioClip BlinkClip; public AudioClip BlinkFarClip; public AudioClip ExplosionClip; public AudioClip ExplosionFarClip; private int PlayersNear; private bool Exploded; private float ExplodeTimer; public float BlinkIntervalMin = 0.2f; public float BlinkIntervalMax = 10f; private float BlinkTimer; public bool PlayBlinkFarClip; public AnimationCurve IntervalCurve; private void OnTriggerEnter(Collider other) { if (((NetworkBehaviour)this).IsServer && ((Component)other).tag == "Player") { PlayersNear++; } } private void OnTriggerExit(Collider other) { if (((NetworkBehaviour)this).IsServer && ((Component)other).tag == "Player") { PlayersNear--; } } private void Update() { if (!((NetworkBehaviour)this).IsServer || Exploded) { return; } if (PlayersNear > 0) { if (ExplodeTimer < ExplodeTime) { ExplodeTimer += Time.deltaTime; } else { Exploded = true; ExplodeBombClientRpc(); MegaBomb?.DecreaseCharge(); } } else if (ExplodeTimer > 0f) { ExplodeTimer -= Time.deltaTime; } float num = Mathf.Clamp01(ExplodeTimer / ExplodeTime); float num2 = IntervalCurve.Evaluate(num); float num3 = Mathf.Lerp(BlinkIntervalMax, BlinkIntervalMin, num2); if (BlinkTimer < num3) { BlinkTimer += Time.deltaTime; return; } BlinkTimer = 0f; BlinkLightClientRpc(); } [ClientRpc] private void ExplodeBombClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2220326232u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2220326232u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; BlinkSfx.PlayOneShot(ExplosionClip); BlinkFarSfx.PlayOneShot(ExplosionFarClip); foreach (MeshRenderer disableRenderer in DisableRenderers) { ((Renderer)disableRenderer).enabled = false; } ExplodeEvent.Invoke(); } [ClientRpc] private void BlinkLightClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(934717135u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 934717135u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(BlinkCoroutine()); } } } private IEnumerator BlinkCoroutine() { if (PlayBlinkFarClip) { BlinkFarSfx.PlayOneShot(BlinkFarClip); } BlinkSfx.PlayOneShot(BlinkClip); ((Behaviour)Light).enabled = true; ((Renderer)LightRenderer).material = LightOnMaterial; yield return (object)new WaitForSeconds(0.1f); ((Behaviour)Light).enabled = false; ((Renderer)LightRenderer).material = LightOffMaterial; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2220326232u, new RpcReceiveHandler(__rpc_handler_2220326232), "ExplodeBombClientRpc"); ((NetworkBehaviour)this).__registerRpc(934717135u, new RpcReceiveHandler(__rpc_handler_934717135), "BlinkLightClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2220326232(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; ((ProximityBomb)(object)target).ExplodeBombClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_934717135(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; ((ProximityBomb)(object)target).BlinkLightClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ProximityBomb"; } } internal class PullCrank : NetworkBehaviour { private int CorrectLight; private int CurrentLight; public Animator CrankAnimator; public List Lights; public Material NLed; public Material NLedOff; public Material CLed; public Material CLedOff; public AudioSource Audiosource; public AudioSource AudiosourceLoop; public AudioClip CrankFailClip; public AudioClip CrankSuccessClip; public AudioClip CrankFinishClip; public AudioClip QuietBeep; public InteractTrigger Trigger; private int CrankAmount; public int RequiredCrankAmount = 3; private float MoveTimer; private float MoveSpeed; public float MinMoveSpeed = 0.2f; public float MaxMoveSpeed = 0.5f; private bool Started = false; private bool Finished = false; public UnityEvent FinishHostEvent; public UnityEvent FinishClientEvent; private void Awake() { Trigger.interactable = false; } public void StartCrankPuzzle() { StartCrankServerRpc(); } private void Update() { if (!((NetworkBehaviour)this).IsServer || !Started || Finished) { return; } if (MoveTimer < MoveSpeed) { MoveTimer += Time.deltaTime; return; } MoveTimer = 0f; if (CurrentLight < Lights.Count) { CurrentLight++; } else { CurrentLight = 0; } UpdateLightClientRpc(CorrectLight, CurrentLight); } [ServerRpc(RequireOwnership = false)] private void StartCrankServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4173660825u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4173660825u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!Started) { Started = true; SetNextLight(); } } } private void SetNextLight() { int correctLight = Random.Range(0, Lights.Count); CorrectLight = correctLight; float moveSpeed = Random.Range(MinMoveSpeed, MaxMoveSpeed); MoveSpeed = moveSpeed; UpdateLightClientRpc(CorrectLight, CurrentLight); } [ClientRpc] private void UpdateLightClientRpc(int correctLight, int currentLight) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1030980308u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, correctLight); BytePacker.WriteValueBitPacked(val, currentLight); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1030980308u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!AudiosourceLoop.isPlaying) { AudiosourceLoop.Play(); } Audiosource.PlayOneShot(QuietBeep); Trigger.interactable = true; for (int i = 0; i < Lights.Count; i++) { if (i == correctLight) { if (i == currentLight) { ((Renderer)Lights[i]).material = CLed; } else { ((Renderer)Lights[i]).material = CLedOff; } } else if (i == currentLight) { ((Renderer)Lights[i]).material = NLed; } else { ((Renderer)Lights[i]).material = NLedOff; } } } public void Crank() { CrankServerRpc(); } [ServerRpc(RequireOwnership = false)] private void CrankServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3377069189u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3377069189u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (Finished) { return; } bool flag = false; bool finished = false; if (CurrentLight == CorrectLight) { flag = true; } if (flag) { CrankAmount++; if (CrankAmount >= RequiredCrankAmount) { finished = true; FinishHostEvent.Invoke(); Finished = true; } else { SetNextLight(); } } CrankClientRpc(flag, finished); } [ClientRpc] private void CrankClientRpc(bool success, bool finished) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4050540645u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref success, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref finished, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4050540645u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; Trigger.interactable = false; ((MonoBehaviour)this).StartCoroutine(CrankTriggerCoroutine()); if (success) { if (finished) { Finished = true; CrankAnimator.SetTrigger("finish"); Audiosource.PlayOneShot(CrankFinishClip); Trigger.interactable = false; AudiosourceLoop.Stop(); FinishClientEvent.Invoke(); { foreach (MeshRenderer light in Lights) { ((Renderer)light).material = NLedOff; } return; } } CrankAnimator.SetTrigger("success"); Audiosource.PlayOneShot(CrankSuccessClip); } else { CrankAnimator.SetTrigger("fail"); Audiosource.PlayOneShot(CrankFailClip); } } private IEnumerator CrankTriggerCoroutine() { yield return (object)new WaitForSeconds(1f); if (!Finished) { Trigger.interactable = true; } } public void ForceFinish() { ForceFinishServerRpc(); } [ServerRpc(RequireOwnership = false)] private void ForceFinishServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4286924909u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4286924909u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (Started && !Finished) { FinishHostEvent.Invoke(); Finished = true; ForceFinishClientRpc(); } } } [ClientRpc] private void ForceFinishClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2472617767u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2472617767u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; AudiosourceLoop.Stop(); FinishClientEvent.Invoke(); Finished = true; CrankAnimator.SetTrigger("finish"); Audiosource.PlayOneShot(CrankFinishClip); Trigger.interactable = false; foreach (MeshRenderer light in Lights) { ((Renderer)light).material = NLedOff; } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(4173660825u, new RpcReceiveHandler(__rpc_handler_4173660825), "StartCrankServerRpc"); ((NetworkBehaviour)this).__registerRpc(1030980308u, new RpcReceiveHandler(__rpc_handler_1030980308), "UpdateLightClientRpc"); ((NetworkBehaviour)this).__registerRpc(3377069189u, new RpcReceiveHandler(__rpc_handler_3377069189), "CrankServerRpc"); ((NetworkBehaviour)this).__registerRpc(4050540645u, new RpcReceiveHandler(__rpc_handler_4050540645), "CrankClientRpc"); ((NetworkBehaviour)this).__registerRpc(4286924909u, new RpcReceiveHandler(__rpc_handler_4286924909), "ForceFinishServerRpc"); ((NetworkBehaviour)this).__registerRpc(2472617767u, new RpcReceiveHandler(__rpc_handler_2472617767), "ForceFinishClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4173660825(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; ((PullCrank)(object)target).StartCrankServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1030980308(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int correctLight = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref correctLight); int currentLight = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref currentLight); target.__rpc_exec_stage = (__RpcExecStage)1; ((PullCrank)(object)target).UpdateLightClientRpc(correctLight, currentLight); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3377069189(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; ((PullCrank)(object)target).CrankServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4050540645(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool success = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref success, default(ForPrimitives)); bool finished = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref finished, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PullCrank)(object)target).CrankClientRpc(success, finished); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4286924909(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; ((PullCrank)(object)target).ForceFinishServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2472617767(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; ((PullCrank)(object)target).ForceFinishClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "PullCrank"; } } public class RadioDecoder : NetworkBehaviour { [SerializeField] private Transform DialTransform; [SerializeField] private AudioSource PitchSourceA; [SerializeField] private AudioSource PitchSourceB; [SerializeField] private AudioSource RadioSfx; [SerializeField] private BoxCollider InteractColliderDial; [SerializeField] private BoxCollider InteractColliderButton; [SerializeField] private Renderer LampRenderer; [SerializeField] private Material GreenLightMaterial; [SerializeField] private AudioClip CompletionSound; [SerializeField] private AudioClip ButtonSound; [SerializeField] private List DialTwistSounds; [SerializeField] private Light SmallLampLight; private float RadioPitchA = 1f; private float RadioPitchB = 1f; private int DialState = 0; private int CorrectDialState = 0; public UnityEvent CompletionHostEvent; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } [ServerRpc(RequireOwnership = false)] private void SetRadioValuesServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2063283620u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2063283620u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int dialState = Random.Range(0, 12); int correctDialState = Random.Range(0, 12); DialState = dialState; CorrectDialState = correctDialState; SetRadioValuesClientRpc(DialState, CorrectDialState); } } } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); SetRadioValues(); } private void SetRadioValues() { SetRadioValuesServerRpc(); } [ClientRpc] private void SetRadioValuesClientRpc(int dialState, int correctDialState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3916829872u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, dialState); BytePacker.WriteValueBitPacked(val, correctDialState); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3916829872u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int index = Random.Range(0, DialTwistSounds.Count); RadioSfx.PlayOneShot(DialTwistSounds[index]); float num = 30 * dialState; float pitch = 0.5f + 1f / 12f * (float)dialState; float pitch2 = 0.5f + 1f / 12f * (float)correctDialState; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(0f, num, 0f); Quaternion rotation = Quaternion.Euler(0f, num, 0f); DialTransform.rotation = rotation; PitchSourceA.pitch = pitch; PitchSourceB.pitch = pitch2; } } } public void IncreaseRadio() { CorrectDialStateServerRpc(); } [ServerRpc(RequireOwnership = false)] private void CorrectDialStateServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2296410109u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2296410109u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (DialState < 11) { DialState++; } else { DialState = 0; } SetRadioValuesClientRpc(DialState, CorrectDialState); } } public void ConfirmState() { RadioSfx.PlayOneShot(ButtonSound); CompleteRadioTaskServerRpc(); } [ServerRpc(RequireOwnership = false)] private void CompleteRadioTaskServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1076627538u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1076627538u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (DialState == CorrectDialState) { CompletionHostEvent.Invoke(); CompleteRadioTaskClientRpc(); } } } [ClientRpc] private void CompleteRadioTaskClientRpc() { //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_012d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2821587252u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2821587252u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((Collider)InteractColliderDial).enabled = false; ((Collider)InteractColliderButton).enabled = false; PitchSourceA.volume = 0f; PitchSourceB.volume = 0f; LampRenderer.material = GreenLightMaterial; RadioSfx.PlayOneShot(CompletionSound); SmallLampLight.color = Color.green; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2063283620u, new RpcReceiveHandler(__rpc_handler_2063283620), "SetRadioValuesServerRpc"); ((NetworkBehaviour)this).__registerRpc(3916829872u, new RpcReceiveHandler(__rpc_handler_3916829872), "SetRadioValuesClientRpc"); ((NetworkBehaviour)this).__registerRpc(2296410109u, new RpcReceiveHandler(__rpc_handler_2296410109), "CorrectDialStateServerRpc"); ((NetworkBehaviour)this).__registerRpc(1076627538u, new RpcReceiveHandler(__rpc_handler_1076627538), "CompleteRadioTaskServerRpc"); ((NetworkBehaviour)this).__registerRpc(2821587252u, new RpcReceiveHandler(__rpc_handler_2821587252), "CompleteRadioTaskClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2063283620(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; ((RadioDecoder)(object)target).SetRadioValuesServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3916829872(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int dialState = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref dialState); int correctDialState = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref correctDialState); target.__rpc_exec_stage = (__RpcExecStage)1; ((RadioDecoder)(object)target).SetRadioValuesClientRpc(dialState, correctDialState); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2296410109(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; ((RadioDecoder)(object)target).CorrectDialStateServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1076627538(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; ((RadioDecoder)(object)target).CompleteRadioTaskServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2821587252(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; ((RadioDecoder)(object)target).CompleteRadioTaskClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "RadioDecoder"; } } internal class RandomAmbiencePlayer : MonoBehaviour { [Serializable] public class AmbiencePlayType { public string Name; public bool IgnoreInactive; public bool DisableAtNight; [Tooltip("Point in the day")] [Range(0f, 1f)] public float DisableAtTime = 0.8f; public bool PlayOnlyAtNight; [Tooltip("Point in the day")] [Range(0f, 1f)] public float EnableAtTime = 0.8f; public List AudioSources; public List AmbienceClips; public float InitialSoundDelayMin; public float InitialSoundDelayMax; public float SoundCooldownMin; public float SoundCooldownMax; } public bool IsActive = true; public AmbiencePlayType[] AmbienceTypes = new AmbiencePlayType[1] { new AmbiencePlayType() }; private void Awake() { for (int i = 0; i < AmbienceTypes.Length; i++) { for (int j = 0; j < AmbienceTypes[i].AudioSources.Count; j++) { StartAudioDelay(i, j); } } } public void SetActive(bool active) { IsActive = active; } private void StartAudioDelay(int id, int source) { ((MonoBehaviour)this).StartCoroutine(PlayAudioDelayCoroutine(id, source, AmbienceTypes[id].InitialSoundDelayMin, AmbienceTypes[id].InitialSoundDelayMax)); } private IEnumerator PlayAudioDelayCoroutine(int id, int source, float delayMin, float delayMax) { yield return (object)new WaitForSeconds(Random.Range(delayMin, delayMax)); float distance = Vector3.Distance(((Component)AmbienceTypes[id].AudioSources[source]).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); float currentTimeInDay = TimeOfDay.Instance.currentDayTime / TimeOfDay.Instance.totalTime; if (distance < AmbienceTypes[id].AudioSources[source].maxDistance && (!AmbienceTypes[id].DisableAtNight || currentTimeInDay < AmbienceTypes[id].DisableAtTime) && (!AmbienceTypes[id].PlayOnlyAtNight || currentTimeInDay > AmbienceTypes[id].EnableAtTime) && (IsActive || AmbienceTypes[id].IgnoreInactive)) { int randomAudio = Random.Range(0, AmbienceTypes[id].AmbienceClips.Count); AmbienceTypes[id].AudioSources[source].PlayOneShot(AmbienceTypes[id].AmbienceClips[randomAudio]); } RestartAudio(id, source); } private void RestartAudio(int id, int source) { ((MonoBehaviour)this).StartCoroutine(PlayAudioDelayCoroutine(id, source, AmbienceTypes[id].SoundCooldownMin, AmbienceTypes[id].SoundCooldownMax)); } } internal class RandomLightGlower : MonoBehaviour { public List Lights; private List LightsGlowing; public float GlowInterval = 2f; public float GlowIntervalDelay = 2f; public float GlowIntervalDelayRandomiser = 1f; public float GlowDuration = 4f; public float FadeDistance = 15f; public AnimationCurve GlowCurve; public int GlowAmount; private void Awake() { foreach (HDAdditionalLightData light in Lights) { light.lightDimmer = 0f; light.volumetricDimmer = 0f; light.fadeDistance = 0f; } LightsGlowing = new List(); ((MonoBehaviour)this).StartCoroutine(PickLightCoroutine()); } private IEnumerator PickLightCoroutine() { yield return (object)new WaitForSeconds(GlowInterval); for (int i = 0; i < GlowAmount; i++) { if (Lights.Count > 0) { int rand = Random.Range(0, Lights.Count); LightsGlowing.Add(Lights[rand]); ((MonoBehaviour)this).StartCoroutine(GlowLightCoroutine(Lights[rand])); Lights.Remove(Lights[rand]); float rand2 = Random.Range(0f, GlowIntervalDelayRandomiser); yield return (object)new WaitForSeconds(GlowIntervalDelay + rand2); } else { Lights.AddRange(LightsGlowing); LightsGlowing.Clear(); } } yield return (object)new WaitForSeconds(GlowDuration); ((MonoBehaviour)this).StartCoroutine(PickLightCoroutine()); } private IEnumerator GlowLightCoroutine(HDAdditionalLightData light) { yield return (object)new WaitForSeconds(GlowInterval); float t = 0f; light.fadeDistance = FadeDistance; while (t < GlowDuration) { t += Time.deltaTime; float lerpTime = t / GlowDuration; float lerpCurved = (light.lightDimmer = GlowCurve.Evaluate(lerpTime)); light.volumetricDimmer = 0.46f * lerpCurved; yield return null; } light.fadeDistance = 0f; } } internal class removeme { } internal class ResearchShipController : NetworkBehaviour { private int ResearchShipState = 0; public UnityEvent ShipExplodedEvent; public UnityEvent ShipVanishedEvent; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (((NetworkBehaviour)this).IsServer) { ResearchShipState = WesleysInteriorToolsPlugin.CurrentSave.GetShipState(); if (ResearchShipState == 1) { ExplodeShipClientRpc(); } if (ResearchShipState == 2) { VanishShipClientRpc(); } } } [ClientRpc] private void ExplodeShipClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4120767605u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4120767605u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ShipExplodedEvent.Invoke(); } } } [ClientRpc] private void VanishShipClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3953373080u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3953373080u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ShipVanishedEvent.Invoke(); } } } public void SetShipExploded() { SetShipExplodedServerRpc(); } [ServerRpc(RequireOwnership = false)] private void SetShipExplodedServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(177337905u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 177337905u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; WesleysInteriorToolsPlugin.CurrentSave.SetShipState(1); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(4120767605u, new RpcReceiveHandler(__rpc_handler_4120767605), "ExplodeShipClientRpc"); ((NetworkBehaviour)this).__registerRpc(3953373080u, new RpcReceiveHandler(__rpc_handler_3953373080), "VanishShipClientRpc"); ((NetworkBehaviour)this).__registerRpc(177337905u, new RpcReceiveHandler(__rpc_handler_177337905), "SetShipExplodedServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4120767605(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; ((ResearchShipController)(object)target).ExplodeShipClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3953373080(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; ((ResearchShipController)(object)target).VanishShipClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_177337905(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; ((ResearchShipController)(object)target).SetShipExplodedServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ResearchShipController"; } } internal class RewardPicker : NetworkBehaviour { [Header("OBSOLETE")] private int BadValue = 0; private int BadValueGoal = 100; private int BadValueCurrent = 0; private int MidValue = 250; private int MidValueGoal = 20; private int MidValueCurrent = 0; private int GodValue = 13; private int GodValueGoal = 4; private int GodValueCurrent = 0; private float ValueChangeTimer = 60f; public UnityEvent BadEvent; public UnityEvent GoodEvent; public UnityEvent GodEvent; private void awake() { float luckValue = TimeOfDay.Instance.luckValue; BadValueGoal -= (int)(8f * (luckValue * 10f)); MidValueGoal += (int)(16f * (luckValue * 10f)); GodValueGoal += (int)(2f * (luckValue * 10f)); } private void Update() { float num = TimeOfDay.Instance.currentDayTime / TimeOfDay.Instance.totalTime; if (num < 0.35f) { BadValueCurrent = 0; } else if (num < 0.6f) { BadValueCurrent = (int)(Mathf.Lerp((float)BadValue, (float)BadValueGoal, num) * 0.5f); } else { BadValueCurrent = (int)Mathf.Lerp((float)BadValue, (float)BadValueGoal, num); } MidValueCurrent = (int)Mathf.Lerp((float)MidValue, (float)MidValueGoal, num); if (num < 0.25f) { GodValueCurrent = 150; } else { GodValueCurrent = (int)Mathf.Lerp((float)GodValue, (float)GodValueGoal, num); } } public void CheckCurrentValues() { CheckCurrentValuesServerRpc(); } [ServerRpc] private void CheckCurrentValuesServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2458246589u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2458246589u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; int[] array = new int[3] { BadValueCurrent, MidValueCurrent, GodValueCurrent }; UnityEvent[] array2 = (UnityEvent[])(object)new UnityEvent[3] { BadEvent, GoodEvent, GodEvent }; int num = 0; int num2 = 0; int[] array3 = array; foreach (int num3 in array3) { num2 += num3; } int num4 = Random.Range(0, num2); for (int j = 0; j < array.Length; j++) { num += array[j]; if (num4 < num) { array2[j].Invoke(); break; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2458246589u, new RpcReceiveHandler(__rpc_handler_2458246589), "CheckCurrentValuesServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2458246589(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((RewardPicker)(object)target).CheckCurrentValuesServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "RewardPicker"; } } internal class RoachKing : NetworkBehaviour { private float Health = 100f; public Animator ArenaAnimator; public Animator RoachKingAnimator; public InteractTrigger StartTrigger; public AudioSource RoachAudiosource; public AudioClip RoachSpawnClip; public AudioClip RoachAttack1clip; public AudioClip RoachAttack2clip; public AudioClip RoachAttack3clip; public AudioClip RoachAttack4clip; public AudioClip RoachDeathAudioclip; public List Puzzles; private int SpraysActive = 0; private bool Killed = false; private bool Started = false; private float AttackTimer = 18f; private int AttacksBeforeHose = 0; private int PreviousAttackId = 0; private bool AllowDoubleAttack; private float DoubleAttackTimer; private void Update() { if (!((NetworkBehaviour)this).IsServer || Killed) { return; } Health -= Time.deltaTime * (0.25f * (float)SpraysActive); if (Health <= 0f) { Killed = true; CompleteEvent(); } if (!Started) { return; } if (AllowDoubleAttack) { if (DoubleAttackTimer > 0f) { DoubleAttackTimer -= Time.deltaTime; return; } AllowDoubleAttack = false; PickNextAttack(); } else if (AttackTimer > 0f) { AttackTimer -= Time.deltaTime; } else { PickNextAttack(); } } private void PickNextAttack() { float num = 0.2f * (float)AttacksBeforeHose; num += 1f / 12f * (float)SpraysActive; if (SpraysActive == 4) { num += Random.Range(0.8f, 1f); } if (num >= 1f) { AttackTimer = 13f; PreviousAttackId = 1; int hose = Random.Range(0, 4); ((MonoBehaviour)this).StartCoroutine(HoseDestroyCoroutine(hose)); AttackClientRpc(1, hose); AllowDoubleAttack = true; DoubleAttackTimer = 4f; AttacksBeforeHose = 0; return; } bool flag = false; int num2 = 0; while (!flag) { int num3 = Random.Range(2, 5); if (num3 != PreviousAttackId) { num2 = num3; flag = true; } } AttackTimer = 13f + 0f * Health; PreviousAttackId = num2; AttacksBeforeHose++; AttackClientRpc(num2, 0); } [ClientRpc] private void AttackClientRpc(int attackId, int hose) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4014634460u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, attackId); BytePacker.WriteValueBitPacked(val, hose); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4014634460u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; switch (attackId) { case 1: { string trigger = "attackHose" + hose; RoachKingAnimator.SetTrigger(trigger); RoachAudiosource.PlayOneShot(RoachAttack1clip); break; } case 2: RoachKingAnimator.SetTrigger("attackSlam"); RoachAudiosource.PlayOneShot(RoachAttack2clip); break; case 3: RoachKingAnimator.SetTrigger("attackZone"); RoachAudiosource.PlayOneShot(RoachAttack3clip); break; case 4: RoachKingAnimator.SetTrigger("attackSpin"); RoachAudiosource.PlayOneShot(RoachAttack4clip); break; } } } private IEnumerator HoseDestroyCoroutine(int hose) { yield return (object)new WaitForSeconds(2.5f); if (!Killed) { SetSprayState(hose, enable: false, null); } } public void CompleteEvent() { foreach (WeirdPuzzleSwitchBoard puzzle in Puzzles) { puzzle.SetPuzzleState(completed: true, sprayEnabled: false); } CompleteEventClientRpc(); } [ClientRpc] private void CompleteEventClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(15897439u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 15897439u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RoachAudiosource.PlayOneShot(RoachDeathAudioclip); ArenaAnimator.SetTrigger("finish"); RoachKingAnimator.SetTrigger("finish"); } } } public void SetSprayState(int spray, bool enable, bool? all) { if (all ?? false) { for (int i = 0; i < Puzzles.Count; i++) { Puzzles[i].Completed = enable; } foreach (WeirdPuzzleSwitchBoard puzzle in Puzzles) { puzzle.SetPuzzleState(enable, sprayEnabled: true); } if (enable) { SpraysActive = Puzzles.Count; } else { SpraysActive = 0; } } else { if (enable) { SprayEnabled(1); } else { SprayEnabled(-1); } Puzzles[spray].SetPuzzleState(enable, sprayEnabled: true); } } public void StartEvent() { StartEventServerRpc(); } [ServerRpc(RequireOwnership = false)] private void StartEventServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1653647458u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1653647458u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; StartEventClientRpc(); Started = true; SetSprayState(0, enable: false, true); } } } [ClientRpc] private void StartEventClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2038671624u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2038671624u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RoachAudiosource.PlayOneShot(RoachSpawnClip); ArenaAnimator.SetTrigger("start"); RoachKingAnimator.SetTrigger("start"); StartTrigger.interactable = false; } } } public void SprayEnabled(int amount) { SpraysActive += amount; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(4014634460u, new RpcReceiveHandler(__rpc_handler_4014634460), "AttackClientRpc"); ((NetworkBehaviour)this).__registerRpc(15897439u, new RpcReceiveHandler(__rpc_handler_15897439), "CompleteEventClientRpc"); ((NetworkBehaviour)this).__registerRpc(1653647458u, new RpcReceiveHandler(__rpc_handler_1653647458), "StartEventServerRpc"); ((NetworkBehaviour)this).__registerRpc(2038671624u, new RpcReceiveHandler(__rpc_handler_2038671624), "StartEventClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4014634460(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int attackId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref attackId); int hose = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hose); target.__rpc_exec_stage = (__RpcExecStage)1; ((RoachKing)(object)target).AttackClientRpc(attackId, hose); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_15897439(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; ((RoachKing)(object)target).CompleteEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1653647458(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; ((RoachKing)(object)target).StartEventServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2038671624(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; ((RoachKing)(object)target).StartEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "RoachKing"; } } internal class RotatingPillarAttacks : MonoBehaviour { public List animators; public UnityEvent SpikeEvent; public float SpikeDelayTimeMin = 0.1f; public float SpikeDelayTimeMax = 0.2f; private void PillarAttack() { ((MonoBehaviour)this).StartCoroutine(PillarAttackCoroutine()); } private IEnumerator PillarAttackCoroutine() { foreach (Animator animator in animators) { animator.SetTrigger("Spike"); SpikeEvent.Invoke(); float Rand = Random.Range(SpikeDelayTimeMin, SpikeDelayTimeMax); yield return (object)new WaitForSeconds(Rand); } } } internal class SafetyPanelPuzzle : NetworkBehaviour { public List LedRenderers; public List SafetyWires; public Material LedOn; public AudioSource WirePanelSfx; public AudioClip FinishPuzzleClip; public UnityEvent FinishEventHost; public UnityEvent FinishEventClients; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePuzzle(); } private void InitialisePuzzle() { InitialisePuzzleServerRpc(); foreach (SafetyWire safetyWire in SafetyWires) { safetyWire.Controller = this; } } [ServerRpc] private void InitialisePuzzleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4140606980u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4140606980u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; int[] array = new int[3] { -1, -1, -1 }; for (int i = 0; i < array.Length; i++) { int num = Random.Range(0, 8); while (array.Contains(num)) { num = Random.Range(0, 8); } array[i] = num; } SetSafetyWiresClientRpc(array); } [ClientRpc] private void SetSafetyWiresClientRpc(int[] wires) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2814757383u, val2, (RpcDelivery)0); bool flag = wires != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(wires, default(ForPrimitives)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2814757383u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; for (int i = 0; i < wires.Length; i++) { ((Renderer)LedRenderers[wires[i]]).material = LedOn; SafetyWires[wires[i]].IsSafety = true; } } } public void CheckWiresCut() { bool flag = true; foreach (SafetyWire safetyWire in SafetyWires) { if (safetyWire.IsSafety && !safetyWire.isCut) { flag = false; } } if (flag) { FinishEventHost.Invoke(); FinishEventClientRpc(); } } [ClientRpc] private void FinishEventClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3085841702u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3085841702u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; FinishEventClients.Invoke(); WirePanelSfx.PlayOneShot(FinishPuzzleClip); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(4140606980u, new RpcReceiveHandler(__rpc_handler_4140606980), "InitialisePuzzleServerRpc"); ((NetworkBehaviour)this).__registerRpc(2814757383u, new RpcReceiveHandler(__rpc_handler_2814757383), "SetSafetyWiresClientRpc"); ((NetworkBehaviour)this).__registerRpc(3085841702u, new RpcReceiveHandler(__rpc_handler_3085841702), "FinishEventClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4140606980(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((SafetyPanelPuzzle)(object)target).InitialisePuzzleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2814757383(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_006e: 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_0058: 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 flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); int[] safetyWiresClientRpc = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref safetyWiresClientRpc, default(ForPrimitives)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((SafetyPanelPuzzle)(object)target).SetSafetyWiresClientRpc(safetyWiresClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3085841702(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; ((SafetyPanelPuzzle)(object)target).FinishEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SafetyPanelPuzzle"; } } internal class SafetyWire : NetworkBehaviour { public SafetyPanelPuzzle Controller; public Renderer WireRenderer; public Renderer CutWireRenderer; public InteractTrigger InteractTrigger; public AudioSource AudioSource; public AudioClip CutwireClip; public AudioClip ElectrocutePlayerClip; public ParticleSystem ParticleSystem; public bool IsSafety; public bool isCut; public void CutWire(PlayerControllerB player) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) CutWireServerRpc(); if (!IsSafety) { player.DamagePlayer(100, true, true, (CauseOfDeath)11, 3, false, default(Vector3)); } } [ServerRpc(RequireOwnership = false)] private void CutWireServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2224352173u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2224352173u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; isCut = true; CutWireClientRpc(); if (IsSafety) { Controller.CheckWiresCut(); } } } [ClientRpc] private void CutWireClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(345677975u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 345677975u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; WireRenderer.enabled = false; CutWireRenderer.enabled = true; InteractTrigger.interactable = false; if (IsSafety) { AudioSource.PlayOneShot(CutwireClip); return; } AudioSource.PlayOneShot(ElectrocutePlayerClip); ParticleSystem.Play(); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2224352173u, new RpcReceiveHandler(__rpc_handler_2224352173), "CutWireServerRpc"); ((NetworkBehaviour)this).__registerRpc(345677975u, new RpcReceiveHandler(__rpc_handler_345677975), "CutWireClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2224352173(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; ((SafetyWire)(object)target).CutWireServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_345677975(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; ((SafetyWire)(object)target).CutWireClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SafetyWire"; } } [Serializable] public class SecurityMonitor { public MeshRenderer Renderer; public Texture2D OnTexture; public Texture2D OffTexture; } public class SecurityMonitors : NetworkBehaviour { public List Monitors = new List(); private ContainmentNumber ContainmentNumber; private int SelectedMonitor = 0; private int MonitorOpen = 0; private int RequiredMonitorOpen = 0; public bool Started; private bool Finished; public AudioSource MonitorsSfx; public AudioSource KeyboardSfx; public List KeyClips; public AudioClip SwitchClip; public AudioClip EnableClip; public AudioClip DisableClip; public AudioClip FailClip; public AudioClip StartClip; public UnityEvent CompleteHost; public InteractTrigger IncreaseTrigger; public InteractTrigger DecreaseTrigger; public InteractTrigger SwitchTrigger; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePuzzle(); } private void InitialisePuzzle() { if (((NetworkBehaviour)this).IsServer) { RequiredMonitorOpen = Random.Range(0, Monitors.Count); MonitorOpen = Random.Range(0, Monitors.Count); for (SelectedMonitor = Random.Range(0, Monitors.Count); MonitorOpen == RequiredMonitorOpen; MonitorOpen = Random.Range(0, Monitors.Count)) { } SetMonitorActiveClientRpc(SelectedMonitor); SetContainmentNumberClientRpc(RequiredMonitorOpen); } } [ClientRpc] private void SetContainmentNumberClientRpc(int number) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2940262193u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, number); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2940262193u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ContainmentNumber = Object.FindObjectOfType(); ContainmentNumber.SetNumber(number); } } } public void SwitchDoors() { SwitchDoorsServerRpc(); } [ServerRpc(RequireOwnership = false)] private void SwitchDoorsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(64620820u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 64620820u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!Finished) { int num = 0; if (MonitorOpen == SelectedMonitor) { MonitorOpen = -1; num = 1; } else if (MonitorOpen == -1) { MonitorOpen = SelectedMonitor; num = 2; } else { num = 3; } UpdatePuzzleClientRpc(MonitorOpen, value: false, num); if (RequiredMonitorOpen == MonitorOpen) { Finished = true; CompleteHost.Invoke(); FinishPuzzleClientRpc(); } } } [ClientRpc] private void FinishPuzzleClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2970668183u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2970668183u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; IncreaseTrigger.interactable = false; DecreaseTrigger.interactable = false; SwitchTrigger.interactable = false; } } } public void StartPuzzle() { StartPuzzleServerRpc(); } [ServerRpc(RequireOwnership = false)] private void StartPuzzleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2591064911u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2591064911u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Started = true; UpdatePuzzleClientRpc(MonitorOpen, value: true, 0); } } } [ClientRpc] private void UpdatePuzzleClientRpc(int monitorOpen, bool value, int sound) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3827584759u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, monitorOpen); ((FastBufferWriter)(ref val)).WriteValueSafe(ref value, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, sound); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3827584759u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (value) { IncreaseTrigger.interactable = true; DecreaseTrigger.interactable = true; SwitchTrigger.interactable = true; MonitorsSfx.PlayOneShot(StartClip); } PlayKeySound(); switch (sound) { case 1: MonitorsSfx.PlayOneShot(DisableClip); break; case 2: MonitorsSfx.PlayOneShot(EnableClip); break; case 3: MonitorsSfx.PlayOneShot(FailClip); break; } for (int i = 0; i < Monitors.Count; i++) { if (i == monitorOpen) { ((Renderer)Monitors[i].Renderer).material.SetTexture("_BaseColorMap", (Texture)(object)Monitors[i].OnTexture); } else { ((Renderer)Monitors[i].Renderer).material.SetTexture("_BaseColorMap", (Texture)(object)Monitors[i].OffTexture); } } } private void PlayKeySound() { int index = Random.Range(0, KeyClips.Count); KeyboardSfx.PlayOneShot(KeyClips[index]); } public void IncreaseSelectedMonitor() { UpdateSelectedScreenServerRpc(increase: true); } public void DecreaseSelectedMonitor() { UpdateSelectedScreenServerRpc(increase: false); } [ServerRpc(RequireOwnership = false)] private void UpdateSelectedScreenServerRpc(bool increase) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4038885227u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref increase, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4038885227u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (increase && SelectedMonitor < Monitors.Count - 1) { SelectedMonitor++; } if (!increase && SelectedMonitor > 0) { SelectedMonitor--; } SetMonitorActiveClientRpc(SelectedMonitor); } } [ClientRpc] private void SetMonitorActiveClientRpc(int monitor) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0115: 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_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(163182274u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, monitor); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 163182274u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; MonitorsSfx.PlayOneShot(SwitchClip); PlayKeySound(); foreach (SecurityMonitor monitor2 in Monitors) { ((Renderer)monitor2.Renderer).material.SetColor("_EmissiveColor", Color.white * 2f); } ((Renderer)Monitors[monitor].Renderer).material.SetColor("_EmissiveColor", Color.white * 6f); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2940262193u, new RpcReceiveHandler(__rpc_handler_2940262193), "SetContainmentNumberClientRpc"); ((NetworkBehaviour)this).__registerRpc(64620820u, new RpcReceiveHandler(__rpc_handler_64620820), "SwitchDoorsServerRpc"); ((NetworkBehaviour)this).__registerRpc(2970668183u, new RpcReceiveHandler(__rpc_handler_2970668183), "FinishPuzzleClientRpc"); ((NetworkBehaviour)this).__registerRpc(2591064911u, new RpcReceiveHandler(__rpc_handler_2591064911), "StartPuzzleServerRpc"); ((NetworkBehaviour)this).__registerRpc(3827584759u, new RpcReceiveHandler(__rpc_handler_3827584759), "UpdatePuzzleClientRpc"); ((NetworkBehaviour)this).__registerRpc(4038885227u, new RpcReceiveHandler(__rpc_handler_4038885227), "UpdateSelectedScreenServerRpc"); ((NetworkBehaviour)this).__registerRpc(163182274u, new RpcReceiveHandler(__rpc_handler_163182274), "SetMonitorActiveClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2940262193(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 containmentNumberClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref containmentNumberClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((SecurityMonitors)(object)target).SetContainmentNumberClientRpc(containmentNumberClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_64620820(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; ((SecurityMonitors)(object)target).SwitchDoorsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2970668183(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; ((SecurityMonitors)(object)target).FinishPuzzleClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2591064911(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; ((SecurityMonitors)(object)target).StartPuzzleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3827584759(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int monitorOpen = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref monitorOpen); bool value = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, default(ForPrimitives)); int sound = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref sound); target.__rpc_exec_stage = (__RpcExecStage)1; ((SecurityMonitors)(object)target).UpdatePuzzleClientRpc(monitorOpen, value, sound); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4038885227(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 increase = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref increase, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SecurityMonitors)(object)target).UpdateSelectedScreenServerRpc(increase); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_163182274(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 monitorActiveClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref monitorActiveClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((SecurityMonitors)(object)target).SetMonitorActiveClientRpc(monitorActiveClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SecurityMonitors"; } } internal class SequenceLever : NetworkBehaviour { public SequenceLeversController SequenceLeversController; public Animator Animator; public bool Flipped = false; public int SequenceId = 0; public InteractTrigger InteractTrigger; public AudioSource AudioSource; public AudioClip PullLeverClip; public AudioClip LeverLowerClip; public void FlipSequenceLever() { FlipSequenceLeverServerRpc(); } [ServerRpc(RequireOwnership = false)] private void FlipSequenceLeverServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(891458669u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 891458669u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!Flipped) { Flipped = true; SequenceLeversController.AddToSequence(SequenceId); FlipSequenceLeverClientRpc(); } } } [ClientRpc] private void FlipSequenceLeverClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1531055231u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1531055231u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; InteractTrigger.interactable = false; Animator.SetBool("pulled", true); AudioSource.PlayOneShot(PullLeverClip); } } } public void ResetLever() { InteractTrigger.interactable = true; if (Animator.GetBool("pulled")) { AudioSource.PlayOneShot(LeverLowerClip); } Animator.SetBool("pulled", false); if (((NetworkBehaviour)this).IsServer) { Flipped = false; } } public void SetLeverEnabled() { InteractTrigger.interactable = true; Animator.SetTrigger("enable"); } public void CompleteLever() { InteractTrigger.interactable = false; Animator.SetBool("pulled", true); Animator.SetTrigger("complete"); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(891458669u, new RpcReceiveHandler(__rpc_handler_891458669), "FlipSequenceLeverServerRpc"); ((NetworkBehaviour)this).__registerRpc(1531055231u, new RpcReceiveHandler(__rpc_handler_1531055231), "FlipSequenceLeverClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_891458669(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; ((SequenceLever)(object)target).FlipSequenceLeverServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1531055231(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; ((SequenceLever)(object)target).FlipSequenceLeverClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SequenceLever"; } } internal class SequenceLeversController : NetworkBehaviour { [SerializeField] private List SequenceLevers; [SerializeField] private CitadelEventController CitadelEventController; private int[] Sequence; private int[] SequenceInput; public bool StartEnabled; public bool HasStarted; public float ResetLeversDelayTimer = 1.5f; public UnityEvent SequenceCompleted; public UnityEvent SequenceCompletedClients; private void Start() { InitialiseSequenceServerRpc(); } [ServerRpc] private void InitialiseSequenceServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(883765568u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 883765568u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int count = SequenceLevers.Count; Sequence = new int[count]; SequenceInput = new int[count]; List list = new List(); for (int i = 0; i < count; i++) { list.Add(i + 1); } for (int j = 0; j < count; j++) { int index = Random.Range(0, list.Count); Sequence[j] = list[index]; list.RemoveAt(index); } if (StartEnabled) { EnableLeversClientRpc(); } } } public void AddToSequence(int sequenceId) { int sequencePosition = 0; for (int i = 0; i < SequenceInput.Length; i++) { if (SequenceInput[i] == 0) { SequenceInput[i] = sequenceId + 1; sequencePosition = i; break; } } CheckSequenceMatch(sequencePosition); } private void CheckSequenceMatch(int sequencePosition) { if (Sequence[sequencePosition] != SequenceInput[sequencePosition]) { for (int i = 0; i < SequenceInput.Length; i++) { SequenceInput[i] = 0; } ResetLeversClientRpc(); return; } if ((Object)(object)CitadelEventController != (Object)null) { switch (sequencePosition) { case 1: CitadelEventController.SetEventStageServer(2); break; case 3: CitadelEventController.SetEventStageServer(3); break; case 5: CitadelEventController.SetEventStageServer(4); break; } } if (Sequence.SequenceEqual(SequenceInput)) { SequenceCompleted.Invoke(); SequenceCompletedClientRpc(); } } [ClientRpc] private void SequenceCompletedClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2683172820u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2683172820u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; SequenceCompletedClients.Invoke(); foreach (SequenceLever sequenceLever in SequenceLevers) { sequenceLever.CompleteLever(); } } private IEnumerator ResetLeversDelayCoroutine() { yield return (object)new WaitForSeconds(ResetLeversDelayTimer); ResetLevers(); } [ClientRpc] private void ResetLeversClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3434867037u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3434867037u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (SequenceLever sequenceLever in SequenceLevers) { sequenceLever.InteractTrigger.interactable = false; } ((MonoBehaviour)this).StartCoroutine(ResetLeversDelayCoroutine()); } private void ResetLevers() { foreach (SequenceLever sequenceLever in SequenceLevers) { sequenceLever.ResetLever(); } } public void EnableLevers() { HasStarted = true; EnableLeversClientRpc(); } [ClientRpc] private void EnableLeversClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(528347140u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 528347140u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (SequenceLever sequenceLever in SequenceLevers) { sequenceLever.SetLeverEnabled(); } } public void ForceComplete() { ForceCompleteServerRpc(); } [ServerRpc(RequireOwnership = false)] private void ForceCompleteServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3808523017u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3808523017u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (HasStarted) { SequenceCompleted.Invoke(); SequenceCompletedClientRpc(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(883765568u, new RpcReceiveHandler(__rpc_handler_883765568), "InitialiseSequenceServerRpc"); ((NetworkBehaviour)this).__registerRpc(2683172820u, new RpcReceiveHandler(__rpc_handler_2683172820), "SequenceCompletedClientRpc"); ((NetworkBehaviour)this).__registerRpc(3434867037u, new RpcReceiveHandler(__rpc_handler_3434867037), "ResetLeversClientRpc"); ((NetworkBehaviour)this).__registerRpc(528347140u, new RpcReceiveHandler(__rpc_handler_528347140), "EnableLeversClientRpc"); ((NetworkBehaviour)this).__registerRpc(3808523017u, new RpcReceiveHandler(__rpc_handler_3808523017), "ForceCompleteServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_883765568(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((SequenceLeversController)(object)target).InitialiseSequenceServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2683172820(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; ((SequenceLeversController)(object)target).SequenceCompletedClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3434867037(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; ((SequenceLeversController)(object)target).ResetLeversClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_528347140(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; ((SequenceLeversController)(object)target).EnableLeversClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3808523017(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; ((SequenceLeversController)(object)target).ForceCompleteServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SequenceLeversController"; } } internal class ShipActions : MonoBehaviour { public void TakeOff() { StartOfRound.Instance.ShipLeaveAutomatically(true); } } internal class SkinnedThumperDeath : NetworkBehaviour { private Exterminator Exterminator; public void ThumperKilled() { if (((NetworkBehaviour)this).IsServer) { Exterminator = Object.FindAnyObjectByType(); if ((Object)(object)Exterminator != (Object)null) { Exterminator.IncreaseThumperCount(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "SkinnedThumperDeath"; } } internal class StarsPuzzleObjective : NetworkBehaviour { public Animator animator; public Transform GlassYTransform; public Transform GlassXTransform; public float RotationMultiplier = 8f; private float TargetYRot = 0f; private float TargetXRot = 0f; private float GlassXRot = 0f; private float GlassYRot = 0f; public InteractTrigger LeftTrigger; public InteractTrigger RightTrigger; public InteractTrigger UpTrigger; public InteractTrigger DownTrigger; public Transform RaycastTransform; public Animator ButtonAnimator1; public Animator ButtonAnimator2; public Animator ButtonAnimator3; public Animator ButtonAnimator4; public Light TowerLight; public AudioSource TurnSfxA; public AudioSource TurnSfxB; public AudioSource StarsSfx; public AudioClip[] StarClips; public HDAdditionalLightData TowerLightHD; public GameObject StarPrefab; public float[] PossibleStarPositions = new float[6]; public float[] StarPositions = new float[2] { -20f, 120f }; private bool IsTurningRight = false; private bool IsTurningLeft = false; private bool IsTurningUp = false; private bool IsTurningDown = false; public float MinimumLightWidth = 2f; public float MinimumLightIntensity = 800f; public float MaximumLightWidth = 24.7f; public float MaximumLightIntensity = 800f; private bool PuzzleCompleted = false; private bool PuzzleInitialised = false; private bool LightChangeAllowed = true; private int StarsFound = 0; private float StarsFoundDelay = 0f; private float LightIntensity = 0f; public UnityEvent CompletedEvent; public UnityEvent CompletedEventClients; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private void Start() { LightIntensity = MaximumLightIntensity; TowerLightHD.intensity = 3000f; TowerLight.intensity = 3000f; LightChangeAllowed = true; } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); SetStarValues(); } private IEnumerator EnableTriggersCoroutine() { yield return (object)new WaitForSeconds(2f); LeftTrigger.interactable = true; RightTrigger.interactable = true; UpTrigger.interactable = true; DownTrigger.interactable = true; LightChangeAllowed = true; } private void SetStarValues() { SetStarValuesServerRpc(); LightIntensity = 0f; TowerLightHD.intensity = LightIntensity; } [ServerRpc] private void SetStarValuesServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2759448205u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2759448205u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int num = 0; for (int i = 0; i < 3; i++) { float num2 = Random.Range(-90f, 0f); PossibleStarPositions[num] = num2; float num3 = Random.Range(-180f, 180f); PossibleStarPositions[1 + num] = num3; num += 2; } SetStarValuesClientRpc(PossibleStarPositions); } } [ClientRpc] private void SetStarValuesClientRpc(float[] startPositions) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1829074763u, val2, (RpcDelivery)0); bool flag = startPositions != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(startPositions, default(ForPrimitives)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1829074763u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; for (int i = 0; i < startPositions.Length; i++) { PossibleStarPositions[i] = startPositions[i]; } StarPositions[0] = PossibleStarPositions[0]; StarPositions[1] = PossibleStarPositions[1]; PuzzleInitialised = true; } } private void Update() { //IL_00d8: 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) if (TurnSfxA.volume > 0f) { AudioSource turnSfxA = TurnSfxA; turnSfxA.volume -= Time.deltaTime; } if (TurnSfxB.volume > 0f) { AudioSource turnSfxB = TurnSfxB; turnSfxB.volume -= Time.deltaTime; } if (!PuzzleCompleted && PuzzleInitialised) { GlassYRot = Mathf.LerpAngle(GlassYRot, TargetYRot, Time.deltaTime * 4f); GlassXRot = Mathf.LerpAngle(GlassXRot, TargetXRot, Time.deltaTime * 4f); GlassYTransform.localRotation = Quaternion.Euler(0f, GlassYRot, 0f); GlassXTransform.localRotation = Quaternion.Euler(GlassXRot, 0f, 0f); if (IsTurningLeft) { TargetYRot -= Time.deltaTime * RotationMultiplier; AudioSource turnSfxA2 = TurnSfxA; turnSfxA2.volume += 2f * Time.deltaTime; } if (IsTurningRight) { TargetYRot += Time.deltaTime * RotationMultiplier; AudioSource turnSfxA3 = TurnSfxA; turnSfxA3.volume += 2f * Time.deltaTime; } if (IsTurningUp) { TargetXRot = Mathf.Clamp(TargetXRot - Time.deltaTime * RotationMultiplier, -90f, 6.7f); AudioSource turnSfxB2 = TurnSfxB; turnSfxB2.volume += 2f * Time.deltaTime; } if (IsTurningDown) { TargetXRot = Mathf.Clamp(TargetXRot + Time.deltaTime * RotationMultiplier, -90f, 6.7f); AudioSource turnSfxB3 = TurnSfxB; turnSfxB3.volume += 2f * Time.deltaTime; } if (StarsFoundDelay > 0f) { StarsFoundDelay -= Time.deltaTime; } CalculateLightWidthAndSetLights(); } } private void StarFoundCheck(float angle) { if (angle < 2f) { StarFoundServerRpc(); } } [ServerRpc(RequireOwnership = false)] private void StarFoundServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2127942123u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2127942123u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; bool victory = false; if (StarsFoundDelay <= 0f) { StarsFoundDelay = 5f; StarsFound++; if (StarsFound == 3) { CompletedEvent.Invoke(); victory = true; } StarFoundClientRpc(StarsFound - 1, victory); } } [ClientRpc] private void StarFoundClientRpc(int star, bool victory) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: 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_01b6: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2343504802u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, star); ((FastBufferWriter)(ref val)).WriteValueSafe(ref victory, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2343504802u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; GlassXRot = StarPositions[0]; TargetXRot = StarPositions[0]; GlassYRot = StarPositions[1]; TargetYRot = StarPositions[1]; LightIntensity = 0f; TowerLightHD.intensity = LightIntensity; StarsSfx.PlayOneShot(StarClips[star]); RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(RaycastTransform.position, RaycastTransform.forward, ref val3, 20f, 1 << LayerMask.NameToLayer("Room"))) { Vector3 val4 = ((RaycastHit)(ref val3)).point - RaycastTransform.forward * 0.12f; Object.Instantiate(StarPrefab, val4, Quaternion.identity, ((Component)this).transform); } LeftTrigger.interactable = false; RightTrigger.interactable = false; UpTrigger.interactable = false; DownTrigger.interactable = false; LightChangeAllowed = false; star++; switch (star) { case 1: StarPositions[0] = PossibleStarPositions[2]; StarPositions[1] = PossibleStarPositions[3]; break; case 2: StarPositions[0] = PossibleStarPositions[4]; StarPositions[1] = PossibleStarPositions[5]; break; } if (victory) { CompletedEventClients.Invoke(); PuzzleCompleted = true; TowerLightHD.intensity = 0f; animator.SetTrigger("finish"); } else { ((MonoBehaviour)this).StartCoroutine(EnableTriggersCoroutine()); } } } private void CalculateLightWidthAndSetLights() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) Quaternion val = Quaternion.Euler(TargetXRot, TargetYRot, 0f); Quaternion val2 = Quaternion.Euler(StarPositions[0], StarPositions[1], 0f); float num = Quaternion.Angle(val, val2); float num2 = num; num2 = (MaximumLightWidth - MinimumLightWidth) / 180f * num2 + MinimumLightWidth; float num3 = ((MinimumLightIntensity - MaximumLightIntensity) / 180f * num2 - MinimumLightIntensity) * -1f; TowerLight.spotAngle = num2; if (LightChangeAllowed) { LightIntensity = Mathf.Lerp(LightIntensity, num3, Time.deltaTime * 0.02f); TowerLightHD.intensity = LightIntensity; } StarFoundCheck(num); } public void StartTurning(int id) { SetTurningServerRpc(id, start: true); } public void StopTurning(int id) { SetTurningServerRpc(id, start: false); } [ServerRpc(RequireOwnership = false)] private void SetTurningServerRpc(int id, bool start) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4194526560u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, id); ((FastBufferWriter)(ref val)).WriteValueSafe(ref start, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4194526560u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetTurningClientRpc(id, start); } } } [ClientRpc] private void SetTurningClientRpc(int id, bool start) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1159718114u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, id); ((FastBufferWriter)(ref val)).WriteValueSafe(ref start, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1159718114u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (start) { switch (id) { case 0: ButtonAnimator1.SetBool("pressed", true); IsTurningLeft = true; break; case 1: ButtonAnimator2.SetBool("pressed", true); IsTurningRight = true; break; case 2: ButtonAnimator3.SetBool("pressed", true); IsTurningUp = true; break; case 3: ButtonAnimator4.SetBool("pressed", true); IsTurningDown = true; break; } } else { switch (id) { case 0: ButtonAnimator1.SetBool("pressed", false); IsTurningLeft = false; break; case 1: ButtonAnimator2.SetBool("pressed", false); IsTurningRight = false; break; case 2: ButtonAnimator3.SetBool("pressed", false); IsTurningUp = false; break; case 3: ButtonAnimator4.SetBool("pressed", false); IsTurningDown = false; break; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2759448205u, new RpcReceiveHandler(__rpc_handler_2759448205), "SetStarValuesServerRpc"); ((NetworkBehaviour)this).__registerRpc(1829074763u, new RpcReceiveHandler(__rpc_handler_1829074763), "SetStarValuesClientRpc"); ((NetworkBehaviour)this).__registerRpc(2127942123u, new RpcReceiveHandler(__rpc_handler_2127942123), "StarFoundServerRpc"); ((NetworkBehaviour)this).__registerRpc(2343504802u, new RpcReceiveHandler(__rpc_handler_2343504802), "StarFoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(4194526560u, new RpcReceiveHandler(__rpc_handler_4194526560), "SetTurningServerRpc"); ((NetworkBehaviour)this).__registerRpc(1159718114u, new RpcReceiveHandler(__rpc_handler_1159718114), "SetTurningClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2759448205(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((StarsPuzzleObjective)(object)target).SetStarValuesServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1829074763(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_006e: 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_0058: 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 flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); float[] starValuesClientRpc = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref starValuesClientRpc, default(ForPrimitives)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((StarsPuzzleObjective)(object)target).SetStarValuesClientRpc(starValuesClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2127942123(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; ((StarsPuzzleObjective)(object)target).StarFoundServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2343504802(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int star = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref star); bool victory = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref victory, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((StarsPuzzleObjective)(object)target).StarFoundClientRpc(star, victory); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4194526560(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); bool start = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref start, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((StarsPuzzleObjective)(object)target).SetTurningServerRpc(id, start); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1159718114(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); bool start = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref start, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((StarsPuzzleObjective)(object)target).SetTurningClientRpc(id, start); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "StarsPuzzleObjective"; } } internal class SteamIdEvent : MonoBehaviour { public List SteamIds; public UnityEvent Event; public UnityEvent InverseEvent; public bool RunOnAwake = true; private void Awake() { if (RunOnAwake) { RunEvent(); } } public void RunEvent() { string text = GameNetworkManager.Instance.localPlayerController.playerSteamId.ToString(); bool flag = false; foreach (string steamId in SteamIds) { if (steamId == text) { flag = true; break; } } if (flag) { Event.Invoke(); } else { InverseEvent.Invoke(); } } } internal class SymbolCodeMatcher : NetworkBehaviour { public bool Display = true; public List SymbolTextures; public List SymbolMaterials; public List NumberMaterials; private SymbolCodeMatcher[] SymbolCodeMatchers; public List SymbolDisplayRenderers; public DecalProjector SymbolProjector; public DecalProjector NumberProjector; public CodeGenerator CodeGenerator; public int[] Symbols; private void Awake() { if (!Display && (Object)(object)CodeGenerator != (Object)null) { Symbols = new int[CodeGenerator.CodeLength]; } } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePuzzle(); } private void InitialisePuzzle() { SetCodeSymbolsServerRpc(); } private void Start() { if ((Object)(object)CodeGenerator == (Object)null) { CodeGenerator = Object.FindObjectOfType(); } if (!Display) { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } } [ServerRpc] private void SetCodeSymbolsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2585589730u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2585589730u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; for (int i = 0; i < Symbols.Length; i++) { int num = Random.Range(0, SymbolTextures.Count); while (Symbols.Contains(num)) { num = Random.Range(0, SymbolTextures.Count); } Symbols[i] = num; } SetCodeSymbolsClientRpc(Symbols, CodeGenerator.intCode); } [ClientRpc] private void SetCodeSymbolsClientRpc(int[] symbols, int[] code) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2319600038u, val2, (RpcDelivery)0); bool flag = symbols != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(symbols, default(ForPrimitives)); } bool flag2 = code != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val)).WriteValueSafe(code, default(ForPrimitives)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2319600038u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; SymbolCodeMatchers = Object.FindObjectsOfType(); if (SymbolDisplayRenderers.Count > 0) { for (int i = 0; i < SymbolDisplayRenderers.Count; i++) { ((Renderer)SymbolDisplayRenderers[i]).material.SetTexture("_BaseColorMap", (Texture)(object)SymbolTextures[symbols[i]]); } } int num = 0; if (SymbolCodeMatchers.Length == 0) { return; } for (int j = 0; j < SymbolCodeMatchers.Length; j++) { if (SymbolCodeMatchers[j].Display) { SymbolCodeMatchers[j].SymbolProjector.material = SymbolCodeMatchers[j].SymbolMaterials[symbols[num]]; SymbolCodeMatchers[j].NumberProjector.material = SymbolCodeMatchers[j].NumberMaterials[code[num]]; num++; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2585589730u, new RpcReceiveHandler(__rpc_handler_2585589730), "SetCodeSymbolsServerRpc"); ((NetworkBehaviour)this).__registerRpc(2319600038u, new RpcReceiveHandler(__rpc_handler_2319600038), "SetCodeSymbolsClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2585589730(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((SymbolCodeMatcher)(object)target).SetCodeSymbolsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2319600038(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_0074: 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_0058: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); int[] symbols = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref symbols, default(ForPrimitives)); } bool flag2 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag2, default(ForPrimitives)); int[] code = null; if (flag2) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref code, default(ForPrimitives)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((SymbolCodeMatcher)(object)target).SetCodeSymbolsClientRpc(symbols, code); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SymbolCodeMatcher"; } } internal class TicketInsertTool : NetworkBehaviour { public bool IsMachine; public int TicketID; [Header("Ticket")] public AudioSource TicketInsertSfx; public InteractTrigger InteractTrigger; public GameObject Button1; public GameObject Button2; public GameObject Ticket; [Header("TV")] public InteractTrigger TvTrigger; public AudioSource Voice1Sfx; public AudioSource Voice2Sfx; public Animator TvAnimator; public AudioSource SwitchSfx; public float OffDelay1; public float OffDelay2; public UnityEvent TvEvent1; public UnityEvent TvEvent2; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (((NetworkBehaviour)this).IsServer && !IsMachine && WesleysInteriorToolsPlugin.CurrentSave.GetTicketInserted(TicketID)) { SetTicketInsertedClientRpc(); } } public void InsertTicket() { SetTicketInsertedServerRpc(); } [ServerRpc(RequireOwnership = false)] private void SetTicketInsertedServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3976952553u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3976952553u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; WesleysInteriorToolsPlugin.CurrentSave.SetTicketInserted(TicketID); SetTicketInsertedClientRpc(); } } } [ClientRpc] private void SetTicketInsertedClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1855984077u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1855984077u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TicketInsertSfx.Play(); InteractTrigger.interactable = false; Button1.SetActive(false); Button2.SetActive(true); Ticket.SetActive(true); } } } public void TurnTvOn() { EnableTvServerRpc(); } [ServerRpc(RequireOwnership = false)] private void EnableTvServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2354617361u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2354617361u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (WesleysInteriorToolsPlugin.CurrentSave.CheckAllTickets()) { EnableTvClientRpc(0); } else { EnableTvClientRpc(1); } } } [ClientRpc] private void EnableTvClientRpc(int state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2138250382u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, state); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2138250382u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TvTrigger.interactable = false; TvAnimator.SetTrigger("start"); if (state == 0) { Voice1Sfx.Play(); ((MonoBehaviour)this).StartCoroutine(TvTurnOffDelayCoroutine(OffDelay1, 0)); } else { Voice2Sfx.Play(); ((MonoBehaviour)this).StartCoroutine(TvTurnOffDelayCoroutine(OffDelay2, 1)); } } } public IEnumerator TvTurnOffDelayCoroutine(float delay, int state) { yield return (object)new WaitForSeconds(delay); TvAnimator.SetTrigger("break"); SwitchSfx.Play(); if (state == 0) { TvEvent1.Invoke(); } else { TvEvent2.Invoke(); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3976952553u, new RpcReceiveHandler(__rpc_handler_3976952553), "SetTicketInsertedServerRpc"); ((NetworkBehaviour)this).__registerRpc(1855984077u, new RpcReceiveHandler(__rpc_handler_1855984077), "SetTicketInsertedClientRpc"); ((NetworkBehaviour)this).__registerRpc(2354617361u, new RpcReceiveHandler(__rpc_handler_2354617361), "EnableTvServerRpc"); ((NetworkBehaviour)this).__registerRpc(2138250382u, new RpcReceiveHandler(__rpc_handler_2138250382), "EnableTvClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3976952553(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; ((TicketInsertTool)(object)target).SetTicketInsertedServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1855984077(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; ((TicketInsertTool)(object)target).SetTicketInsertedClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2354617361(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; ((TicketInsertTool)(object)target).EnableTvServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2138250382(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 state = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref state); target.__rpc_exec_stage = (__RpcExecStage)1; ((TicketInsertTool)(object)target).EnableTvClientRpc(state); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TicketInsertTool"; } } internal class TrialObject : NetworkBehaviour { public bool IsInsideTrial = true; public override void OnNetworkSpawn() { if (!((NetworkBehaviour)this).IsServer) { return; } switch (WesleysInteriorToolsPlugin.GetTrialValue()) { case 0: DespawnObject(); break; case 2: { SelectableLevel currentLevel = RoundManager.Instance.currentLevel; ExtendedLevel val = null; foreach (ExtendedLevel extendedLevel in PatchedContent.ExtendedLevels) { if (extendedLevel.SelectableLevel.sceneName == currentLevel.sceneName) { val = extendedLevel; } } if (!((Object)(object)val != (Object)null)) { break; } bool flag = false; foreach (ContentTag contentTag in ((ExtendedContent)val).ContentTags) { if (IsInsideTrial) { if (contentTag.contentTagName == "IndoorTrials") { flag = true; break; } } else if (contentTag.contentTagName == "Trials") { flag = true; break; } } if (!flag) { DespawnObject(); } break; } } } private void DespawnObject() { NetworkObject val = null; if ((Object)(object)((Component)this).GetComponent() != (Object)null) { val = ((Component)this).GetComponent(); } if ((Object)(object)val != (Object)null) { val.Despawn(true); } else { DestroyObjectOnClientRpc(); } } [ClientRpc] private void DestroyObjectOnClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(280992285u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 280992285u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Object.Destroy((Object)(object)((Component)this).gameObject); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(280992285u, new RpcReceiveHandler(__rpc_handler_280992285), "DestroyObjectOnClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_280992285(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; ((TrialObject)(object)target).DestroyObjectOnClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TrialObject"; } } internal class TriangulationSpot : NetworkBehaviour { public NetworkObject NetObject; public TriangulateEnums.TriangulateMoon MoonToTriangulate; public Animator Animator; public AudioSource TriangulateSfx; public AudioSource TriangulateGlobalSfx; public AudioClip TriangulateSfxClip; public AudioClip DiscoverShipClip; public AudioClip DiscoverShipClipGlobal; public JMessageLogger Logger; public UnityEvent UnityEvent; public InteractTrigger Trigger; public bool IsOccupied; public bool StateSet; private int PlayersLoaded; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); NotifyServerRpc(); if (((NetworkBehaviour)this).IsServer) { TrySetTriangulatableMoons(); } } [ServerRpc(RequireOwnership = false)] private void NotifyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1666592829u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1666592829u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayersLoaded++; } } } private IEnumerator WaitForPlayersCoroutine() { while (PlayersLoaded < GameNetworkManager.Instance.connectedPlayers) { yield return null; } yield return (object)new WaitForSeconds(0.5f); SetTriangulationState(); } private IEnumerator ExtraWaitCoroutine() { yield return (object)new WaitForSeconds(12f); SetTriangulationState(); } private void TrySetTriangulatableMoons() { if (WesleysInteriorToolsPlugin.CurrentSave.GetTriangulatedMoonsDefaultList().Length == 0) { int[] array = new int[7] { -1, -1, -1, -1, -1, -1, -1 }; List list = new List(); int num = Enum.GetNames(typeof(TriangulateEnums.TriangulateMoon)).Length; array[0] = 0; array[3] = 1; array[5] = 3; array[6] = 5; for (int i = 0; i < num; i++) { if (!array.Contains(i)) { list.Add(i); } } for (int j = 0; j < array.Length; j++) { if (array[j] == -1) { int index = Random.Range(0, list.Count); array[j] = list[index]; list.Remove(list[index]); } } WesleysInteriorToolsPlugin.CurrentSave.SetTriangulatedMoonsDefault(array); WesleysInteriorToolsPlugin.CurrentSave.SetTriangulatedMoonsList(); } ((MonoBehaviour)this).StartCoroutine(WaitForPlayersCoroutine()); ((MonoBehaviour)this).StartCoroutine(ExtraWaitCoroutine()); } private void SetTriangulationState() { if (StateSet) { return; } StateSet = true; switch (WesleysInteriorToolsPlugin.CurrentSave.GetTriangulationState(MoonToTriangulate)) { case 1: UnfoldClientRpc(show: false, new int[0], unlock: false, shipCrashed: false); break; case 2: if ((Object)(object)NetObject == (Object)null) { NetObject = ((Component)this).GetComponent(); } if ((Object)(object)NetObject != (Object)null) { NetObject.Despawn(true); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } DestroyObjectClientRpc(); break; } } [ClientRpc] private void DestroyObjectClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(65135828u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 65135828u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)((Component)this).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public void PlaceTriangulationDevice() { PlaceTriangulationDeviceServerRpc(); } [ServerRpc(RequireOwnership = false)] public void PlaceTriangulationDeviceServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2364289651u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2364289651u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (WesleysInteriorToolsPlugin.CurrentSave.GetTriangulationState(MoonToTriangulate) == 0) { WesleysInteriorToolsPlugin.CurrentSave.SetMoonTriangulated(MoonToTriangulate); bool flag = false; bool flag2 = false; bool flag3 = false; int[] array = new int[2] { -1, -1 }; List triangulatedMoonsList = WesleysInteriorToolsPlugin.CurrentSave.GetTriangulatedMoonsList(); if (triangulatedMoonsList.Count > 0) { array[0] = triangulatedMoonsList[0]; } if (triangulatedMoonsList.Count > 1) { array[1] = triangulatedMoonsList[1]; } flag2 = WesleysInteriorToolsPlugin.CurrentSave.CheckIfAllTriangulated() && WesleysInteriorToolsPlugin.CurrentSave.GetShipState() == 0; flag3 = WesleysInteriorToolsPlugin.CurrentSave.GetShipState() == 2; if (flag2) { WesleysInteriorToolsPlugin.CurrentSave.TryAddMoonToList("SpecialPlaceScene"); } UnfoldClientRpc(show: true, array, flag2, flag3); } } [ClientRpc] public void UnfoldClientRpc(bool show, int[] moons, bool unlock, bool shipCrashed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (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_00a3: 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_015d: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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_0104: 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_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3021658013u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref show, default(ForPrimitives)); bool flag = moons != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(moons, default(ForPrimitives)); } ((FastBufferWriter)(ref val)).WriteValueSafe(ref unlock, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref shipCrashed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3021658013u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Animator.SetTrigger("place"); TriangulateSfx.PlayOneShot(TriangulateSfxClip); Trigger.interactable = false; IsOccupied = true; if (show) { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine(moons, unlock, shipCrashed)); } } } private IEnumerator DelayCoroutine(int[] moons, bool unlock, bool shipCrashed) { yield return (object)new WaitForSeconds(9f); if (!unlock) { SendMoonHintTip(moons, shipCrashed); yield break; } TriangulateSfx.PlayOneShot(DiscoverShipClip); yield return (object)new WaitForSeconds(4.5f); TriangulateGlobalSfx.PlayOneShot(DiscoverShipClipGlobal); yield return (object)new WaitForSeconds(2.8f); UnityEvent.Invoke(); } private void SendMoonHintTip(int[] moons, bool shipCrashed) { if (shipCrashed) { Logger.logName = "Triangulation device:"; Logger.SendTip("Nothing to triangulate"); return; } string text = ""; for (int i = 0; i < moons.Length; i++) { switch (moons[i]) { case -1: text += " "; break; case 0: text += "67-2 Vindict"; break; case 1: text += "141-2 Centrus"; break; case 2: text += "397 Chasm"; break; case 3: text += "42-2 Glimmer"; break; case 4: text += "164 Dreck"; break; case 5: text += "234 Motra"; break; case 6: text += "452 Selector"; break; case 7: text += "733 Spine"; break; case 8: text += "426 Dune"; break; case 9: text += "994 Xenphir"; break; case 10: text += "455 Heap"; break; } if (i == 0 && moons[1] != -1) { text += ", "; } } Logger.SendTip(text); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1666592829u, new RpcReceiveHandler(__rpc_handler_1666592829), "NotifyServerRpc"); ((NetworkBehaviour)this).__registerRpc(65135828u, new RpcReceiveHandler(__rpc_handler_65135828), "DestroyObjectClientRpc"); ((NetworkBehaviour)this).__registerRpc(2364289651u, new RpcReceiveHandler(__rpc_handler_2364289651), "PlaceTriangulationDeviceServerRpc"); ((NetworkBehaviour)this).__registerRpc(3021658013u, new RpcReceiveHandler(__rpc_handler_3021658013), "UnfoldClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1666592829(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; ((TriangulationSpot)(object)target).NotifyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_65135828(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; ((TriangulationSpot)(object)target).DestroyObjectClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2364289651(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; ((TriangulationSpot)(object)target).PlaceTriangulationDeviceServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3021658013(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool show = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref show, default(ForPrimitives)); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); int[] moons = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref moons, default(ForPrimitives)); } bool unlock = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref unlock, default(ForPrimitives)); bool shipCrashed = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shipCrashed, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((TriangulationSpot)(object)target).UnfoldClientRpc(show, moons, unlock, shipCrashed); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TriangulationSpot"; } } [Serializable] public class InteractEntry { public string AnimationString; public UnityEvent EntryEvent; } internal class TriggerCounter : NetworkBehaviour { public InteractTrigger Trigger; public string TriggerString; public bool IsBool; public Animator AttachedAnimator; private int TriggeredAmount = 0; public List InteractEntries; private void Awake() { Trigger.hoverTip = $"{TriggerString} (0/{InteractEntries.Count}) : [E]"; } public void IncreaseInteracts() { IncreaseInteractServerRpc(); } [ServerRpc(RequireOwnership = false)] private void IncreaseInteractServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1106737853u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1106737853u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; bool disableTrigger = TriggeredAmount + 1 >= InteractEntries.Count; DoInteractEffectClientRpc(TriggeredAmount, disableTrigger); TriggeredAmount++; } } } [ClientRpc] private void DoInteractEffectClientRpc(int trigger, bool disableTrigger) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2822081182u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, trigger); ((FastBufferWriter)(ref val)).WriteValueSafe(ref disableTrigger, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2822081182u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (disableTrigger) { Trigger.interactable = false; } Trigger.hoverTip = $"{TriggerString} ({trigger + 1}/{InteractEntries.Count}) : [E]"; if (IsBool) { Animator attachedAnimator = AttachedAnimator; if (attachedAnimator != null) { attachedAnimator.SetBool(InteractEntries[trigger].AnimationString, true); } } else { Animator attachedAnimator2 = AttachedAnimator; if (attachedAnimator2 != null) { attachedAnimator2.SetTrigger(InteractEntries[trigger].AnimationString); } } InteractEntries[trigger].EntryEvent.Invoke(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1106737853u, new RpcReceiveHandler(__rpc_handler_1106737853), "IncreaseInteractServerRpc"); ((NetworkBehaviour)this).__registerRpc(2822081182u, new RpcReceiveHandler(__rpc_handler_2822081182), "DoInteractEffectClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1106737853(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; ((TriggerCounter)(object)target).IncreaseInteractServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2822081182(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int trigger = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trigger); bool disableTrigger = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref disableTrigger, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((TriggerCounter)(object)target).DoInteractEffectClientRpc(trigger, disableTrigger); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TriggerCounter"; } } internal class TriggerManipulator : MonoBehaviour { public InteractTrigger Trigger; public void SetTriggerInteractable(bool value) { Trigger.interactable = value; } } public class ValveMachinePuzzle : NetworkBehaviour { [Serializable] public class TurnableValve { public int Id; public Animator Animator; public AudioSource AudioSource; public InteractTrigger Trigger; public bool Turned = true; } public List Valves; public AudioSource LoopingAudioSource; public AudioSource MachineAudioSource; public AudioClip MachineStartClip; public AudioClip MachineFinishClip; public AudioClip ValvePopClip; public AudioClip ValveTurnClip; public float ValvePopTimeMin = 1f; public float ValvePopTimeMax = 2.5f; public float MachineFinishTimer = 20f; private float MachineFinishTime; public bool Started; public bool Finished; private List poppedIds = new List(); private List unpoppedIds = new List(); public UnityEvent HostFinishEvent; private int ValveAmount; private int ValveAmountClosed; private void Awake() { ValveAmount = Valves.Count; ValveAmountClosed = ValveAmount; int num = 0; foreach (TurnableValve valf in Valves) { valf.Trigger.interactable = false; valf.Id = num; unpoppedIds.Add(num); num++; } } private void Update() { if (!((NetworkBehaviour)this).IsServer || Finished || !Started) { return; } if (MachineFinishTime < MachineFinishTimer) { if (ValveAmountClosed < ValveAmount - 2) { MachineFinishTime += Time.deltaTime * 0.1f; } else if (ValveAmountClosed < ValveAmount - 4) { MachineFinishTime += Time.deltaTime * 0.3f; } else { MachineFinishTime += Time.deltaTime / (float)(ValveAmount / ValveAmountClosed); } } else { UnityEvent hostFinishEvent = HostFinishEvent; if (hostFinishEvent != null) { hostFinishEvent.Invoke(); } Finished = true; FinishPuzzleClientRpc(); } LoopingAudioSource.pitch = 0.6f + 0.4f / MachineFinishTimer * MachineFinishTime; } [ClientRpc] private void FinishPuzzleClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3841238780u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3841238780u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (TurnableValve valf in Valves) { if (!valf.Turned) { valf.Turned = true; valf.Animator.SetBool("open", false); valf.AudioSource.PlayOneShot(ValveTurnClip); valf.Trigger.interactable = false; } } MachineAudioSource.PlayOneShot(MachineFinishClip); LoopingAudioSource.Stop(); } private IEnumerator PopValveCoroutine(float delay) { yield return (object)new WaitForSeconds(delay); if (!Finished) { PickValveToPop(); float rand = Random.Range(ValvePopTimeMin, ValvePopTimeMax); if (ValveAmountClosed > ValveAmount / 4 * 3) { rand /= 2f; } ((MonoBehaviour)this).StartCoroutine(PopValveCoroutine(rand)); } } public void StartMachine() { StartMachineServerRpc(); } [ServerRpc(RequireOwnership = false)] private void StartMachineServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2349566980u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2349566980u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!Started) { Started = true; StartMachineClientRpc(); float delay = Random.Range(ValvePopTimeMin, ValvePopTimeMax); ((MonoBehaviour)this).StartCoroutine(PopValveCoroutine(delay)); } } } [ClientRpc] private void StartMachineClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2472990328u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2472990328u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MachineAudioSource.PlayOneShot(MachineStartClip); LoopingAudioSource.Play(); } } } private void PickValveToPop() { if (unpoppedIds.Count > 0) { int index = Random.Range(0, unpoppedIds.Count); int num = unpoppedIds[index]; unpoppedIds.RemoveAt(index); poppedIds.Add(num); ValveAmountClosed--; PopValveClientRpc(num); } } [ClientRpc] private void PopValveClientRpc(int valve) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4258519862u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, valve); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4258519862u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Valves[valve].Turned = false; Valves[valve].Animator.SetBool("open", true); Valves[valve].AudioSource.PlayOneShot(ValvePopClip); Valves[valve].Trigger.interactable = true; } } } public void TurnValve(int id) { CloseValveServerRpc(id); } [ServerRpc(RequireOwnership = false)] private void CloseValveServerRpc(int id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1269890588u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, id); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1269890588u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CloseValveClientRpc(id); ValveAmountClosed++; poppedIds.Remove(id); unpoppedIds.Add(id); } } } [ClientRpc] private void CloseValveClientRpc(int id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3856635331u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, id); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3856635331u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Valves[id].Turned = true; Valves[id].Animator.SetBool("open", false); Valves[id].AudioSource.PlayOneShot(ValveTurnClip); Valves[id].Trigger.interactable = false; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3841238780u, new RpcReceiveHandler(__rpc_handler_3841238780), "FinishPuzzleClientRpc"); ((NetworkBehaviour)this).__registerRpc(2349566980u, new RpcReceiveHandler(__rpc_handler_2349566980), "StartMachineServerRpc"); ((NetworkBehaviour)this).__registerRpc(2472990328u, new RpcReceiveHandler(__rpc_handler_2472990328), "StartMachineClientRpc"); ((NetworkBehaviour)this).__registerRpc(4258519862u, new RpcReceiveHandler(__rpc_handler_4258519862), "PopValveClientRpc"); ((NetworkBehaviour)this).__registerRpc(1269890588u, new RpcReceiveHandler(__rpc_handler_1269890588), "CloseValveServerRpc"); ((NetworkBehaviour)this).__registerRpc(3856635331u, new RpcReceiveHandler(__rpc_handler_3856635331), "CloseValveClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3841238780(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; ((ValveMachinePuzzle)(object)target).FinishPuzzleClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2349566980(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; ((ValveMachinePuzzle)(object)target).StartMachineServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2472990328(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; ((ValveMachinePuzzle)(object)target).StartMachineClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4258519862(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 valve = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref valve); target.__rpc_exec_stage = (__RpcExecStage)1; ((ValveMachinePuzzle)(object)target).PopValveClientRpc(valve); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1269890588(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((ValveMachinePuzzle)(object)target).CloseValveServerRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3856635331(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((ValveMachinePuzzle)(object)target).CloseValveClientRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ValveMachinePuzzle"; } } internal class VanishEffect : MonoBehaviour { public float MinDistance; public float MaxDistance; public float MinAlpha; public float MaxAlpha; public float ManualVanishTime; private float ManualAlpha; private bool Active = false; public bool AutoVanish; public bool InverseEffect; public float CurrentAlpha; public bool UseOnTriggerStay = false; public Transform CheckSourceTransform; public MeshRenderer MeshRenderer; public SkinnedMeshRenderer SkinnedMeshRenderer; private void Awake() { if (InverseEffect) { float minDistance = MinDistance; float maxDistance = MaxDistance; MaxDistance = minDistance; MinDistance = maxDistance; } } private void OnTriggerEnter(Collider other) { if (!UseOnTriggerStay && ((Component)other).tag == "Player") { Active = true; } } private void OnTriggerExit(Collider other) { if (((Component)other).tag == "Player") { Active = false; } } private void OnTriggerStay(Collider other) { if (UseOnTriggerStay && ((Component)other).tag == "Player") { Active = true; } } private void Update() { if (Active) { UpdateVisibility(); } } private void UpdateVisibility() { //IL_001e: 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) if (!AutoVanish) { return; } float num = Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, CheckSourceTransform.position); float num2 = (CurrentAlpha = Mathf.Clamp((num - MaxDistance) / (MinDistance - MaxDistance) + 0.05f, MinAlpha, MaxAlpha)); if ((Object)(object)MeshRenderer != (Object)null) { Material[] materials = ((Renderer)MeshRenderer).materials; foreach (Material val in materials) { val.SetFloat("_AlphaCutoff", num2); } } SkinnedMeshRenderer skinnedMeshRenderer = SkinnedMeshRenderer; if (skinnedMeshRenderer != null) { ((Renderer)skinnedMeshRenderer).material.SetFloat("_AlphaCutoff", num2); } } private IEnumerator ChangeVisibilityCoroutine(float startAlpha, float endAlpha, float duration) { float t = 0f; while (t < duration) { t += Time.deltaTime; ManualAlpha = Mathf.Lerp(startAlpha, endAlpha, t / duration); if ((Object)(object)MeshRenderer != (Object)null) { ((Renderer)MeshRenderer).material.SetFloat("_AlphaCutoff", ManualAlpha); } if ((Object)(object)SkinnedMeshRenderer != (Object)null) { ((Renderer)SkinnedMeshRenderer).material.SetFloat("_AlphaCutoff", ManualAlpha); } yield return 0; } yield return 0; } public void MakeVisible() { ((MonoBehaviour)this).StartCoroutine(ChangeVisibilityCoroutine(MinAlpha, MaxAlpha, ManualVanishTime)); } public void MakeInvisible() { ((MonoBehaviour)this).StartCoroutine(ChangeVisibilityCoroutine(MaxAlpha, MinAlpha, ManualVanishTime)); } } internal class VaultObjective : NetworkBehaviour { public ButtonSpamObjective ButtonSpamObjective; public Animator VaultAnimator; public AudioSource VaultAudio; public AudioClip VaultOpenAudio; public List Knobs; public FaultyKnob BigKnob; public MeshRenderer HintText; private void Start() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(9f); SetBigValueServerRpc(); } [ServerRpc(RequireOwnership = false)] private void SetBigValueServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(211663700u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 211663700u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int num = 0; bool clientStuffClientRpc = false; num = Knobs[0].CorrectKnobState - Knobs[1].CorrectKnobState + Knobs[2].CorrectKnobState; if (num < 0) { num += 24; clientStuffClientRpc = true; } BigKnob.SetSpecificKnobValue(num); SetClientStuffClientRpc(clientStuffClientRpc); } } [ClientRpc] private void SetClientStuffClientRpc(bool hint) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3853174680u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref hint, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3853174680u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (hint) { ((Renderer)HintText).enabled = true; } } } public void CheckDials() { CheckDetailsServerRpc(); } [ServerRpc(RequireOwnership = false)] private void CheckDetailsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1022758153u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1022758153u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; bool flag = true; foreach (FaultyKnob knob in Knobs) { if (!knob.IsCorrect) { flag = false; break; } } if (!BigKnob.IsCorrect) { flag = false; } if (flag) { SetButtonSpamCanFinishClientRpc(can: true); } } [ClientRpc] private void SetButtonSpamCanFinishClientRpc(bool can) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1364470168u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref can, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1364470168u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ButtonSpamObjective.CanFinish = can; } } } public void OpenVault() { foreach (FaultyKnob knob in Knobs) { knob.KnobTrigger.interactable = false; } BigKnob.KnobTrigger.interactable = false; ButtonSpamObjective.PressTrigger.interactable = false; VaultAnimator.SetTrigger("open"); VaultAudio.PlayOneShot(VaultOpenAudio); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(211663700u, new RpcReceiveHandler(__rpc_handler_211663700), "SetBigValueServerRpc"); ((NetworkBehaviour)this).__registerRpc(3853174680u, new RpcReceiveHandler(__rpc_handler_3853174680), "SetClientStuffClientRpc"); ((NetworkBehaviour)this).__registerRpc(1022758153u, new RpcReceiveHandler(__rpc_handler_1022758153), "CheckDetailsServerRpc"); ((NetworkBehaviour)this).__registerRpc(1364470168u, new RpcReceiveHandler(__rpc_handler_1364470168), "SetButtonSpamCanFinishClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_211663700(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; ((VaultObjective)(object)target).SetBigValueServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3853174680(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 clientStuffClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref clientStuffClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VaultObjective)(object)target).SetClientStuffClientRpc(clientStuffClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1022758153(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; ((VaultObjective)(object)target).CheckDetailsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1364470168(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 buttonSpamCanFinishClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref buttonSpamCanFinishClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VaultObjective)(object)target).SetButtonSpamCanFinishClientRpc(buttonSpamCanFinishClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "VaultObjective"; } } internal class WaterPumpDevice : NetworkBehaviour { public WaterPumpDevicesController WaterPumpDevicesController; public Animator animator; public AudioSource audioSource; public List PourWaterClip; public List DrainWaterClip; public InteractTrigger TriggerA; public InteractTrigger TriggerB; private float WaterProgress = 0f; private int WaterHeightState = 0; public int WaterHeightStateGoal = 5; public bool IsPerfectHeight = false; public void ButtonPressed(bool fill) { ButtonPressedServerRpc(fill); } [ServerRpc(RequireOwnership = false)] private void ButtonPressedServerRpc(bool fill) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(698755864u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref fill, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 698755864u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (fill) { WaterHeightState++; } else { WaterHeightState--; } WaterHeightState = Mathf.Clamp(WaterHeightState, 0, 10); IsPerfectHeight = WaterHeightStateGoal == WaterHeightState; float waterProgressTarget = 0.1f * (float)WaterHeightState; ButtonPressedClientRpc(fill, waterProgressTarget); WaterPumpDevicesController.CheckAllValues(); } } [ClientRpc] private void ButtonPressedClientRpc(bool fill, float waterProgressTarget) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2540097191u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref fill, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref waterProgressTarget, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2540097191u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (fill) { animator.SetTrigger("pressA"); int index = Random.Range(0, PourWaterClip.Count); audioSource.PlayOneShot(PourWaterClip[index]); } else { animator.SetTrigger("pressB"); int index2 = Random.Range(0, DrainWaterClip.Count); audioSource.PlayOneShot(DrainWaterClip[index2]); } ((MonoBehaviour)this).StartCoroutine(WaterLevelChangeCoroutine(waterProgressTarget)); } } private IEnumerator WaterLevelChangeCoroutine(float waterProgressTarget) { float t = 0f; float duration = 1f; float previousWaterProgress = WaterProgress; while (t < duration) { t += Time.deltaTime; float lerpTime = t / duration; WaterProgress = Mathf.Lerp(previousWaterProgress, waterProgressTarget, lerpTime); animator.SetFloat("waterAmount", WaterProgress); yield return 0; } yield return null; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(698755864u, new RpcReceiveHandler(__rpc_handler_698755864), "ButtonPressedServerRpc"); ((NetworkBehaviour)this).__registerRpc(2540097191u, new RpcReceiveHandler(__rpc_handler_2540097191), "ButtonPressedClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_698755864(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 fill = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref fill, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((WaterPumpDevice)(object)target).ButtonPressedServerRpc(fill); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2540097191(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool fill = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref fill, default(ForPrimitives)); float waterProgressTarget = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref waterProgressTarget, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((WaterPumpDevice)(object)target).ButtonPressedClientRpc(fill, waterProgressTarget); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "WaterPumpDevice"; } } internal class WaterPumpDevicesController : NetworkBehaviour { public Animator animator; public AudioSource audioSource; public AudioClip audioClip; public List WaterPumpDevices = new List(); private List WaterPumpRequiredLevels = new List(); private int Modifier = 0; public TMP_Text ModifierText; public List numeralTexts; private List ModifierMessages = new List { "We pour II less from each for our sins but we add I for the seer", "We pour II extra to each for our glory but remove I for the fallen", "We lay still", "We pour III extra to each for the warrior but II less for the poor", "We pour I extra to each for our love and remove I for the betrayal" }; private List Roman = new List { "-", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X" }; public UnityEvent VictoryEvent; public UnityEvent VictoryEventClients; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialiseObjectiveServerRpc(); } [ServerRpc] private void InitialiseObjectiveServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4173898732u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4173898732u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; int[] array = new int[WaterPumpDevices.Count]; for (int i = 0; i < WaterPumpDevices.Count; i++) { int item = (array[i] = Random.Range(1, 10)); WaterPumpRequiredLevels.Add(item); } int num = Random.Range(0, ModifierMessages.Count); switch (num) { case 0: Modifier = -1; break; case 1: Modifier = 1; break; case 2: Modifier = 0; break; case 3: Modifier = 1; break; case 4: Modifier = 0; break; } for (int j = 0; j < WaterPumpDevices.Count; j++) { int waterHeightStateGoal = WaterPumpRequiredLevels[j] + Modifier; WaterPumpDevices[j].WaterHeightStateGoal = waterHeightStateGoal; } SetObjectiveVisualsClientRpc(num, array); } } [ClientRpc] private void SetObjectiveVisualsClientRpc(int modifier, int[] numerals) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(726536412u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, modifier); bool flag = numerals != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(numerals, default(ForPrimitives)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 726536412u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ModifierText.text = ModifierMessages[modifier]; for (int i = 0; i < WaterPumpDevices.Count; i++) { numeralTexts[i].text = Roman[numerals[i]]; } } } public void CheckAllValues() { bool flag = true; foreach (WaterPumpDevice waterPumpDevice in WaterPumpDevices) { if (!waterPumpDevice.IsPerfectHeight) { flag = false; } } if (flag) { CompletePuzzle(); } } private void CompletePuzzle() { CompletePuzzleClientRpc(); VictoryEvent.Invoke(); } [ClientRpc] private void CompletePuzzleClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3399382436u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3399382436u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (WaterPumpDevice waterPumpDevice in WaterPumpDevices) { waterPumpDevice.TriggerA.interactable = false; waterPumpDevice.TriggerB.interactable = false; } animator.SetTrigger("open"); audioSource.PlayOneShot(audioClip); VictoryEventClients.Invoke(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(4173898732u, new RpcReceiveHandler(__rpc_handler_4173898732), "InitialiseObjectiveServerRpc"); ((NetworkBehaviour)this).__registerRpc(726536412u, new RpcReceiveHandler(__rpc_handler_726536412), "SetObjectiveVisualsClientRpc"); ((NetworkBehaviour)this).__registerRpc(3399382436u, new RpcReceiveHandler(__rpc_handler_3399382436), "CompletePuzzleClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4173898732(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((WaterPumpDevicesController)(object)target).InitialiseObjectiveServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_726536412(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int modifier = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref modifier); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); int[] numerals = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref numerals, default(ForPrimitives)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((WaterPumpDevicesController)(object)target).SetObjectiveVisualsClientRpc(modifier, numerals); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3399382436(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; ((WaterPumpDevicesController)(object)target).CompletePuzzleClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "WaterPumpDevicesController"; } } internal class WeatherObject : MonoBehaviour { public string WeatherName; public WeatherObjectContainer WeatherObjectContainer; } internal class WeatherObjectContainer : NetworkBehaviour { public List WeatherObjects; public string WeatherName; public void FindObjectsInScene() { WeatherObject[] array = Object.FindObjectsByType((FindObjectsSortMode)0); WeatherObject[] array2 = array; foreach (WeatherObject weatherObject in array2) { if (WeatherName == weatherObject.WeatherName) { WeatherObjects.Add(weatherObject); } } } private void Update() { } private void OnDisable() { FindObjectsInScene(); if (WeatherObjects != null && WeatherObjects.Count != 0) { DestroyObjects(); } } private void DestroyObjects() { foreach (WeatherObject weatherObject in WeatherObjects) { NetworkObject val = null; if (!((Object)(object)((Component)weatherObject).gameObject == (Object)null)) { if ((Object)(object)((Component)weatherObject).GetComponent() != (Object)null) { val = ((Component)weatherObject).GetComponent(); } if ((Object)(object)NetworkManager.Singleton != (Object)null && (Object)(object)val != (Object)null && val.IsSpawned && ((NetworkBehaviour)this).IsServer) { val.Despawn(true); } else { Object.Destroy((Object)(object)((Component)weatherObject).gameObject); } } } WeatherObjects.Clear(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "WeatherObjectContainer"; } } internal class WeedWeakener : NetworkBehaviour { public float Distance = 6f; public float AttemptCount = 50f; public float CadaverKillSpeed = 0.5f; public float ShroudKillSpeed = 0.5f; [Header("Weed stuff")] private MoldSpreadManager moldManager; private (int batchNum, int positionIndex) killingWeed; private (int batchNum, int positionIndex, int plantType) killingCadaverPlant; private CadaverGrowthAI cadaverGrowthAI; public static Matrix4x4 ResizeMatrix(Matrix4x4 yourMatrix, float shrinkSpeed, bool shrink = true) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_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_003a: 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_00c3: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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_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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) Matrix4x4 val = yourMatrix; Vector3 val2 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(3)); Vector3 val3 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(0)); Vector3 val4 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(1)); Vector3 val5 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(2)); float magnitude = ((Vector3)(ref val3)).magnitude; float magnitude2 = ((Vector3)(ref val4)).magnitude; float magnitude3 = ((Vector3)(ref val5)).magnitude; float num = ((!shrink) ? (1f + shrinkSpeed * Time.deltaTime) : (1f - shrinkSpeed * Time.deltaTime)); magnitude = Mathf.Clamp(magnitude * num, 0.001f, 10f); magnitude2 = Mathf.Clamp(magnitude2 * num, 0.001f, 10f); magnitude3 = Mathf.Clamp(magnitude3 * num, 0.001f, 10f); val3 = ((Vector3)(ref val3)).normalized * magnitude; val4 = ((Vector3)(ref val4)).normalized * magnitude2; val5 = ((Vector3)(ref val5)).normalized * magnitude3; Matrix4x4 identity = Matrix4x4.identity; ((Matrix4x4)(ref identity)).SetColumn(0, Vector4.op_Implicit(val3)); ((Matrix4x4)(ref identity)).SetColumn(1, Vector4.op_Implicit(val4)); ((Matrix4x4)(ref identity)).SetColumn(2, Vector4.op_Implicit(val5)); ((Matrix4x4)(ref identity)).SetColumn(3, Vector4.op_Implicit(val2)); return identity; } public static Vector3 ExtractScaleFromMatrix(Matrix4x4 matrix) { //IL_0001: 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_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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) Vector3 val = new Vector3(matrix.m00, matrix.m10, matrix.m20); float magnitude = ((Vector3)(ref val)).magnitude; val = new Vector3(matrix.m01, matrix.m11, matrix.m21); float magnitude2 = ((Vector3)(ref val)).magnitude; val = new Vector3(matrix.m02, matrix.m12, matrix.m22); float magnitude3 = ((Vector3)(ref val)).magnitude; return new Vector3(magnitude, magnitude2, magnitude3); } public void KillWeeds() { ((MonoBehaviour)this).StartCoroutine(DamageABunchOfPlantsInThisGeneralDirectionCoroutine()); } public IEnumerator DamageABunchOfPlantsInThisGeneralDirectionCoroutine() { int i = 0; while ((float)i < AttemptCount) { i++; AttemptSprayWeedImpulse(); yield return null; } } private void AttemptSprayWeedImpulse() { //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: 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_0228: 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_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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) DoPlantKillImpulse(); Matrix4x4 val2; if (killingCadaverPlant.batchNum != -1) { if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI == (Object)null) { killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); } Matrix4x4 val = cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex]; if (ExtractScaleFromMatrix(val).x < 3f && ((NetworkBehaviour)this).IsOwner) { val2 = cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex]; Vector3 position = ((Matrix4x4)(ref val2)).GetPosition(); KillCadaverPlantRpc(position); cadaverGrowthAI.DestroyPlantAtPosition(position, true); killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); } else { cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex] = ResizeMatrix(val, CadaverKillSpeed); } } else if (killingWeed.batchNum != -1) { Matrix4x4 val3 = moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex]; if (ExtractScaleFromMatrix(val3).x < 0.5f && ((NetworkBehaviour)this).IsOwner) { val2 = moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex]; Vector3 position2 = ((Matrix4x4)(ref val2)).GetPosition(); KillWeedRpc(position2); moldManager.DestroyMoldAtPosition(position2, true); killingWeed = (batchNum: -1, positionIndex: -1); } else { moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex] = ResizeMatrix(val3, ShroudKillSpeed); } } TrySprayingWeedKillerOnLocalPlayer(); } [Rpc(/*Could not decode attribute arguments.*/)] public void KillWeedRpc(Vector3 destroyAtPos) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(295603908u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref destroyAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 295603908u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; killingWeed = (batchNum: -1, positionIndex: -1); moldManager.DestroyMoldAtPosition(destroyAtPos, true); } } } private void TrySprayingWeedKillerOnLocalPlayer() { //IL_005b: 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) if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI != (Object)null && cadaverGrowthAI.playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId].infected && Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < Distance) { HealPlayerInfection(cadaverGrowthAI.playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId]); } } private void HealPlayerInfection(PlayerInfection infection) { //IL_0090: 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_0034: 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_0066: 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) PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (infection.burstMeter > 0f) { cadaverGrowthAI.BurstFromPlayer(GameNetworkManager.Instance.localPlayerController, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); cadaverGrowthAI.SyncBurstFromPlayerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); } else { GameNetworkManager.Instance.localPlayerController.DamagePlayer(8, true, true, (CauseOfDeath)5, 0, false, default(Vector3)); cadaverGrowthAI.HealInfection((int)localPlayerController.playerClientId, 0.1f); } } [Rpc(/*Could not decode attribute arguments.*/)] public void KillCadaverPlantRpc(Vector3 destroyAtPos) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(855472975u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref destroyAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 855472975u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -1); cadaverGrowthAI.DestroyPlantAtPosition(destroyAtPos, true); } } private void DoPlantKillImpulse() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) if (!StartOfRound.Instance.inShipPhase) { if (((Component)this).transform.position.y < 100f) { CheckForCadaverPlantsInSprayPath(); } else { CheckForWeedsInSprayPath(); } } } private bool CheckForCadaverPlantsInSprayPath() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_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_0089: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_014d: 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) if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI == (Object)null || ((EnemyAI)cadaverGrowthAI).isEnemyDead) { return false; } Vector3 position = ((Component)this).transform.position; float num = Random.Range(0f, Distance / 2f); Vector3 val = ((Component)this).transform.position + Random.onUnitSphere * num; NavMeshHit val2 = default(NavMeshHit); if (NavMesh.SamplePosition(val, ref val2, 30f, -1)) { position = ((NavMeshHit)(ref val2)).position; } if (cadaverGrowthAI.GetAllPlantPositionsInRadius(position, Distance, true)) { float num2 = 2000f; int num3 = 0; int num4 = -1; for (int i = 0; i < cadaverGrowthAI.plantBatchers.Length; i++) { int length = cadaverGrowthAI.moldPositions.GetLength(0); for (int j = 0; j < length && cadaverGrowthAI.moldPositions[j, i] != -1; j++) { if (!cadaverGrowthAI.growingRecentPlant || !(cadaverGrowthAI.plantBatchers[i].batchedPositions[cadaverGrowthAI.moldPositions[j, i]] == cadaverGrowthAI.recentPlantPosition)) { float num5 = Vector3.Distance(position, cadaverGrowthAI.plantBatchers[i].batchedPositions[cadaverGrowthAI.moldPositions[j, i]]); if (num5 < num2) { num2 = num5; num3 = j; num4 = i; } } } } if (num4 == -1) { return false; } killingCadaverPlant = cadaverGrowthAI.plantBatchers[num4].GetWeedPositionInMatrixListForCadaverPlants(cadaverGrowthAI.moldPositions[num3, num4], num4); SyncKillingCadaverPlantRpc(killingCadaverPlant.batchNum, killingCadaverPlant.positionIndex, killingCadaverPlant.plantType); return true; } return false; } private bool CheckForWeedsInSprayPath() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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) if ((Object)(object)moldManager == (Object)null) { moldManager = Object.FindObjectOfType(); } if ((Object)(object)moldManager == (Object)null) { return false; } Vector3 position = ((Component)this).transform.position; float num = Random.Range(0f, Distance / 2f); Vector3 val = ((Component)this).transform.position + Random.onUnitSphere * num; NavMeshHit val2 = default(NavMeshHit); if (NavMesh.SamplePosition(val, ref val2, 30f, -1)) { position = ((NavMeshHit)(ref val2)).position; } int allMoldPositionsInRadius = moldManager.GetAllMoldPositionsInRadius(position, Distance, true); if (allMoldPositionsInRadius > 0) { float num2 = 2000f; int num3 = 0; for (int i = 0; i < allMoldPositionsInRadius; i++) { float num4 = Vector3.Distance(position, moldManager.grassInstancer.batchedPositions[moldManager.moldPositions[i]]); if (num4 < num2) { num2 = num4; num3 = i; } } killingWeed = moldManager.grassInstancer.GetWeedPositionInMatrixList(moldManager.moldPositions[num3]); SyncKillingWeedRpc(killingWeed.batchNum, killingWeed.positionIndex); return true; } return false; } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncKillingCadaverPlantRpc(int batchNum, int positionIndex, int plantType) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3404205056u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, batchNum); BytePacker.WriteValueBitPacked(val2, positionIndex); BytePacker.WriteValueBitPacked(val2, plantType); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3404205056u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; killingCadaverPlant = (batchNum: batchNum, positionIndex: positionIndex, plantType: plantType); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncKillingWeedRpc(int batchNum, int positionIndex) { //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_0043: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_00bf: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2381392183u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, batchNum); BytePacker.WriteValueBitPacked(val2, positionIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2381392183u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; killingWeed = (batchNum: batchNum, positionIndex: positionIndex); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(295603908u, new RpcReceiveHandler(__rpc_handler_295603908), "KillWeedRpc"); ((NetworkBehaviour)this).__registerRpc(855472975u, new RpcReceiveHandler(__rpc_handler_855472975), "KillCadaverPlantRpc"); ((NetworkBehaviour)this).__registerRpc(3404205056u, new RpcReceiveHandler(__rpc_handler_3404205056), "SyncKillingCadaverPlantRpc"); ((NetworkBehaviour)this).__registerRpc(2381392183u, new RpcReceiveHandler(__rpc_handler_2381392183), "SyncKillingWeedRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_295603908(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 destroyAtPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((WeedWeakener)(object)target).KillWeedRpc(destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_855472975(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 destroyAtPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((WeedWeakener)(object)target).KillCadaverPlantRpc(destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3404205056(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int batchNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref batchNum); int positionIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref positionIndex); int plantType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref plantType); target.__rpc_exec_stage = (__RpcExecStage)1; ((WeedWeakener)(object)target).SyncKillingCadaverPlantRpc(batchNum, positionIndex, plantType); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2381392183(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int batchNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref batchNum); int positionIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref positionIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((WeedWeakener)(object)target).SyncKillingWeedRpc(batchNum, positionIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "WeedWeakener"; } } internal class WeirdPuzzleSwitchBoard : NetworkBehaviour { [Header("Main puzzle")] public List buttons; public List middleButtons; public List availableButtons; public AudioSource BoardAudioSource; public AudioSource SecondaryAudioSource; public AudioClip SecondaryAudioClip; public AudioClip BoardCompleteAudioClip; public Animator Animator; public ParticleSystem ParticleSystem; public UnityEvent CompleteEvent; public bool Completed = false; public bool EnabledOnStart = true; public bool Started = false; [Header("Event stuff")] public ParticleSystem SprayParticles; public AudioSource SprayAudio; public AudioClip SprayAudioClip; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePuzzle(); } private void InitialisePuzzle() { InitialisePuzzleServerRpc(); } [ServerRpc] private void InitialisePuzzleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(138862527u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 138862527u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; List list = new List(); foreach (WeirdPuzzleSwitchButton middleButton in middleButtons) { bool flag = false; while (!flag) { int num = Random.Range(0, availableButtons.Count); if (!list.Contains(num) && (Object)(object)availableButtons[num].OtherWeirdButton.ExtraButton == (Object)null) { list.Add(num); availableButtons[num].ExtraButton = middleButton; middleButton.OtherWeirdButton = availableButtons[num]; flag = true; } } } if (EnabledOnStart) { Started = true; } DisablePanelOnStartClientRpc(); } [ClientRpc] private void DisablePanelOnStartClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(75551544u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 75551544u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (WeirdPuzzleSwitchButton button in buttons) { if (!EnabledOnStart) { button.InteractTrigger.interactable = false; } } } public void CheckPuzzleDelay() { ((MonoBehaviour)this).StartCoroutine(CheckDelay()); } private IEnumerator CheckDelay() { yield return (object)new WaitForSeconds(0.1f); CheckCombination(); } private void CheckCombination() { bool flag = true; Started = true; foreach (WeirdPuzzleSwitchButton button in buttons) { if (!button.Pressed) { flag = false; } } if (flag) { CompletePuzzle(); } } private void CompletePuzzle() { if (!Completed) { Completed = true; CompleteEvent.Invoke(); CompletedPuzzleClientRpc(); } } [ClientRpc] private void CompletedPuzzleClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4230218006u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4230218006u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; AudioSource boardAudioSource = BoardAudioSource; if (boardAudioSource != null) { boardAudioSource.PlayOneShot(BoardCompleteAudioClip); } AudioSource secondaryAudioSource = SecondaryAudioSource; if (secondaryAudioSource != null) { secondaryAudioSource.PlayOneShot(SecondaryAudioClip); } Animator animator = Animator; if (animator != null) { animator.SetTrigger("play"); } ParticleSystem particleSystem = ParticleSystem; if (particleSystem != null) { particleSystem.Play(); } AudioSource sprayAudio = SprayAudio; if (sprayAudio != null) { sprayAudio.Play(); } AudioSource boardAudioSource2 = BoardAudioSource; if (boardAudioSource2 != null) { boardAudioSource2.PlayOneShot(SprayAudioClip); } ParticleSystem sprayParticles = SprayParticles; if (sprayParticles != null) { sprayParticles.Play(); } foreach (WeirdPuzzleSwitchButton button in buttons) { button.InteractTrigger.interactable = false; if (((NetworkBehaviour)this).IsServer) { button.Pressed = true; } button.ButtonAnimator.SetBool("enabled", true); } } public void SetPuzzleState(bool completed, bool sprayEnabled) { Completed = completed; Started = true; foreach (WeirdPuzzleSwitchButton button in buttons) { button.Pressed = completed; } SetPuzzleStateClientRpc(completed, sprayEnabled); } [ClientRpc] private void SetPuzzleStateClientRpc(bool completed, bool sprayEnabled) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1442867344u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref completed, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sprayEnabled, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1442867344u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (WeirdPuzzleSwitchButton button in buttons) { button.ButtonAnimator.SetBool("enabled", completed); if (completed) { button.InteractTrigger.interactable = false; } else { button.InteractTrigger.interactable = true; } } if (completed && sprayEnabled) { AudioSource sprayAudio = SprayAudio; if (sprayAudio != null) { sprayAudio.Play(); } AudioSource boardAudioSource = BoardAudioSource; if (boardAudioSource != null) { boardAudioSource.PlayOneShot(SprayAudioClip); } ParticleSystem sprayParticles = SprayParticles; if (sprayParticles != null) { sprayParticles.Play(); } } else { AudioSource sprayAudio2 = SprayAudio; if (sprayAudio2 != null) { sprayAudio2.Stop(); } ParticleSystem sprayParticles2 = SprayParticles; if (sprayParticles2 != null) { sprayParticles2.Stop(); } } } public void AltCompletePuzzle() { CompletePuzzle(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(138862527u, new RpcReceiveHandler(__rpc_handler_138862527), "InitialisePuzzleServerRpc"); ((NetworkBehaviour)this).__registerRpc(75551544u, new RpcReceiveHandler(__rpc_handler_75551544), "DisablePanelOnStartClientRpc"); ((NetworkBehaviour)this).__registerRpc(4230218006u, new RpcReceiveHandler(__rpc_handler_4230218006), "CompletedPuzzleClientRpc"); ((NetworkBehaviour)this).__registerRpc(1442867344u, new RpcReceiveHandler(__rpc_handler_1442867344), "SetPuzzleStateClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_138862527(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((WeirdPuzzleSwitchBoard)(object)target).InitialisePuzzleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_75551544(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; ((WeirdPuzzleSwitchBoard)(object)target).DisablePanelOnStartClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4230218006(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; ((WeirdPuzzleSwitchBoard)(object)target).CompletedPuzzleClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1442867344(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool completed = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref completed, default(ForPrimitives)); bool sprayEnabled = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref sprayEnabled, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((WeirdPuzzleSwitchBoard)(object)target).SetPuzzleStateClientRpc(completed, sprayEnabled); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "WeirdPuzzleSwitchBoard"; } } internal class WeirdPuzzleSwitchButton : NetworkBehaviour { public WeirdPuzzleSwitchBoard Controller; public WeirdPuzzleSwitchButton OtherWeirdButton; public WeirdPuzzleSwitchButton ExtraButton; public bool Pressed = false; public Animator ButtonAnimator; public AudioSource AudioSource; public AudioClip Press; public AudioClip Unpress; public InteractTrigger InteractTrigger; public void FlipButton(bool playerSwitch) { FlipButtonServerRpc(playerSwitch); } [ServerRpc(RequireOwnership = false)] private void FlipButtonServerRpc(bool playerSwitch) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1922313894u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref playerSwitch, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1922313894u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (Pressed) { Pressed = false; } else { Pressed = true; } FlipButtonVisualsClientRpc(Pressed, playerSwitch); if (playerSwitch) { OtherWeirdButton?.FlipButton(playerSwitch: false); ExtraButton?.FlipButton(playerSwitch: false); } Controller.CheckPuzzleDelay(); } } [ClientRpc] private void FlipButtonVisualsClientRpc(bool pressed, bool byPlayer) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(149401721u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pressed, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref byPlayer, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 149401721u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; ButtonAnimator.SetBool("enabled", pressed); if (byPlayer) { if (pressed) { AudioSource.PlayOneShot(Press); } else { AudioSource.PlayOneShot(Unpress); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1922313894u, new RpcReceiveHandler(__rpc_handler_1922313894), "FlipButtonServerRpc"); ((NetworkBehaviour)this).__registerRpc(149401721u, new RpcReceiveHandler(__rpc_handler_149401721), "FlipButtonVisualsClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1922313894(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 playerSwitch = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerSwitch, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((WeirdPuzzleSwitchButton)(object)target).FlipButtonServerRpc(playerSwitch); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_149401721(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool pressed = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pressed, default(ForPrimitives)); bool byPlayer = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref byPlayer, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((WeirdPuzzleSwitchButton)(object)target).FlipButtonVisualsClientRpc(pressed, byPlayer); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "WeirdPuzzleSwitchButton"; } } internal class WireHazard : MonoBehaviour { public int WireHazardId; public Renderer WireRenderer; public TMP_Text Label; public UnityEvent DisableEvent; public void DisableWireHazard() { DisableEvent.Invoke(); } } internal class WirePuzzleController : NetworkBehaviour { public List Wires; public List Hazards; public List WireMaterials; public List Labels = new List { "No", "A1000", "A1235", "A1425", "A1735", "A15B2", "A12B2", "A12B5", "A15B3", "A1304", "A2000", "A2250", "A2520", "A2650", "A2470", "A2830", "A25B2", "A23B5", "A22B3", "A22B0", "A26B1", "B1000", "B1235", "B1425", "B1735", "B15B3", "B12B2", "B12B5", "B15B2", "B1304", "B2000", "B2250", "B2520", "B2650", "B2470", "B2830", "B25B2", "B23B5", "B22B3", "B22B0", "B26B1" }; private int[] WireMaterialIds; private int[] WireLabelIds; private int[] WireHazardIds; private void Awake() { ((MonoBehaviour)this).StartCoroutine(DelayCoroutine()); WireMaterialIds = new int[Wires.Count]; WireLabelIds = new int[Wires.Count]; WireHazardIds = new int[Hazards.Count]; } private IEnumerator DelayCoroutine() { yield return (object)new WaitForSeconds(5f); InitialisePuzzle(); } private void InitialisePuzzle() { InitialisePuzzleServerRpc(); } [ServerRpc] private void InitialisePuzzleServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1430273266u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1430273266u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; for (int i = 0; i < Wires.Count; i++) { int num = Random.Range(0, WireMaterials.Count); WireMaterialIds[i] = num; bool flag = false; int num2 = 0; while (!flag) { num2 = Random.Range(0, Labels.Count); if (!WireLabelIds.Contains(num2)) { flag = true; } } WireLabelIds[i] = num2; } for (int j = 0; j < Hazards.Count; j++) { bool flag2 = false; int num3 = 0; while (!flag2) { num3 = Random.Range(0, Wires.Count); if (!WireHazardIds.Contains(num3)) { flag2 = true; } } WireHazardIds[j] = num3; Hazards[j].WireHazardId = j; } InitialisePuzzleClientRpc(WireMaterialIds, WireLabelIds, WireHazardIds); } [ClientRpc] private void InitialisePuzzleClientRpc(int[] MaterialIds, int[] LabelIds, int[] HazardIds) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (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_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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_0148: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(598288676u, val2, (RpcDelivery)0); bool flag = MaterialIds != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(MaterialIds, default(ForPrimitives)); } bool flag2 = LabelIds != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val)).WriteValueSafe(LabelIds, default(ForPrimitives)); } bool flag3 = HazardIds != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag3, default(ForPrimitives)); if (flag3) { ((FastBufferWriter)(ref val)).WriteValueSafe(HazardIds, default(ForPrimitives)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 598288676u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; for (int i = 0; i < Wires.Count; i++) { Wires[i].WireRenderer.material = WireMaterials[MaterialIds[i]]; Wires[i].CutWireRenderer.material = WireMaterials[MaterialIds[i]]; Wires[i].Label.text = Labels[LabelIds[i]]; if (HazardIds.Contains(i)) { Wires[i].HasWire = true; } } for (int j = 0; j < Hazards.Count; j++) { Hazards[j].WireRenderer.material = WireMaterials[MaterialIds[HazardIds[j]]]; Hazards[j].Label.text = Labels[LabelIds[HazardIds[j]]]; Hazards[j].WireHazardId = j; Wires[HazardIds[j]].WireHazardId = j; } } [ClientRpc] public void CutWireDisableHazardClientRpc(int HazardId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1181670478u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, HazardId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1181670478u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Hazards[HazardId].DisableWireHazard(); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1430273266u, new RpcReceiveHandler(__rpc_handler_1430273266), "InitialisePuzzleServerRpc"); ((NetworkBehaviour)this).__registerRpc(598288676u, new RpcReceiveHandler(__rpc_handler_598288676), "InitialisePuzzleClientRpc"); ((NetworkBehaviour)this).__registerRpc(1181670478u, new RpcReceiveHandler(__rpc_handler_1181670478), "CutWireDisableHazardClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1430273266(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((WirePuzzleController)(object)target).InitialisePuzzleServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_598288676(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_0074: 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_0058: 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_00b9: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); int[] materialIds = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref materialIds, default(ForPrimitives)); } bool flag2 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag2, default(ForPrimitives)); int[] labelIds = null; if (flag2) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref labelIds, default(ForPrimitives)); } bool flag3 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag3, default(ForPrimitives)); int[] hazardIds = null; if (flag3) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref hazardIds, default(ForPrimitives)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((WirePuzzleController)(object)target).InitialisePuzzleClientRpc(materialIds, labelIds, hazardIds); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1181670478(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 hazardId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hazardId); target.__rpc_exec_stage = (__RpcExecStage)1; ((WirePuzzleController)(object)target).CutWireDisableHazardClientRpc(hazardId); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "WirePuzzleController"; } } } namespace WesleysInteriorTools.Enums { public class ObjectiveDifficultyEnums { public enum ObjectiveDifficulty { easy, normal, hard, VeryEasy } } public class TriangulateEnums { public enum TriangulateMoon { Vindict, Centus, Chasm, FacilityC, Dreck, Motra, Selector, Spine, Dune, Xenphir, Heap } } } namespace WesleysInteriorTools.EnemyAiChanges { internal class Arachnohead : EnemyAI { private float[] legDistances = new float[12] { 2.2f, 2.2f, 1.8f, 1.8f, 1.3f, 1.3f, 1.5f, 1.5f, 1f, 1f, 0.6f, 0.6f }; public Vector3[] legPositions; public Transform[] legDefaultPositions; public Transform[] legTargets; public Transform abdomen; public Transform mouthTarget; public bool burrowing; public Transform turnCompass; public Vector3 wallPosition; public Vector3 wallNormal; public Vector3 floorPosition; private bool onWall; private RaycastHit rayHit; private Ray ray; public bool lookingForWallPosition; private bool gotWallPositionInLOS; private float tryWallPositionInterval; private bool reachedWallPosition; public Transform meshContainer; public Vector3 meshContainerPosition; public Vector3 meshContainerTarget; private Quaternion meshContainerTargetRotation; public float spiderSpeed; public float calculatePathToAgentInterval; public bool navigateMeshTowardsPosition; public Vector3 navigateToPositionTarget; public NavMeshHit navHit; public List webTraps = new List(); public GameObject webTrapPrefab; public int maxWebTrapsToPlace; private float timeSincePlacingWebTrap; public Vector3 meshContainerServerPosition; public Vector3 meshContainerServerRotation; private Vector3 refVel; public Transform homeNode; public AISearchRoutine patrolHomeBase; private bool setDestinationToHomeBase; private float chaseTimer; private bool overrideSpiderLookRotation; private bool watchFromDistance; public float overrideAnimation; private float overrideAnimationWeight; private float timeSinceHittingPlayer; private DeadBodyInfo currentlyHeldBody; public Mesh playerBodyWebMesh; public Material playerBodyWebMat; private bool spooledPlayerBody; private bool spoolingPlayerBody; private Coroutine turnBodyIntoWebCoroutine; private bool decidedChanceToHangBodyEarly; public GameObject hangBodyPhysicsPrefab; private Coroutine grabBodyCoroutine; private float waitOnWallTimer; public AudioClip[] footstepSFX; public AudioSource footstepAudio; public AudioClip hitWebSFX; public AudioClip attackSFX; public AudioClip spoolPlayerSFX; public AudioClip hangPlayerSFX; public AudioClip breakWebSFX; public AudioClip hitSpiderSFX; private float lookAtPlayerInterval; public Rigidbody meshContainerRigidbody; private RaycastHit rayHitB; public MeshRenderer spiderSafeModeMesh; public SkinnedMeshRenderer spiderNormalMesh; private bool spiderSafeEnabled; private int velocityAverageCount; private int velocityMovingAverageLength = 10; private Vector3 averageVelocity; public override void Start() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); meshContainerPosition = ((Component)this).transform.position; meshContainerTarget = ((Component)this).transform.position; navHit = default(NavMeshHit); rayHitB = default(RaycastHit); patrolHomeBase.searchWidth = 17f; patrolHomeBase.searchPrecision = 3f; maxWebTrapsToPlace = Random.Range(6, 9); homeNode = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, 2); meshContainerTargetRotation = Quaternion.identity; } public override void DoAIInterval() { //IL_00a4: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead) { return; } if (lookingForWallPosition && !gotWallPositionInLOS) { gotWallPositionInLOS = GetWallPositionForSpiderMesh(); } if (navigateMeshTowardsPosition) { CalculateSpiderPathToPosition(); } switch (base.currentBehaviourStateIndex) { case 0: setDestinationToHomeBase = false; lookingForWallPosition = false; reachedWallPosition = false; if (!patrolHomeBase.inProgress) { ((EnemyAI)this).StartSearch(homeNode.position, patrolHomeBase); } break; case 1: base.movingTowardsTargetPlayer = false; if (!lookingForWallPosition) { if (Vector3.Distance(((Component)this).transform.position, homeNode.position) > 7f) { patrolHomeBase.searchWidth = 6f; if (!patrolHomeBase.inProgress) { if (((EnemyAI)this).PathIsIntersectedByLineOfSight(homeNode.position, false, false, false)) { homeNode = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, 2); } ((EnemyAI)this).StartSearch(homeNode.position, patrolHomeBase); } break; } if ((Object)(object)currentlyHeldBody != (Object)null && !spooledPlayerBody) { if (turnBodyIntoWebCoroutine == null) { turnBodyIntoWebCoroutine = ((MonoBehaviour)this).StartCoroutine(turnBodyIntoWeb()); SpiderTurnBodyIntoWebServerRpc(); } break; } if ((Object)(object)currentlyHeldBody != (Object)null && !decidedChanceToHangBodyEarly) { if (Random.Range(0, 100) < 150) { HangBodyFromCeiling(); SpiderHangBodyServerRpc(); } decidedChanceToHangBodyEarly = true; } if (patrolHomeBase.inProgress) { ((EnemyAI)this).StopSearch(patrolHomeBase, true); } lookingForWallPosition = true; reachedWallPosition = false; break; } if (reachedWallPosition) { if ((Object)(object)currentlyHeldBody != (Object)null) { HangBodyFromCeiling(); SpiderHangBodyServerRpc(); } for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true) && !Physics.Linecast(meshContainer.position, ((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, StartOfRound.Instance.collidersAndRoomMask)) { float num = Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, meshContainer.position); if (num < 5f) { TriggerChaseWithPlayer(StartOfRound.Instance.allPlayerScripts[i]); break; } if (num < 10f) { Vector3 position = ((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position; float num2 = Vector3.Dot(position - meshContainer.position, wallNormal); Vector3 val = position - num2 * wallNormal; meshContainerTargetRotation = Quaternion.LookRotation(val, wallNormal); overrideSpiderLookRotation = true; break; } } } } overrideSpiderLookRotation = false; break; case 2: if (patrolHomeBase.inProgress) { ((EnemyAI)this).StopSearch(patrolHomeBase, true); } if (watchFromDistance && !((EnemyAI)this).TargetClosestPlayer(2f, true, 80f, false, false, true)) { StopChasing(); } if (!((Object)(object)base.targetPlayer == (Object)null)) { if (base.targetPlayer.isPlayerDead && (Object)(object)base.targetPlayer.deadBody != (Object)null && (!((EnemyAI)this).SetDestinationToPosition(((Component)base.targetPlayer.deadBody.bodyParts[6]).transform.position, true) || (Object)(object)base.targetPlayer.deadBody.attachedTo != (Object)null)) { base.targetPlayer = null; StopChasing(moveTowardsDeadPlayerBody: true); } if (watchFromDistance) { ((EnemyAI)this).SetDestinationToPosition(((Component)((EnemyAI)this).ChooseClosestNodeToPosition(((Component)base.targetPlayer).transform.position, false, 4)).transform.position, false); } } break; } } private IEnumerator turnBodyIntoWeb() { if (!((Object)(object)currentlyHeldBody == (Object)null)) { spoolingPlayerBody = true; overrideAnimation = 4.05f; base.creatureAnimator.SetTrigger("spool"); base.creatureSFX.PlayOneShot(spoolPlayerSFX); yield return (object)new WaitForSeconds(0.9f); if ((Object)(object)currentlyHeldBody.attachedTo != (Object)(object)mouthTarget) { CancelSpoolingBody(); } currentlyHeldBody.ChangeMesh(playerBodyWebMesh, playerBodyWebMat); yield return (object)new WaitForSeconds(3.105f); spooledPlayerBody = true; spoolingPlayerBody = false; turnBodyIntoWebCoroutine = null; if ((Object)(object)currentlyHeldBody.attachedTo != (Object)(object)mouthTarget) { CancelSpoolingBody(); } } } private void CancelSpoolingBody() { if (turnBodyIntoWebCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(turnBodyIntoWebCoroutine); } if ((Object)(object)currentlyHeldBody != (Object)null) { currentlyHeldBody.attachedLimb = null; currentlyHeldBody.attachedTo = null; currentlyHeldBody = null; } spooledPlayerBody = false; spoolingPlayerBody = false; } [ServerRpc] public void SpiderTurnBodyIntoWebServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1106340303u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1106340303u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SpiderTurnBodyIntoWebClientRpc(); } } [ClientRpc] public void SpiderTurnBodyIntoWebClientRpc() { //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(2770970023u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2770970023u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner && !base.isEnemyDead && turnBodyIntoWebCoroutine == null) { turnBodyIntoWebCoroutine = ((MonoBehaviour)this).StartCoroutine(turnBodyIntoWeb()); } } } [ServerRpc] public void SpiderHangBodyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2361264410u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2361264410u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SpiderHangBodyClientRpc(); } } [ClientRpc] public void SpiderHangBodyClientRpc() { //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(2443860998u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2443860998u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { HangBodyFromCeiling(); } } } private void HangBodyFromCeiling() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)currentlyHeldBody == (Object)null)) { Vector3 val = abdomen.position + Vector3.up * 6f; if (Physics.Raycast(abdomen.position, Vector3.up, ref rayHit, 25f, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { val = ((RaycastHit)(ref rayHit)).point; } SetLineRendererPoints component = Object.Instantiate(hangBodyPhysicsPrefab, val, Quaternion.identity, RoundManager.Instance.mapPropsContainer.transform).GetComponent(); component.target.position = ((Component)currentlyHeldBody.bodyParts[6]).transform.position; currentlyHeldBody.attachedTo = component.target; decidedChanceToHangBodyEarly = false; currentlyHeldBody.bodyAudio.volume = 0.8f; currentlyHeldBody.bodyAudio.PlayOneShot(hangPlayerSFX); currentlyHeldBody = null; } } [ServerRpc] public void GrabBodyServerRpc(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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3794622256u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3794622256u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; GrabBodyClientRpc(playerId); } } [ClientRpc] public void GrabBodyClientRpc(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(4075944374u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4075944374u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { if (grabBodyCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(grabBodyCoroutine); } grabBodyCoroutine = ((MonoBehaviour)this).StartCoroutine(WaitForBodyToGrab(playerId)); } } private void GrabBody(DeadBodyInfo body) { currentlyHeldBody = body; currentlyHeldBody.attachedLimb = currentlyHeldBody.bodyParts[6]; currentlyHeldBody.attachedTo = mouthTarget; currentlyHeldBody.matchPositionExactly = true; } private IEnumerator WaitForBodyToGrab(int playerId) { float timeAtStartOfWait = Time.timeSinceLevelLoad; yield return (object)new WaitUntil((Func)(() => (Object)(object)StartOfRound.Instance.allPlayerScripts[playerId].deadBody != (Object)null || Time.timeSinceLevelLoad - timeAtStartOfWait > 10f)); DeadBodyInfo deadBody = StartOfRound.Instance.allPlayerScripts[playerId].deadBody; GrabBody(deadBody); } private void CalculateSpiderPathToPosition() { //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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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) if (NavMesh.CalculatePath(meshContainer.position, navigateToPositionTarget, base.agent.areaMask, base.path1)) { if (base.path1.corners.Length > 1) { meshContainerTarget = base.path1.corners[1]; if (!overrideSpiderLookRotation) { SetSpiderLookAtPosition(base.path1.corners[1]); } } else { meshContainerTarget = navigateToPositionTarget; if (!overrideSpiderLookRotation) { SetSpiderLookAtPosition(navigateToPositionTarget); } } } else { meshContainer.position = RoundManager.Instance.GetNavMeshPosition(meshContainer.position, navHit, 5f, base.agent.areaMask); meshContainerTarget = meshContainer.position; } } public override void Update() { //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_0697: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06be: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (spiderSafeEnabled != IngamePlayerSettings.Instance.unsavedSettings.spiderSafeMode) { spiderSafeEnabled = IngamePlayerSettings.Instance.unsavedSettings.spiderSafeMode; ((Renderer)spiderSafeModeMesh).enabled = spiderSafeEnabled; ((Renderer)spiderNormalMesh).enabled = !spiderSafeEnabled; } timeSinceHittingPlayer += Time.deltaTime; if (base.isEnemyDead) { base.agent.speed = 0f; spiderSpeed = 0f; base.creatureAnimator.SetBool("moving", false); return; } base.creatureAnimator.SetBool("moving", ((Vector3)(ref averageVelocity)).magnitude > 0.001f); if (((NetworkBehaviour)this).IsOwner) { SyncMeshContainerPositionToClients(); } CalculateMeshMovement(); if (!((NetworkBehaviour)this).IsOwner) { return; } switch (base.currentBehaviourStateIndex) { case 0: { setDestinationToHomeBase = false; lookingForWallPosition = false; base.movingTowardsTargetPlayer = false; overrideSpiderLookRotation = false; waitOnWallTimer = 11f; if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; spiderSpeed = 0f; } else { base.agent.speed = 4.25f; spiderSpeed = 4.25f; } PlayerControllerB closestPlayer = ((EnemyAI)this).GetClosestPlayer(true, false, false); if ((Object)(object)closestPlayer != (Object)null && ((EnemyAI)this).CheckLineOfSightForPosition(((Component)closestPlayer.gameplayCamera).transform.position, 80f, 15, 2f, (Transform)null)) { base.targetPlayer = closestPlayer; ((EnemyAI)this).SwitchToBehaviourState(2); chaseTimer = 12.5f; watchFromDistance = base.mostOptimalDistance > 8f; } if (timeSincePlacingWebTrap > 4f) { if (AttemptPlaceWebTrap()) { timeSincePlacingWebTrap = Random.Range(0.5f, 1f); } else { timeSincePlacingWebTrap = 0.17f; } if (webTraps.Count > maxWebTrapsToPlace) { ((EnemyAI)this).SwitchToBehaviourState(1); } } else { timeSincePlacingWebTrap += Time.deltaTime; } break; } case 1: if (spoolingPlayerBody || base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; spiderSpeed = 0f; } else { base.agent.speed = 4.5f; spiderSpeed = 3.75f; } if (webTraps.Count < maxWebTrapsToPlace && (Object)(object)currentlyHeldBody == (Object)null) { waitOnWallTimer -= Time.deltaTime; } if (waitOnWallTimer <= 0f) { ((EnemyAI)this).SwitchToBehaviourState(0); } break; case 2: setDestinationToHomeBase = false; reachedWallPosition = false; lookingForWallPosition = false; waitOnWallTimer = 11f; if (spoolingPlayerBody) { CancelSpoolingBody(); } if ((Object)(object)base.targetPlayer == (Object)null) { StopChasing(); break; } if (onWall) { base.movingTowardsTargetPlayer = true; base.agent.speed = 4.25f; spiderSpeed = 4.25f; break; } if (watchFromDistance) { if (lookAtPlayerInterval <= 0f) { lookAtPlayerInterval = 3f; base.movingTowardsTargetPlayer = false; overrideSpiderLookRotation = true; Vector3 position = ((Component)base.targetPlayer).transform.position; position.y = meshContainer.position.y; SetSpiderLookAtPosition(position); } else { lookAtPlayerInterval -= Time.deltaTime; } base.agent.speed = 0f; spiderSpeed = 0f; if (Physics.Linecast(meshContainer.position, ((Component)base.targetPlayer.gameplayCamera).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { StopChasing(); } else if (Vector3.Distance(((Component)base.targetPlayer.gameplayCamera).transform.position, ((Component)this).transform.position) < 5f || base.stunNormalizedTimer > 0f) { watchFromDistance = false; } break; } switch (base.enemyHP) { default: base.agent.speed = 4.4f; spiderSpeed = 4.4f; break; case 2: base.agent.speed = 4.58f; spiderSpeed = 4.58f; break; case 1: base.agent.speed = 5.04f; spiderSpeed = 5.04f; break; } base.movingTowardsTargetPlayer = true; overrideSpiderLookRotation = false; if (timeSinceHittingPlayer < 0.5f) { base.agent.speed = 0.7f; spiderSpeed = 0.4f; } if (base.targetPlayer.isPlayerDead && (Object)(object)base.targetPlayer.deadBody != (Object)null) { if (Vector3.Distance(((Component)base.targetPlayer.deadBody.bodyParts[6]).transform.position, meshContainer.position) < 3.7f) { spooledPlayerBody = false; GrabBody(base.targetPlayer.deadBody); GrabBodyServerRpc((int)base.targetPlayer.playerClientId); ((EnemyAI)this).SwitchToBehaviourState(1); } else { base.targetPlayer = null; StopChasing(); } } else if (!((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false, true) || (Vector3.Distance(((Component)base.targetPlayer).transform.position, homeNode.position) > 12f && Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position) > 5f)) { chaseTimer -= Time.deltaTime; if (chaseTimer <= 0f) { base.targetPlayer = null; StopChasing(); } } break; } if (base.stunNormalizedTimer > 0f) { spiderSpeed = 0f; base.agent.speed = 0f; } } private void StopChasing(bool moveTowardsDeadPlayerBody = false) { overrideSpiderLookRotation = false; base.movingTowardsTargetPlayer = false; lookingForWallPosition = false; if (webTraps.Count > maxWebTrapsToPlace || moveTowardsDeadPlayerBody) { ((EnemyAI)this).SwitchToBehaviourState(1); } else { ((EnemyAI)this).SwitchToBehaviourState(0); } } private void CalculateMeshMovement() { //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_007c: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: 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_0154: 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_016c: 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) if (lookingForWallPosition && gotWallPositionInLOS) { if (!onWall) { base.agent.obstacleAvoidanceType = (ObstacleAvoidanceType)4; navigateMeshTowardsPosition = true; navigateToPositionTarget = floorPosition; if (!overrideSpiderLookRotation) { turnCompass.position = meshContainer.position; turnCompass.LookAt(floorPosition, Vector3.up); meshContainerTargetRotation = turnCompass.rotation; } if (Vector3.Distance(((Component)meshContainer).transform.position, floorPosition) < 0.7f) { onWall = true; } } else { base.agent.obstacleAvoidanceType = (ObstacleAvoidanceType)0; navigateMeshTowardsPosition = false; meshContainerTarget = wallPosition; if (!reachedWallPosition && Vector3.Distance(meshContainer.position, wallPosition) < 0.1f) { reachedWallPosition = true; } if (!overrideSpiderLookRotation) { turnCompass.position = meshContainer.position; turnCompass.LookAt(wallPosition, wallNormal); meshContainerTargetRotation = turnCompass.rotation; } } return; } if (!lookingForWallPosition) { gotWallPositionInLOS = false; reachedWallPosition = false; } if (!onWall) { base.agent.obstacleAvoidanceType = (ObstacleAvoidanceType)4; if (!navigateMeshTowardsPosition) { CalculateSpiderPathToPosition(); navigateMeshTowardsPosition = true; } navigateToPositionTarget = ((Component)this).transform.position + Vector3.Normalize(base.agent.desiredVelocity) * 2f; return; } base.agent.obstacleAvoidanceType = (ObstacleAvoidanceType)0; navigateMeshTowardsPosition = false; meshContainerTarget = floorPosition; if (!overrideSpiderLookRotation) { turnCompass.position = meshContainer.position; turnCompass.LookAt(floorPosition, wallNormal); meshContainerTargetRotation = turnCompass.rotation; } if (Vector3.Distance(((Component)meshContainer).transform.position, floorPosition) < 1.1f) { onWall = false; } } private void SetSpiderLookAtPosition(Vector3 lookAt) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) turnCompass.position = meshContainer.position; turnCompass.LookAt(lookAt, Vector3.up); meshContainerTargetRotation = turnCompass.rotation; } private bool GetWallPositionForSpiderMesh() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) float num = 6f; if (Physics.Raycast(((Component)this).transform.position, Vector3.up, ref rayHit, 22f, StartOfRound.Instance.collidersAndRoomMask, (QueryTriggerInteraction)1)) { num = ((!((Object)(object)currentlyHeldBody != (Object)null)) ? (((RaycastHit)(ref rayHit)).distance - 1.3f) : (((RaycastHit)(ref rayHit)).distance - 2f)); } float num2 = RoundManager.Instance.YRotationThatFacesTheNearestFromPosition(((Component)this).transform.position + Vector3.up * num, 10f, 6); if (num2 != -777f) { turnCompass.eulerAngles = new Vector3(0f, num2, 0f); ray = new Ray(((Component)this).transform.position + Vector3.up * num, turnCompass.forward); if (Physics.Raycast(ray, ref rayHit, 10.1f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { wallPosition = ((Ray)(ref ray)).GetPoint(((RaycastHit)(ref rayHit)).distance - 0.2f); wallNormal = ((RaycastHit)(ref rayHit)).normal; if (Physics.Raycast(wallPosition, Vector3.down, ref rayHitB, 7f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { floorPosition = ((RaycastHit)(ref rayHitB)).point; return true; } } } return false; } public void LateUpdate() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: 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_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) if (base.isEnemyDead) { meshContainer.eulerAngles = new Vector3(0f, meshContainer.eulerAngles.y, 0f); base.creatureAnimator.SetLayerWeight(base.creatureAnimator.GetLayerIndex("MoveLegs"), 0f); } if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } if (((NetworkBehaviour)this).IsOwner) { Vector3 val = meshContainerPosition; meshContainerPosition = Vector3.MoveTowards(meshContainerPosition, meshContainerTarget, spiderSpeed * Time.deltaTime); refVel = val - meshContainerPosition; velocityAverageCount++; if (velocityAverageCount > velocityMovingAverageLength) { averageVelocity += (refVel - averageVelocity) / (float)(velocityMovingAverageLength + 1); } else { averageVelocity += refVel; if (velocityAverageCount == velocityMovingAverageLength) { averageVelocity /= (float)velocityAverageCount; } } meshContainer.position = meshContainerPosition; meshContainer.rotation = Quaternion.Lerp(meshContainer.rotation, meshContainerTargetRotation, 8f * Time.deltaTime); } else { meshContainer.position = Vector3.SmoothDamp(meshContainerPosition, meshContainerServerPosition, ref refVel, 4f * Time.deltaTime); meshContainerPosition = meshContainer.position; meshContainer.rotation = Quaternion.Lerp(meshContainer.rotation, Quaternion.Euler(meshContainerServerRotation), 9f * Time.deltaTime); } if (overrideAnimation <= 0f && base.stunNormalizedTimer <= 0f) { if (overrideAnimationWeight > 0.05f) { overrideAnimationWeight = Mathf.Lerp(overrideAnimationWeight, 0f, 20f * Time.deltaTime); } else { overrideAnimationWeight = 0f; } MoveLegsProcedurally(); } else { overrideAnimation -= Time.deltaTime; overrideAnimationWeight = Mathf.Lerp(overrideAnimationWeight, 1f, 20f * Time.deltaTime); } base.creatureAnimator.SetBool("stunned", base.stunNormalizedTimer > 0f); base.creatureAnimator.SetLayerWeight(base.creatureAnimator.GetLayerIndex("MoveLegs"), overrideAnimationWeight); } public void MoveLegsProcedurally() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < legTargets.Length; i++) { legTargets[i].position = Vector3.Lerp(legTargets[i].position, legPositions[i], 35f * Time.deltaTime); } bool flag = false; for (int j = 0; j < legPositions.Length; j++) { Vector3 val = legPositions[j] - legDefaultPositions[j].position; if (((Vector3)(ref val)).sqrMagnitude > legDistances[j] * 1.4f) { legPositions[j] = legDefaultPositions[j].position; flag = true; } } if (flag) { footstepAudio.pitch = Random.Range(0.6f, 1.2f); footstepAudio.PlayOneShot(footstepSFX[Random.Range(0, footstepSFX.Length)], Random.Range(0.1f, 1f)); WalkieTalkie.TransmitOneShotAudio(footstepAudio, footstepSFX[Random.Range(0, footstepSFX.Length)], Mathf.Clamp(Random.Range(-0.4f, 0.8f), 0f, 1f)); } } [ServerRpc] public void SyncMeshContainerPositionServerRpc(Vector3 syncPosition, Vector3 syncRotation) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Invalid comparison between Unknown and I4 //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //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_00dc: 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(3844970905u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref syncPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref syncRotation); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3844970905u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SyncMeshContainerPositionClientRpc(syncPosition, syncRotation); } } [ClientRpc] public void SyncMeshContainerPositionClientRpc(Vector3 syncPosition, Vector3 syncRotation) { //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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(356223318u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref syncPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref syncRotation); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 356223318u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { meshContainerServerPosition = syncPosition; meshContainerServerRotation = syncRotation; } } } public void SyncMeshContainerPositionToClients() { //IL_0002: 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_001f: 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_0077: 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) if (Vector3.Distance(meshContainerServerPosition, ((Component)this).transform.position) > 0.5f || Vector3.SignedAngle(meshContainerServerRotation, meshContainer.eulerAngles, Vector3.up) > 30f) { meshContainerServerPosition = meshContainer.position; meshContainerServerRotation = meshContainer.eulerAngles; if (((NetworkBehaviour)this).IsServer) { SyncMeshContainerPositionClientRpc(meshContainerServerPosition, meshContainer.eulerAngles); } else { SyncMeshContainerPositionServerRpc(meshContainerServerPosition, meshContainer.eulerAngles); } } } private bool AttemptPlaceWebTrap() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_0080: 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_009f: 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_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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < webTraps.Count; i++) { if (Vector3.Distance(((Component)webTraps[i]).transform.position, abdomen.position) < 0.6f) { return false; } } Vector3 val = Vector3.Scale(Random.onUnitSphere, new Vector3(1f, Random.Range(0.5f, 1f), 1f)); val.y = Mathf.Min(0f, val.y); ray = new Ray(abdomen.position + Vector3.up * 0.4f, val); if (Physics.Raycast(ray, ref rayHit, 7f, StartOfRound.Instance.collidersAndRoomMask)) { if (((RaycastHit)(ref rayHit)).distance < 2f) { return false; } Vector3 point = ((RaycastHit)(ref rayHit)).point; if (Physics.Raycast(abdomen.position, Vector3.down, ref rayHit, 10f, StartOfRound.Instance.collidersAndRoomMask)) { Vector3 startPosition = ((RaycastHit)(ref rayHit)).point + Vector3.up * 0.2f; SpawnWebTrapServerRpc(startPosition, point); } } return false; } [ServerRpc] public void SpawnWebTrapServerRpc(Vector3 startPosition, Vector3 endPosition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Invalid comparison between Unknown and I4 //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //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_00dc: 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(1720893339u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref startPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref endPosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1720893339u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SpawnWebTrapClientRpc(startPosition, endPosition); } } [ClientRpc] public void SpawnWebTrapClientRpc(Vector3 startPosition, Vector3 endPosition) { //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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_013f: 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(2180039322u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref startPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref endPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2180039322u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; GameObject val3 = Object.Instantiate(webTrapPrefab, startPosition, Quaternion.identity, RoundManager.Instance.mapPropsContainer.transform); val3.transform.LookAt(endPosition); ArachnoheadWires componentInChildren = val3.GetComponentInChildren(); webTraps.Add(componentInChildren); componentInChildren.trapID = webTraps.Count - 1; componentInChildren.mainScript = this; componentInChildren.zScale = Vector3.Distance(startPosition, endPosition) / 4f; } } } [ServerRpc(RequireOwnership = false)] public void PlayerTripWebServerRpc(int trapID, int playerNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1725844778u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, trapID); BytePacker.WriteValueBitPacked(val, playerNum); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1725844778u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerTripWebClientRpc(trapID, playerNum); } } } [ClientRpc] public void PlayerTripWebClientRpc(int trapID, int playerNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4207006827u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, trapID); BytePacker.WriteValueBitPacked(val, playerNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4207006827u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerNum]; if (webTraps.Count - 1 >= trapID && val3.isPlayerControlled) { webTraps[trapID].webAudio.Play(); webTraps[trapID].webAudio.PlayOneShot(hitWebSFX); if ((Object)(object)webTraps[trapID].currentTrappedPlayer != (Object)null) { webTraps[trapID].currentTrappedPlayer = val3; } if (((NetworkBehaviour)this).IsOwner) { TriggerChaseWithPlayer(val3); } } } private void ChasePlayer(PlayerControllerB player) { if (((NetworkBehaviour)this).IsOwner && ((EnemyAI)this).PlayerIsTargetable(player, false, false, true)) { TriggerChaseWithPlayer(player); } } [ServerRpc(RequireOwnership = false)] public void BreakWebServerRpc(int trapID, int playerWhoHit) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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(3943068945u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, trapID); BytePacker.WriteValueBitPacked(val, playerWhoHit); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3943068945u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Vector3 position = webTraps[trapID].centerOfWeb.position; BreakWebClientRpc(position, trapID); ChasePlayer(StartOfRound.Instance.allPlayerScripts[playerWhoHit]); } } } [ClientRpc] public void BreakWebClientRpc(Vector3 webPosition, int trapID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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(1768212732u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref webPosition); BytePacker.WriteValueBitPacked(val, trapID); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1768212732u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; AudioSource.PlayClipAtPoint(breakWebSFX, webPosition); RemoveWeb(trapID); } } } private void RemoveWeb(int trapID) { if ((Object)(object)webTraps[trapID].currentTrappedPlayer != (Object)null) { if ((Object)(object)webTraps[trapID].currentTrappedPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController) { PlayerControllerB currentTrappedPlayer = webTraps[trapID].currentTrappedPlayer; currentTrappedPlayer.isMovementHindered--; PlayerControllerB currentTrappedPlayer2 = webTraps[trapID].currentTrappedPlayer; currentTrappedPlayer2.hinderedMultiplier *= 0.5f; } webTraps[trapID].currentTrappedPlayer = null; } Object.Destroy((Object)(object)((Component)((Component)webTraps[trapID]).gameObject.transform.parent).gameObject); for (int i = 0; i < webTraps.Count; i++) { if (i > trapID) { webTraps[i].trapID--; } } webTraps.RemoveAt(trapID); } public void TriggerChaseWithPlayer(PlayerControllerB playerScript) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) if ((base.currentBehaviourStateIndex != 2 || watchFromDistance) && (base.currentBehaviourStateIndex != 1 || !((Object)(object)currentlyHeldBody != (Object)null) || !spooledPlayerBody) && !((EnemyAI)this).PathIsIntersectedByLineOfSight(((Component)playerScript).transform.position, false, false, false) && (Vector3.Distance(((Component)playerScript).transform.position, homeNode.position) < 25f || Vector3.Distance(((Component)playerScript).transform.position, meshContainer.position) < 15f)) { watchFromDistance = false; base.targetPlayer = playerScript; chaseTimer = 12.5f; ((EnemyAI)this).SwitchToBehaviourState(2); } } [ServerRpc(RequireOwnership = false)] public void PlayerLeaveWebServerRpc(int trapID, int playerNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3188845490u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, trapID); BytePacker.WriteValueBitPacked(val, playerNum); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3188845490u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerLeaveWebClientRpc(trapID, playerNum); } } } [ClientRpc] public void PlayerLeaveWebClientRpc(int trapID, int playerNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3901627136u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, trapID); BytePacker.WriteValueBitPacked(val, playerNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3901627136u, 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)webTraps[trapID].currentTrappedPlayer == (Object)(object)StartOfRound.Instance.allPlayerScripts[playerNum]) { webTraps[trapID].currentTrappedPlayer = null; webTraps[trapID].webAudio.Stop(); } } } public override void OnCollideWithPlayer(Collider other) { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (!base.isEnemyDead && !onWall) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, spoolingPlayerBody, false); if ((Object)(object)val != (Object)null && timeSinceHittingPlayer > 1f) { timeSinceHittingPlayer = 0f; val.DamagePlayer(90, true, true, (CauseOfDeath)6, 0, false, default(Vector3)); HitPlayerServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (!base.isEnemyDead) { base.creatureSFX.PlayOneShot(hitSpiderSFX, 1f); WalkieTalkie.TransmitOneShotAudio(base.creatureSFX, hitSpiderSFX, 1f); base.enemyHP -= force; if (base.enemyHP <= 0) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } else if (((NetworkBehaviour)this).IsOwner) { TriggerChaseWithPlayer(playerWhoHit); } } } public override void KillEnemy(bool destroy = false) { ((EnemyAI)this).KillEnemy(destroy); CancelSpoolingBody(); overrideAnimation = 1f; } [ServerRpc(RequireOwnership = false)] public void HitPlayerServerRpc(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) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1251893977u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1251893977u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; HitPlayerClientRpc(playerId); } } } [ClientRpc] public void HitPlayerClientRpc(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) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(780567838u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 780567838u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetTrigger("attack"); overrideAnimation = 0.8f; base.creatureSFX.PlayOneShot(attackSFX); WalkieTalkie.TransmitOneShotAudio(base.creatureSFX, attackSFX, 1f); } } } 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 ((NetworkBehaviour)this).__registerRpc(1106340303u, new RpcReceiveHandler(__rpc_handler_1106340303), "SpiderTurnBodyIntoWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(2770970023u, new RpcReceiveHandler(__rpc_handler_2770970023), "SpiderTurnBodyIntoWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(2361264410u, new RpcReceiveHandler(__rpc_handler_2361264410), "SpiderHangBodyServerRpc"); ((NetworkBehaviour)this).__registerRpc(2443860998u, new RpcReceiveHandler(__rpc_handler_2443860998), "SpiderHangBodyClientRpc"); ((NetworkBehaviour)this).__registerRpc(3794622256u, new RpcReceiveHandler(__rpc_handler_3794622256), "GrabBodyServerRpc"); ((NetworkBehaviour)this).__registerRpc(4075944374u, new RpcReceiveHandler(__rpc_handler_4075944374), "GrabBodyClientRpc"); ((NetworkBehaviour)this).__registerRpc(3844970905u, new RpcReceiveHandler(__rpc_handler_3844970905), "SyncMeshContainerPositionServerRpc"); ((NetworkBehaviour)this).__registerRpc(356223318u, new RpcReceiveHandler(__rpc_handler_356223318), "SyncMeshContainerPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(1720893339u, new RpcReceiveHandler(__rpc_handler_1720893339), "SpawnWebTrapServerRpc"); ((NetworkBehaviour)this).__registerRpc(2180039322u, new RpcReceiveHandler(__rpc_handler_2180039322), "SpawnWebTrapClientRpc"); ((NetworkBehaviour)this).__registerRpc(1725844778u, new RpcReceiveHandler(__rpc_handler_1725844778), "PlayerTripWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(4207006827u, new RpcReceiveHandler(__rpc_handler_4207006827), "PlayerTripWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(3943068945u, new RpcReceiveHandler(__rpc_handler_3943068945), "BreakWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(1768212732u, new RpcReceiveHandler(__rpc_handler_1768212732), "BreakWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(3188845490u, new RpcReceiveHandler(__rpc_handler_3188845490), "PlayerLeaveWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(3901627136u, new RpcReceiveHandler(__rpc_handler_3901627136), "PlayerLeaveWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(1251893977u, new RpcReceiveHandler(__rpc_handler_1251893977), "HitPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(780567838u, new RpcReceiveHandler(__rpc_handler_780567838), "HitPlayerClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1106340303(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).SpiderTurnBodyIntoWebServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2770970023(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; ((Arachnohead)(object)target).SpiderTurnBodyIntoWebClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2361264410(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).SpiderHangBodyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2443860998(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; ((Arachnohead)(object)target).SpiderHangBodyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3794622256(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).GrabBodyServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4075944374(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; ((Arachnohead)(object)target).GrabBodyClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3844970905(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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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 syncPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref syncPosition); Vector3 syncRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref syncRotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).SyncMeshContainerPositionServerRpc(syncPosition, syncRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_356223318(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 syncPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref syncPosition); Vector3 syncRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref syncRotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).SyncMeshContainerPositionClientRpc(syncPosition, syncRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1720893339(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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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 startPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startPosition); Vector3 endPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref endPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).SpawnWebTrapServerRpc(startPosition, endPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2180039322(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 startPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startPosition); Vector3 endPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref endPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).SpawnWebTrapClientRpc(startPosition, endPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1725844778(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); int playerNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).PlayerTripWebServerRpc(trapID, playerNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4207006827(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); int playerNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).PlayerTripWebClientRpc(trapID, playerNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3943068945(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); int playerWhoHit = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).BreakWebServerRpc(trapID, playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1768212732(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 webPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref webPosition); int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).BreakWebClientRpc(webPosition, trapID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3188845490(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); int playerNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).PlayerLeaveWebServerRpc(trapID, playerNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3901627136(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); int playerNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((Arachnohead)(object)target).PlayerLeaveWebClientRpc(trapID, playerNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1251893977(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; ((Arachnohead)(object)target).HitPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_780567838(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; ((Arachnohead)(object)target).HitPlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Arachnohead"; } } internal class ArachnoheadWires : MonoBehaviour, IHittable { public Arachnohead mainScript; private bool hinderingLocalPlayer; public PlayerControllerB currentTrappedPlayer; public Transform leftBone; public Transform rightBone; public Transform centerOfWeb; public int trapID; public float zScale = 1f; public AudioSource webAudio; private bool webHasBeenBroken; public bool Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { if (!webHasBeenBroken) { webHasBeenBroken = true; mainScript.BreakWebServerRpc(trapID, (int)playerWhoHit.playerClientId); } return true; } private void OnEnable() { ((UnityEvent)(object)StartOfRound.Instance.playerTeleportedEvent).AddListener((UnityAction)PlayerLeaveWeb); } private void OnDisable() { ((UnityEvent)(object)StartOfRound.Instance.playerTeleportedEvent).RemoveListener((UnityAction)PlayerLeaveWeb); PlayerLeaveWeb(GameNetworkManager.Instance.localPlayerController); } private void OnDestroy() { PlayerLeaveWeb(GameNetworkManager.Instance.localPlayerController); } public void Update() { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_0062: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)currentTrappedPlayer != (Object)null) { CallPlayerLeaveWebOnDeath(); if ((Object)(object)currentTrappedPlayer != (Object)null) { Vector3 val = ((Component)currentTrappedPlayer).transform.position + Vector3.up * 0.6f; rightBone.LookAt(val); leftBone.LookAt(val); } } else { rightBone.LookAt(centerOfWeb); leftBone.LookAt(centerOfWeb); } ((Component)this).transform.localScale = Vector3.Lerp(((Component)this).transform.localScale, new Vector3(1f, 1f, zScale), 8f * Time.deltaTime); } private void Awake() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.localScale = new Vector3(0.7f, 0.7f, 0.02f); } private void CallPlayerLeaveWebOnDeath() { if (!((Object)(object)NetworkManager.Singleton != (Object)null)) { return; } if (NetworkManager.Singleton.IsHost && !currentTrappedPlayer.isPlayerControlled && !currentTrappedPlayer.isPlayerDead) { mainScript.PlayerLeaveWebServerRpc(trapID, (int)currentTrappedPlayer.playerClientId); currentTrappedPlayer = null; } else if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)currentTrappedPlayer && (GameNetworkManager.Instance.localPlayerController.isPlayerDead || !GameNetworkManager.Instance.localPlayerController.isInsideFactory)) { PlayerControllerB obj = currentTrappedPlayer; obj.isMovementHindered--; if (GameNetworkManager.Instance.localPlayerController.isPlayerDead) { currentTrappedPlayer.hinderedMultiplier = 1f; } else { currentTrappedPlayer.hinderedMultiplier = Mathf.Clamp(currentTrappedPlayer.hinderedMultiplier * 0.4f, 0.25f, 100f); } hinderingLocalPlayer = false; mainScript.PlayerLeaveWebServerRpc(trapID, (int)currentTrappedPlayer.playerClientId); currentTrappedPlayer = null; } } private void OnTriggerStay(Collider other) { if ((Object)(object)GameNetworkManager.Instance == (Object)null || hinderingLocalPlayer) { return; } PlayerControllerB component = ((Component)other).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component == (Object)(object)GameNetworkManager.Instance.localPlayerController) { component.isMovementHindered++; component.hinderedMultiplier *= 2.5f; hinderingLocalPlayer = true; if ((Object)(object)currentTrappedPlayer == (Object)null) { currentTrappedPlayer = GameNetworkManager.Instance.localPlayerController; } if ((Object)(object)mainScript != (Object)null) { mainScript.PlayerTripWebServerRpc(trapID, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } private void PlayerLeaveWeb(PlayerControllerB playerScript) { if (hinderingLocalPlayer) { hinderingLocalPlayer = false; playerScript.isMovementHindered--; playerScript.hinderedMultiplier *= 0.4f; if ((Object)(object)currentTrappedPlayer == (Object)(object)playerScript) { currentTrappedPlayer = null; } webAudio.Stop(); if ((Object)(object)mainScript != (Object)null) { mainScript.PlayerLeaveWebServerRpc(trapID, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } private void OnTriggerExit(Collider other) { if (hinderingLocalPlayer) { PlayerControllerB component = ((Component)other).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component == (Object)(object)GameNetworkManager.Instance.localPlayerController) { PlayerLeaveWeb(component); } } } } internal class DiscmanVariant : EnemyAI { public AISearchRoutine searchForPlayers; private bool stoppingMovement; private bool hasStopped; public AnimationStopPoints animStopPoints; private float currentChaseSpeed = 5.5f; private float currentAnimSpeed = 1f; private PlayerControllerB previousTarget; private bool wasOwnerLastFrame; private float stopAndGoMinimumInterval; private float hitPlayerTimer; public AudioClip[] springNoises; public AudioClip enterCooldownSFX; public Collider mainCollider; private float loseAggroTimer; private float timeSinceHittingPlayer; private Coroutine offMeshLinkCoroutine; private float stopMovementTimer; public float timeSpentMoving; public float onCooldownPhase; private bool setOnCooldown; public float timeAtLastCooldown; public float VanishDistanceIntervalCooldown = 0.1f; public float VanishDistanceIntervalTimer; private bool inCooldownAnimation; private Vector3 previousPosition; private float checkPositionInterval; private bool isMakingDistance; public VanishEffect VanishEffect; public List VanishEffects; public float MinVanishDistance = 4f; public float MaxVanishDistance = 10f; public AnimationCurve InsanityVisibilityCurve; [ServerRpc(RequireOwnership = false)] public void SetCoilheadOnCooldownServerRpc(bool setTrue) { //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(4062228204u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setTrue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4062228204u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetCoilheadOnCooldownClientRpc(setTrue); } } } [ClientRpc] public void SetCoilheadOnCooldownClientRpc(bool setTrue) { //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(2139692143u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setTrue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2139692143u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; timeSpentMoving = 0f; if (setTrue) { onCooldownPhase = 20f; setOnCooldown = true; inCooldownAnimation = true; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(0); if (VanishEffect.CurrentAlpha < 1f) { base.creatureVoice.PlayOneShot(enterCooldownSFX); } } else { onCooldownPhase = 0f; setOnCooldown = false; timeAtLastCooldown = Time.realtimeSinceStartup; } } public bool PlayerHasHorizontalLOS(PlayerControllerB player) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)this).transform.position - ((Component)player).transform.position; val.y = 0f; return Vector3.Angle(((Component)player).transform.forward, val) < 68f; } public override void Start() { ((EnemyAI)this).Start(); SetCurrentVisibility(); } public override void DoAIInterval() { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: 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_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.allPlayersDead || base.isEnemyDead) { return; } switch (base.currentBehaviourStateIndex) { case 0: { if (!((NetworkBehaviour)this).IsServer) { ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); break; } if (onCooldownPhase > 0f) { base.agent.speed = 0f; ((EnemyAI)this).SetDestinationToPosition(((Component)this).transform.position, false); onCooldownPhase -= base.AIIntervalTime; break; } if (setOnCooldown) { setOnCooldown = false; SetCoilheadOnCooldownClientRpc(setTrue: false); } loseAggroTimer = 0f; for (int j = 0; j < StartOfRound.Instance.allPlayerScripts.Length; j++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[j], false, false, true)) { if ((StartOfRound.Instance.allPlayerScripts[j].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.25f, 68f, 60, -1f, -1) || StartOfRound.Instance.allPlayerScripts[j].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 1.6f, 68f, 60, -1f, -1)) && PlayerHasHorizontalLOS(StartOfRound.Instance.allPlayerScripts[j])) { base.targetPlayer = StartOfRound.Instance.allPlayerScripts[j]; ((EnemyAI)this).SwitchToBehaviourState(1); } if (!((EnemyAI)this).PathIsIntersectedByLineOfSight(((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position, false, false, false) && !Physics.Linecast(((Component)this).transform.position + Vector3.up * 0.5f, ((Component)StartOfRound.Instance.allPlayerScripts[j].gameplayCamera).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault) && Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position) < 30f) { ((EnemyAI)this).SwitchToBehaviourState(1); return; } } } base.agent.speed = 6f; if (!searchForPlayers.inProgress) { base.movingTowardsTargetPlayer = false; ((EnemyAI)this).SetDestinationToPosition(((Component)this).transform.position, false); ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } break; } case 1: { if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } if (((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f, false, false, true)) { if ((Object)(object)previousTarget != (Object)(object)base.targetPlayer) { previousTarget = base.targetPlayer; ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); } if (!(Time.realtimeSinceStartup - timeSinceHittingPlayer > 7f) || stoppingMovement) { break; } if (Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position) > 40f && !((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer.gameplayCamera).transform.position, 180f, 140, -1f, (Transform)null)) { loseAggroTimer += base.AIIntervalTime; if (loseAggroTimer > 4.5f) { ((EnemyAI)this).SwitchToBehaviourState(0); ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); } } else { loseAggroTimer = 0f; } break; } bool flag = false; for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if ((StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.6f, 68f, 60, -1f, -1) || StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 3f, 68f, 60, -1f, -1)) && PlayerHasHorizontalLOS(StartOfRound.Instance.allPlayerScripts[i])) { flag = true; break; } } if (!flag) { loseAggroTimer += base.AIIntervalTime; if (loseAggroTimer > 1f) { ((EnemyAI)this).SwitchToBehaviourState(0); ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); } } break; } } } private IEnumerator Parabola(NavMeshAgent agent, float height, float duration) { OffMeshLinkData data = agent.currentOffMeshLinkData; Vector3 startPos = ((Component)agent).transform.position; Vector3 endPos = ((OffMeshLinkData)(ref data)).endPos + Vector3.up * agent.baseOffset; float normalizedTime = 0f; while (normalizedTime < 1f && ((OffMeshLinkData)(ref data)).valid && ((OffMeshLinkData)(ref data)).activated && ((NetworkBehaviour)this).IsOwner) { float num = height * 4f * (normalizedTime - normalizedTime * normalizedTime); ((Component)agent).transform.position = Vector3.Lerp(startPos, endPos, normalizedTime) + num * Vector3.up; normalizedTime += Time.deltaTime / duration; yield return null; } agent.CompleteOffMeshLink(); offMeshLinkCoroutine = null; } private void StopOffMeshLinkMovement() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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) if (offMeshLinkCoroutine == null) { return; } ((MonoBehaviour)this).StopCoroutine(offMeshLinkCoroutine); offMeshLinkCoroutine = null; OffMeshLinkData currentOffMeshLinkData = base.agent.currentOffMeshLinkData; base.agent.CompleteOffMeshLink(); if (((OffMeshLinkData)(ref currentOffMeshLinkData)).valid) { if (Vector3.Distance(((Component)this).transform.position, ((OffMeshLinkData)(ref currentOffMeshLinkData)).startPos) < Vector3.Distance(((Component)this).transform.position, ((OffMeshLinkData)(ref currentOffMeshLinkData)).endPos)) { base.agent.Warp(((OffMeshLinkData)(ref currentOffMeshLinkData)).startPos); } else { base.agent.Warp(((OffMeshLinkData)(ref currentOffMeshLinkData)).endPos); } } } private void DoSpringAnimation(bool springPopUp = false) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.6f, 70f, 25, -1f, -1)) { float num = Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); if (num < 4f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.9f, true); } else if (num < 9f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.4f, true); } } if (currentAnimSpeed > 1.2f || springPopUp) { if (VanishEffect.CurrentAlpha < 1f) { RoundManager.PlayRandomClip(base.creatureVoice, springNoises, false, 1f, 0, 1000); } if (animStopPoints.animationPosition == 1) { base.creatureAnimator.SetTrigger("springBoing"); } else { base.creatureAnimator.SetTrigger("springBoingPosition2"); } } } public override void Update() { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_066f: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Unknown result type (might be due to invalid IL or missing references) //IL_0697: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead) { return; } if (hitPlayerTimer >= 0f) { hitPlayerTimer -= Time.deltaTime; } if (!((NetworkBehaviour)this).IsOwner) { stopMovementTimer = 5f; loseAggroTimer = 0f; if (offMeshLinkCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(offMeshLinkCoroutine); } } if (((NetworkBehaviour)this).IsOwner) { if (base.agent.isOnOffMeshLink) { if (!stoppingMovement) { OffMeshLinkData currentOffMeshLinkData = base.agent.currentOffMeshLinkData; if (((OffMeshLinkData)(ref currentOffMeshLinkData)).activated) { if (offMeshLinkCoroutine == null) { offMeshLinkCoroutine = ((MonoBehaviour)this).StartCoroutine(Parabola(base.agent, 0.6f, 0.5f)); } goto IL_0124; } } StopOffMeshLinkMovement(); } else if (offMeshLinkCoroutine != null) { StopOffMeshLinkMovement(); } } goto IL_0124; IL_0124: if (VanishDistanceIntervalTimer < VanishDistanceIntervalCooldown) { VanishDistanceIntervalTimer += Time.deltaTime; } else { VanishDistanceIntervalTimer = 0f; SetCurrentVisibility(); } base.creatureAnimator.SetBool("OnCooldown", setOnCooldown); if (setOnCooldown) { mainCollider.isTrigger = true; stoppingMovement = true; hasStopped = true; return; } switch (base.currentBehaviourStateIndex) { case 0: base.agent.autoTraverseOffMeshLink = false; base.creatureAnimator.SetFloat("walkSpeed", 1f); stoppingMovement = false; hasStopped = false; break; case 1: { if (((NetworkBehaviour)this).IsOwner) { if (onCooldownPhase > 0f) { ((EnemyAI)this).SwitchToBehaviourState(0); break; } if (stopAndGoMinimumInterval > 0f) { stopAndGoMinimumInterval -= Time.deltaTime; } if (!wasOwnerLastFrame) { wasOwnerLastFrame = true; if (!stoppingMovement && hitPlayerTimer < 0.12f) { base.agent.speed = currentChaseSpeed; } else { base.agent.speed = 0f; } } bool flag = false; for (int i = 0; i < 4; i++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true) && (StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.6f, 68f, 60, -1f, -1) || StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 3f, 68f, 60, -1f, -1)) && PlayerHasHorizontalLOS(StartOfRound.Instance.allPlayerScripts[i]) && Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, base.eye.position) > 0.3f) { flag = true; } } if (base.stunNormalizedTimer > 0f) { flag = true; } if (flag != stoppingMovement && stopAndGoMinimumInterval <= 0f) { stopAndGoMinimumInterval = 0.15f; if (flag) { SetAnimationStopServerRpc(); } else { SetAnimationGoServerRpc(); } stoppingMovement = flag; } } float num = 0f; if (stoppingMovement) { if (animStopPoints.canAnimationStop || stopMovementTimer > 0.27f) { if (!hasStopped) { hasStopped = true; DoSpringAnimation(); } else if (inCooldownAnimation) { inCooldownAnimation = false; DoSpringAnimation(springPopUp: true); } if ((Object)(object)RoundManager.Instance.currentMineshaftElevator != (Object)null && Vector3.Distance(((Component)this).transform.position, RoundManager.Instance.currentMineshaftElevator.elevatorInsidePoint.position) < 1f) { num = 0.5f; } if (mainCollider.isTrigger && Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position) > 0.75f) { mainCollider.isTrigger = false; } base.creatureAnimator.SetFloat("walkSpeed", 0f); currentAnimSpeed = 0f; if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = 0f; base.movingTowardsTargetPlayer = false; ((EnemyAI)this).SetDestinationToPosition(((Component)this).transform.position, false); } } else { stopMovementTimer += Time.deltaTime; } } else { stopMovementTimer = 0f; if (hasStopped) { hasStopped = false; mainCollider.isTrigger = true; isMakingDistance = true; } currentAnimSpeed = Mathf.Lerp(currentAnimSpeed, 1.3f, 5f * Time.deltaTime); base.creatureAnimator.SetFloat("walkSpeed", currentAnimSpeed); inCooldownAnimation = false; if (((NetworkBehaviour)this).IsServer) { if (checkPositionInterval <= 0f) { checkPositionInterval = 0.65f; isMakingDistance = Vector3.Distance(((Component)this).transform.position, previousPosition) > 0.5f; previousPosition = ((Component)this).transform.position; } else { checkPositionInterval -= Time.deltaTime; } num = ((!isMakingDistance) ? 0.2f : 1f); } if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = Mathf.Lerp(base.agent.speed, currentChaseSpeed, 4.5f * Time.deltaTime); base.movingTowardsTargetPlayer = true; } } if (((NetworkBehaviour)this).IsServer) { if (num > 0f) { timeSpentMoving += Time.deltaTime * num; } if (timeSpentMoving > 30f) { onCooldownPhase = 11f; setOnCooldown = true; inCooldownAnimation = true; SetCoilheadOnCooldownClientRpc(setTrue: true); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(0); } } break; } } } private void SetCurrentVisibility() { float num = 4f; float insanityLevel = GameNetworkManager.Instance.localPlayerController.insanityLevel; float num2 = 1f / GameNetworkManager.Instance.localPlayerController.maxInsanityLevel * insanityLevel; float num3 = MaxVanishDistance * InsanityVisibilityCurve.Evaluate(num2); num = MinVanishDistance + num3 + 1f; foreach (VanishEffect vanishEffect in VanishEffects) { vanishEffect.MinDistance = num; vanishEffect.MaxDistance = MinVanishDistance; } } [ServerRpc] public void SetAnimationStopServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(836523840u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 836523840u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetAnimationStopClientRpc(); } } [ClientRpc] public void SetAnimationStopClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3041449205u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3041449205u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stoppingMovement = true; } } } [ServerRpc] public void SetAnimationGoServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2320241339u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2320241339u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetAnimationGoClientRpc(); } } [ClientRpc] public void SetAnimationGoClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1946396827u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1946396827u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stoppingMovement = false; } } } public override void OnCollideWithPlayer(Collider other) { //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) ((EnemyAI)this).OnCollideWithPlayer(other); if (!stoppingMovement && base.currentBehaviourStateIndex == 1 && !(hitPlayerTimer >= 0f) && !setOnCooldown && !((double)(Time.realtimeSinceStartup - timeAtLastCooldown) < 0.45)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { hitPlayerTimer = 0.2f; val.DamagePlayer(90, true, true, (CauseOfDeath)4, 2, false, default(Vector3)); val.JumpToFearLevel(1f, true); timeSinceHittingPlayer = Time.realtimeSinceStartup; } } } 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 ((NetworkBehaviour)this).__registerRpc(4062228204u, new RpcReceiveHandler(__rpc_handler_4062228204), "SetCoilheadOnCooldownServerRpc"); ((NetworkBehaviour)this).__registerRpc(2139692143u, new RpcReceiveHandler(__rpc_handler_2139692143), "SetCoilheadOnCooldownClientRpc"); ((NetworkBehaviour)this).__registerRpc(836523840u, new RpcReceiveHandler(__rpc_handler_836523840), "SetAnimationStopServerRpc"); ((NetworkBehaviour)this).__registerRpc(3041449205u, new RpcReceiveHandler(__rpc_handler_3041449205), "SetAnimationStopClientRpc"); ((NetworkBehaviour)this).__registerRpc(2320241339u, new RpcReceiveHandler(__rpc_handler_2320241339), "SetAnimationGoServerRpc"); ((NetworkBehaviour)this).__registerRpc(1946396827u, new RpcReceiveHandler(__rpc_handler_1946396827), "SetAnimationGoClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_4062228204(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 coilheadOnCooldownServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref coilheadOnCooldownServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DiscmanVariant)(object)target).SetCoilheadOnCooldownServerRpc(coilheadOnCooldownServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2139692143(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 coilheadOnCooldownClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref coilheadOnCooldownClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DiscmanVariant)(object)target).SetCoilheadOnCooldownClientRpc(coilheadOnCooldownClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_836523840(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((DiscmanVariant)(object)target).SetAnimationStopServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3041449205(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; ((DiscmanVariant)(object)target).SetAnimationStopClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2320241339(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((DiscmanVariant)(object)target).SetAnimationGoServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1946396827(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; ((DiscmanVariant)(object)target).SetAnimationGoClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DiscmanVariant"; } } internal class HoneyStinger : EnemyAI { public AISearchRoutine searchForItems; public AISearchRoutine searchForPlayer; [Header("Tracking/Memory")] [Space(3f)] public Vector3 nestPosition; private bool choseNestPosition; [Space(3f)] public static List HoarderBugItems = new List(); public static List grabbableObjectsInMap = new List(); public float angryTimer; public GrabbableObject targetItem; public HoarderBugItem heldItem; public static bool NoHivesInMap = false; [Header("Animations")] [Space(5f)] private Vector3 agentLocalVelocity; private Vector3 previousPosition; private float velX; private float velZ; public Transform turnCompass; private float armsHoldLayerWeight; [Space(5f)] public Transform animationContainer; public Transform grabTarget; public MultiAimConstraint headLookRig; public Transform headLookTarget; [Header("Special behaviour states")] private float annoyanceMeter; public bool watchingPlayerNearPosition; public PlayerControllerB watchingPlayer; public Transform lookTarget; public bool lookingAtPositionOfInterest; private Vector3 positionOfInterest; private bool isAngry; [Header("Misc logic")] private bool sendingGrabOrDropRPC; private float waitingAtNestTimer; private bool waitingAtNest; private float timeSinceSeeingAPlayer; [Header("Chase logic")] private bool lostPlayerInChase; private float noticePlayerTimer; public PlayerControllerB angryAtPlayer; private bool inChase; [Header("Audios")] public AudioClip[] chitterSFX; [Header("Audios")] public AudioClip[] angryScreechSFX; public AudioClip angryVoiceSFX; public AudioClip bugFlySFX; public AudioClip hitPlayerSFX; private float timeSinceHittingPlayer; private float timeSinceLookingTowardsNoise; private float detectPlayersInterval; private bool inReturnToNestMode; public GameObject ghostCostume; public override void Start() { ((EnemyAI)this).Start(); heldItem = null; RefreshGrabbableObjectsInMapList(); DateTime dateTime = new DateTime(DateTime.Now.Year, 10, 31); if (DateTime.Today == dateTime) { ghostCostume.SetActive(true); } } public static void RefreshGrabbableObjectsInMapList() { grabbableObjectsInMap.Clear(); GrabbableObject[] array = Object.FindObjectsOfType(); for (int i = 0; i < array.Length; i++) { bool flag = false; if (array[i].itemProperties.itemName == "Hive") { flag = true; } if (array[i].grabbableToEnemies && !array[i].deactivated && flag) { grabbableObjectsInMap.Add(((Component)array[i]).gameObject); } } } private bool GrabTargetItemIfClose() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)targetItem != (Object)null && heldItem == null && Vector3.Distance(((Component)this).transform.position, ((Component)targetItem).transform.position) < 0.75f) { if (!((EnemyAI)this).SetDestinationToPosition(nestPosition, true)) { nestPosition = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, 0).position; ((EnemyAI)this).SetDestinationToPosition(nestPosition, false); } NetworkObject component = ((Component)targetItem).GetComponent(); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); GrabItem(component); sendingGrabOrDropRPC = true; GrabItemServerRpc(NetworkObjectReference.op_Implicit(component)); return true; } return false; } private void ChooseNestPosition() { //IL_0067: 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) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) HoarderBugAI[] array = Object.FindObjectsOfType(); for (int i = 0; i < array.Length; i++) { if ((Object)(object)array[i] != (Object)(object)this && !((EnemyAI)this).PathIsIntersectedByLineOfSight(array[i].nestPosition, false, false, false)) { nestPosition = array[i].nestPosition; SyncNestPositionServerRpc(nestPosition); return; } } nestPosition = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, 0).position; SyncNestPositionServerRpc(nestPosition); } [ServerRpc] private void SyncNestPositionServerRpc(Vector3 newNestPosition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3151270120u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref newNestPosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3151270120u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SyncNestPositionClientRpc(newNestPosition); } } [ClientRpc] private void SyncNestPositionClientRpc(Vector3 newNestPosition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3131924082u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref newNestPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3131924082u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; nestPosition = newNestPosition; } } } public override void DoAIInterval() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_0469: 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_030f: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } if (!choseNestPosition) { choseNestPosition = true; ChooseNestPosition(); return; } if (((EnemyAI)this).CheckLineOfSightForPosition(nestPosition, 60f, 40, 0.5f, (Transform)null)) { for (int i = 0; i < HoarderBugItems.Count; i++) { if (HoarderBugItems[i].itemGrabbableObject.isHeld && HoarderBugItems[i].itemNestPosition == nestPosition) { HoarderBugItems[i].status = (HoarderBugItemStatus)1; } } } HoarderBugItem val = CheckLineOfSightForItem((HoarderBugItemStatus)1, 60f, 30, 3f); if (val != null && !val.itemGrabbableObject.isHeld) { val.status = (HoarderBugItemStatus)2; if (!grabbableObjectsInMap.Contains(((Component)val.itemGrabbableObject).gameObject)) { grabbableObjectsInMap.Add(((Component)val.itemGrabbableObject).gameObject); } } switch (base.currentBehaviourStateIndex) { case 0: { inReturnToNestMode = false; ExitChaseMode(); if (GrabTargetItemIfClose()) { break; } if ((Object)(object)targetItem == (Object)null && !searchForItems.inProgress) { ((EnemyAI)this).StartSearch(nestPosition, searchForItems); break; } if ((Object)(object)targetItem != (Object)null) { SetGoTowardsTargetObject(((Component)targetItem).gameObject); break; } GameObject val3 = ((EnemyAI)this).CheckLineOfSight(grabbableObjectsInMap, 60f, 40, 5f, (Transform)null, (int[])null); if (Object.op_Implicit((Object)(object)val3)) { GrabbableObject component = val3.GetComponent(); if (Object.op_Implicit((Object)(object)component) && !component.deactivated && (!component.isHeld || (Random.Range(0, 100) < 4 && !component.isPocketed))) { SetGoTowardsTargetObject(val3); } } break; } case 1: ExitChaseMode(); if (!inReturnToNestMode) { inReturnToNestMode = true; SetReturningToNest(); } GrabTargetItemIfClose(); if (waitingAtNest) { if (heldItem != null) { DropItemAndCallDropRPC(((Component)heldItem.itemGrabbableObject).GetComponent()); } else { GameObject val2 = ((EnemyAI)this).CheckLineOfSight(grabbableObjectsInMap, 60f, 40, 5f, (Transform)null, (int[])null); if (Object.op_Implicit((Object)(object)val2) && Vector3.Distance(base.eye.position, val2.transform.position) < 6f) { targetItem = val2.GetComponent(); if ((Object)(object)targetItem != (Object)null && !targetItem.isHeld && !targetItem.deactivated) { waitingAtNest = false; ((EnemyAI)this).SwitchToBehaviourState(0); break; } } } if (waitingAtNestTimer <= 0f && !watchingPlayerNearPosition) { waitingAtNest = false; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(0); } } else if (Vector3.Distance(((Component)this).transform.position, nestPosition) < 0.75f) { waitingAtNest = true; waitingAtNestTimer = 15f; } break; case 2: inReturnToNestMode = false; if (heldItem != null) { DropItemAndCallDropRPC(((Component)heldItem.itemGrabbableObject).GetComponent(), droppedInNest: false); } if (lostPlayerInChase) { if (!searchForPlayer.inProgress) { searchForPlayer.searchWidth = 30f; ((EnemyAI)this).StartSearch(((Component)base.targetPlayer).transform.position, searchForPlayer); } break; } if ((Object)(object)base.targetPlayer == (Object)null && (Object)(object)watchingPlayer != (Object)null) { base.targetPlayer = watchingPlayer; } if (searchForPlayer.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayer, true); } base.movingTowardsTargetPlayer = true; break; case 3: break; } } private void SetGoTowardsTargetObject(GameObject foundObject) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) if (((EnemyAI)this).SetDestinationToPosition(foundObject.transform.position, true) && grabbableObjectsInMap.Contains(foundObject)) { targetItem = foundObject.GetComponent(); ((EnemyAI)this).StopSearch(searchForItems, false); } else { targetItem = null; } } private void ExitChaseMode() { if (inChase) { inChase = false; if (searchForPlayer.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayer, true); } base.movingTowardsTargetPlayer = false; base.creatureAnimator.SetBool("Chase", false); base.creatureSFX.Stop(); } } private void SetReturningToNest() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) if (((EnemyAI)this).SetDestinationToPosition(nestPosition, true)) { targetItem = null; ((EnemyAI)this).StopSearch(searchForItems, false); } else { ChooseNestPosition(); } } private void LateUpdate() { if (!base.inSpecialAnimation && !base.isEnemyDead && !StartOfRound.Instance.allPlayersDead) { if (detectPlayersInterval <= 0f) { detectPlayersInterval = 0.2f; DetectAndLookAtPlayers(); } else { detectPlayersInterval -= Time.deltaTime; } AnimateLooking(); CalculateAnimationDirection(); SetArmLayerWeight(); } } private void SetArmLayerWeight() { if (heldItem != null) { armsHoldLayerWeight = Mathf.Lerp(armsHoldLayerWeight, 0.85f, 8f * Time.deltaTime); } else { armsHoldLayerWeight = Mathf.Lerp(armsHoldLayerWeight, 0f, 8f * Time.deltaTime); } base.creatureAnimator.SetLayerWeight(1, armsHoldLayerWeight); } private void CalculateAnimationDirection(float maxSpeed = 1f) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) agentLocalVelocity = animationContainer.InverseTransformDirection(Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, 1f) / (Time.deltaTime * 2f)); velX = Mathf.Lerp(velX, agentLocalVelocity.x, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("VelocityX", Mathf.Clamp(velX, 0f - maxSpeed, maxSpeed)); velZ = Mathf.Lerp(velZ, agentLocalVelocity.z, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("VelocityZ", Mathf.Clamp(velZ, 0f - maxSpeed, maxSpeed)); previousPosition = ((Component)this).transform.position; } private void AnimateLooking() { //IL_0028: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: 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_00d1: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)watchingPlayer != (Object)null) { lookTarget.position = ((Component)watchingPlayer.gameplayCamera).transform.position; } else { if (!lookingAtPositionOfInterest) { base.agent.angularSpeed = 220f; ((RigConstraint>)(object)headLookRig).weight = Mathf.Lerp(((RigConstraint>)(object)headLookRig).weight, 0f, 10f); return; } lookTarget.position = positionOfInterest; } if (((NetworkBehaviour)this).IsOwner) { base.agent.angularSpeed = 0f; turnCompass.LookAt(lookTarget); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, turnCompass.rotation, 6f * Time.deltaTime); ((Component)this).transform.localEulerAngles = new Vector3(0f, ((Component)this).transform.localEulerAngles.y, 0f); } float num = Vector3.Angle(((Component)this).transform.forward, lookTarget.position - ((Component)this).transform.position); if (num > 22f) { ((RigConstraint>)(object)headLookRig).weight = Mathf.Lerp(((RigConstraint>)(object)headLookRig).weight, 1f * (Mathf.Abs(num - 180f) / 180f), 7f); } else { ((RigConstraint>)(object)headLookRig).weight = Mathf.Lerp(((RigConstraint>)(object)headLookRig).weight, 1f, 7f); } headLookTarget.position = Vector3.Lerp(headLookTarget.position, lookTarget.position, 8f * Time.deltaTime); } private void DetectAndLookAtPlayers() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: 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_017e: 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_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Invalid comparison between Unknown and I4 //IL_01c5: 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_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((base.currentBehaviourStateIndex != 1) ? ((Component)this).transform.position : nestPosition); PlayerControllerB[] allPlayersInLineOfSight = ((EnemyAI)this).GetAllPlayersInLineOfSight(70f, 30, base.eye, 1.2f, -1); if (allPlayersInLineOfSight != null) { PlayerControllerB val2 = watchingPlayer; timeSinceSeeingAPlayer = 0f; float num = 500f; bool flag = false; if ((Object)(object)base.stunnedByPlayer != (Object)null) { flag = true; angryAtPlayer = base.stunnedByPlayer; } for (int i = 0; i < allPlayersInLineOfSight.Length; i++) { if (!flag && (Object)(object)allPlayersInLineOfSight[i].currentlyHeldObjectServer != (Object)null) { for (int j = 0; j < HoarderBugItems.Count; j++) { if ((Object)(object)HoarderBugItems[j].itemGrabbableObject == (Object)(object)allPlayersInLineOfSight[i].currentlyHeldObjectServer) { HoarderBugItems[j].status = (HoarderBugItemStatus)1; angryAtPlayer = allPlayersInLineOfSight[i]; flag = true; } } } if (IsHoarderBugAngry() && (Object)(object)allPlayersInLineOfSight[i] == (Object)(object)angryAtPlayer) { watchingPlayer = angryAtPlayer; } else { float num2 = Vector3.Distance(((Component)allPlayersInLineOfSight[i]).transform.position, val); if (num2 < num) { num = num2; watchingPlayer = allPlayersInLineOfSight[i]; } } float num3 = Vector3.Distance(((Component)allPlayersInLineOfSight[i]).transform.position, nestPosition); bool flag2 = HoarderBugItems.Count == 1 && (int)HoarderBugItems[0].status != 1 && Vector3.Distance(((Component)HoarderBugItems[0].itemGrabbableObject).transform.position, nestPosition) > 4f; if (HoarderBugItems.Count > 0 && !flag2) { if ((num3 < 4f || (inChase && num3 < 8f)) && angryTimer < 3.25f) { angryAtPlayer = allPlayersInLineOfSight[i]; watchingPlayer = allPlayersInLineOfSight[i]; angryTimer = 3.25f; break; } if (!isAngry && base.currentBehaviourStateIndex == 0 && num3 < 8f && ((Object)(object)targetItem == (Object)null || Vector3.Distance(((Component)targetItem).transform.position, ((Component)this).transform.position) > 7.5f) && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).SwitchToBehaviourState(1); } } if (base.currentBehaviourStateIndex != 2 && Vector3.Distance(((Component)this).transform.position, ((Component)allPlayersInLineOfSight[i]).transform.position) < 6f) { annoyanceMeter += 0.2f; if (annoyanceMeter > 2.5f) { angryAtPlayer = allPlayersInLineOfSight[i]; watchingPlayer = allPlayersInLineOfSight[i]; angryTimer = 3.25f; } } } watchingPlayerNearPosition = num < 6f; if ((Object)(object)watchingPlayer != (Object)(object)val2) { RoundManager.PlayRandomClip(base.creatureVoice, chitterSFX, true, 1f, 0, 1000); } if (!((NetworkBehaviour)this).IsOwner) { return; } if (base.currentBehaviourStateIndex != 2) { if (IsHoarderBugAngry()) { lostPlayerInChase = false; base.targetPlayer = watchingPlayer; ((EnemyAI)this).SwitchToBehaviourState(2); } } else { base.targetPlayer = watchingPlayer; if (lostPlayerInChase) { lostPlayerInChase = false; } } return; } timeSinceSeeingAPlayer += 0.2f; watchingPlayerNearPosition = false; if (base.currentBehaviourStateIndex != 2) { if (timeSinceSeeingAPlayer > 1.5f) { watchingPlayer = null; } return; } if (timeSinceSeeingAPlayer > 1.25f) { watchingPlayer = null; } if (((NetworkBehaviour)this).IsOwner) { if (timeSinceSeeingAPlayer > 15f) { ((EnemyAI)this).SwitchToBehaviourState(1); } else if (timeSinceSeeingAPlayer > 2.5f) { lostPlayerInChase = true; } } } private bool IsHoarderBugAngry() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Invalid comparison between Unknown and I4 //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Invalid comparison between Unknown and I4 //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Invalid comparison between Unknown and I4 if (base.stunNormalizedTimer > 0f) { angryTimer = 4f; if (Object.op_Implicit((Object)(object)base.stunnedByPlayer)) { angryAtPlayer = base.stunnedByPlayer; } return true; } int num = 0; int num2 = 0; int num3 = 0; for (int i = 0; i < HoarderBugItems.Count; i++) { if ((int)HoarderBugItems[i].status == 1) { num2++; } else if ((int)HoarderBugItems[i].status == 2) { num++; } else if ((int)HoarderBugItems[i].status == 0) { num3++; } } if (num3 >= grabbableObjectsInMap.Count && num3 > 3) { return true; } if (!(angryTimer > 0f)) { return num2 > 0; } return true; } public override void Update() { //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); timeSinceHittingPlayer += Time.deltaTime; timeSinceLookingTowardsNoise += Time.deltaTime; if (timeSinceLookingTowardsNoise > 0.6f) { lookingAtPositionOfInterest = false; } if (base.inSpecialAnimation || base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } if (angryTimer >= 0f) { angryTimer -= Time.deltaTime; } base.creatureAnimator.SetBool("stunned", base.stunNormalizedTimer > 0f); bool flag = IsHoarderBugAngry(); if (!isAngry && flag) { isAngry = true; base.creatureVoice.clip = angryVoiceSFX; base.creatureVoice.Play(); } else if (isAngry && !flag) { isAngry = false; angryAtPlayer = null; base.creatureVoice.Stop(); } switch (base.currentBehaviourStateIndex) { case 0: ExitChaseMode(); base.addPlayerVelocityToDestination = 0f; if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = 6f; } waitingAtNest = false; break; case 1: ExitChaseMode(); base.addPlayerVelocityToDestination = 0f; if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = 6f; } base.agent.acceleration = 30f; if (waitingAtNest && waitingAtNestTimer > 0f) { waitingAtNestTimer -= Time.deltaTime; } break; case 2: if (!inChase) { inChase = true; base.creatureSFX.clip = bugFlySFX; base.creatureSFX.Play(); RoundManager.PlayRandomClip(base.creatureVoice, angryScreechSFX, true, 1f, 0, 1000); base.creatureAnimator.SetBool("Chase", true); waitingAtNest = false; if (Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 10f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.5f, true); } } base.addPlayerVelocityToDestination = 2f; if (!((NetworkBehaviour)this).IsOwner) { break; } if (!IsHoarderBugAngry()) { HoarderBugItem val = CheckLineOfSightForItem((HoarderBugItemStatus)2, 60f, 12, 3f); if (val != null && !val.itemGrabbableObject.isHeld) { ((EnemyAI)this).SwitchToBehaviourState(0); SetGoTowardsTargetObject(((Component)val.itemGrabbableObject).gameObject); } else { ((EnemyAI)this).SwitchToBehaviourState(1); } ExitChaseMode(); break; } if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = 18f; } base.agent.acceleration = 16f; if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.75f, 60f, 15, -1f, -1)) { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.4f, 1f); } break; } } public override void DetectNoise(Vector3 noisePosition, float noiseLoudness, int timesPlayedInOneSpot = 0, int noiseID = 0) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DetectNoise(noisePosition, noiseLoudness, timesPlayedInOneSpot, noiseID); if (timesPlayedInOneSpot <= 10 && !(timeSinceLookingTowardsNoise < 0.6f)) { timeSinceLookingTowardsNoise = 0f; float num = Vector3.Distance(noisePosition, nestPosition); if (((NetworkBehaviour)this).IsOwner && HoarderBugItems.Count > 0 && !isAngry && base.currentBehaviourStateIndex == 0 && num < 15f && ((Object)(object)targetItem == (Object)null || Vector3.Distance(((Component)targetItem).transform.position, ((Component)this).transform.position) > 4.5f)) { ((EnemyAI)this).SwitchToBehaviourState(1); } positionOfInterest = noisePosition; lookingAtPositionOfInterest = true; } } private void DropItemAndCallDropRPC(NetworkObject dropItemNetworkObject, bool droppedInNest = true) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_0047: Unknown result type (might be due to invalid IL or missing references) Vector3 targetFloorPosition = RoundManager.Instance.RandomlyOffsetPosition(heldItem.itemGrabbableObject.GetItemFloorPosition(default(Vector3)), 1.2f, 0.4f); DropItem(dropItemNetworkObject, targetFloorPosition); sendingGrabOrDropRPC = true; DropItemServerRpc(NetworkObjectReference.op_Implicit(dropItemNetworkObject), targetFloorPosition, droppedInNest); } [ServerRpc] public void DropItemServerRpc(NetworkObjectReference objectRef, Vector3 targetFloorPosition, bool droppedInNest) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Invalid comparison between Unknown and I4 //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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(2088186536u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref objectRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref targetFloorPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref droppedInNest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2088186536u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DropItemClientRpc(objectRef, targetFloorPosition, droppedInNest); } } [ClientRpc] public void DropItemClientRpc(NetworkObjectReference objectRef, Vector3 targetFloorPosition, bool droppedInNest) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_011b: 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(2578808197u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref objectRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref targetFloorPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref droppedInNest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2578808197u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; NetworkObject item = default(NetworkObject); if (((NetworkObjectReference)(ref objectRef)).TryGet(ref item, (NetworkManager)null)) { DropItem(item, targetFloorPosition, droppedInNest); } else { Debug.LogError((object)(((Object)((Component)this).gameObject).name + ": Failed to get network object from network object reference (Drop item RPC)")); } } } [ServerRpc] public void GrabItemServerRpc(NetworkObjectReference objectRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((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(2180071176u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref objectRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2180071176u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; GrabItemClientRpc(objectRef); } } [ClientRpc] public void GrabItemClientRpc(NetworkObjectReference objectRef) { //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(3836483981u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref objectRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3836483981u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); NetworkObject item = default(NetworkObject); if (((NetworkObjectReference)(ref objectRef)).TryGet(ref item, (NetworkManager)null)) { GrabItem(item); } else { Debug.LogError((object)(((Object)((Component)this).gameObject).name + ": Failed to get network object from network object reference (Grab item RPC)")); } } } private void DropItem(NetworkObject item, Vector3 targetFloorPosition, bool droppingInNest = true) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) if (sendingGrabOrDropRPC) { sendingGrabOrDropRPC = false; return; } if (heldItem == null) { Debug.LogError((object)"Hoarder bug: my held item is null when attempting to drop it!!"); return; } GrabbableObject itemGrabbableObject = heldItem.itemGrabbableObject; itemGrabbableObject.parentObject = null; ((Component)itemGrabbableObject).transform.SetParent(StartOfRound.Instance.propsContainer, true); itemGrabbableObject.EnablePhysics(true); itemGrabbableObject.fallTime = 0f; itemGrabbableObject.startFallingPosition = ((Component)itemGrabbableObject).transform.parent.InverseTransformPoint(((Component)itemGrabbableObject).transform.position); itemGrabbableObject.targetFloorPosition = ((Component)itemGrabbableObject).transform.parent.InverseTransformPoint(targetFloorPosition); itemGrabbableObject.floorYRot = -1; itemGrabbableObject.DiscardItemFromEnemy(); heldItem = null; if (!droppingInNest) { grabbableObjectsInMap.Add(((Component)itemGrabbableObject).gameObject); } } private void GrabItem(NetworkObject item) { //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) //IL_0082: Expected O, but got Unknown //IL_0044: 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_004b: Unknown result type (might be due to invalid IL or missing references) if (sendingGrabOrDropRPC) { sendingGrabOrDropRPC = false; return; } if (heldItem != null) { DropItem(((Component)heldItem.itemGrabbableObject).GetComponent(), heldItem.itemGrabbableObject.GetItemFloorPosition(default(Vector3))); } targetItem = null; GrabbableObject component = ((Component)item).gameObject.GetComponent(); HoarderBugItems.Add(new HoarderBugItem(component, (HoarderBugItemStatus)0, nestPosition)); heldItem = HoarderBugItems[HoarderBugItems.Count - 1]; component.parentObject = grabTarget; component.hasHitGround = false; component.GrabItemFromEnemy((EnemyAI)(object)this); component.EnablePhysics(false); grabbableObjectsInMap.Remove(((Component)component).gameObject); } public override void OnCollideWithPlayer(Collider other) { //IL_0054: 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) ((EnemyAI)this).OnCollideWithPlayer(other); if (inChase && !(timeSinceHittingPlayer < 0.5f)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { timeSinceHittingPlayer = 0f; val.DamagePlayer(30, true, true, (CauseOfDeath)6, 0, false, default(Vector3)); HitPlayerServerRpc(); } } else { angryTimer = 6f; } } [ServerRpc(RequireOwnership = false)] public void HitPlayerServerRpc() { //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(3041775037u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3041775037u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; HitPlayerClientRpc(); } } } [ClientRpc] public void HitPlayerClientRpc() { //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(2236956743u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2236956743u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!base.isEnemyDead) { base.creatureAnimator.SetTrigger("HitPlayer"); base.creatureSFX.PlayOneShot(hitPlayerSFX); WalkieTalkie.TransmitOneShotAudio(base.creatureSFX, hitPlayerSFX, 1f); } } } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (!base.isEnemyDead) { base.creatureAnimator.SetTrigger("damage"); angryAtPlayer = playerWhoHit; angryTimer += 18f; base.enemyHP -= force; if (base.enemyHP <= 0 && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } } public override void KillEnemy(bool destroy = false) { ((EnemyAI)this).KillEnemy(false); base.agent.speed = 0f; base.creatureVoice.Stop(); base.creatureSFX.Stop(); if (heldItem != null) { DropItemAndCallDropRPC(((Component)heldItem.itemGrabbableObject).GetComponent(), droppedInNest: false); } } public HoarderBugItem CheckLineOfSightForItem(HoarderBugItemStatus searchForItemsOfStatus = (HoarderBugItemStatus)(-1), float width = 45f, int range = 60, float proximityAwareness = -1f) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Invalid comparison between Unknown and I4 //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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < HoarderBugItems.Count; i++) { if (!HoarderBugItems[i].itemGrabbableObject.grabbableToEnemies || HoarderBugItems[i].itemGrabbableObject.isHeld || ((int)searchForItemsOfStatus != -1 && HoarderBugItems[i].status != searchForItemsOfStatus)) { continue; } Vector3 position = ((Component)HoarderBugItems[i].itemGrabbableObject).transform.position; if (!Physics.Linecast(base.eye.position, position, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { Vector3 val = position - base.eye.position; if (Vector3.Angle(base.eye.forward, val) < width || Vector3.Distance(((Component)this).transform.position, position) < proximityAwareness) { return HoarderBugItems[i]; } } } return null; } 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 ((NetworkBehaviour)this).__registerRpc(3151270120u, new RpcReceiveHandler(__rpc_handler_3151270120), "SyncNestPositionServerRpc"); ((NetworkBehaviour)this).__registerRpc(3131924082u, new RpcReceiveHandler(__rpc_handler_3131924082), "SyncNestPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(2088186536u, new RpcReceiveHandler(__rpc_handler_2088186536), "DropItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(2578808197u, new RpcReceiveHandler(__rpc_handler_2578808197), "DropItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(2180071176u, new RpcReceiveHandler(__rpc_handler_2180071176), "GrabItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(3836483981u, new RpcReceiveHandler(__rpc_handler_3836483981), "GrabItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(3041775037u, new RpcReceiveHandler(__rpc_handler_3041775037), "HitPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(2236956743u, new RpcReceiveHandler(__rpc_handler_2236956743), "HitPlayerClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3151270120(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 newNestPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newNestPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((HoneyStinger)(object)target).SyncNestPositionServerRpc(newNestPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3131924082(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 newNestPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newNestPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((HoneyStinger)(object)target).SyncNestPositionClientRpc(newNestPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2088186536(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00db: 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!"); } return; } NetworkObjectReference objectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref objectRef, default(ForNetworkSerializable)); Vector3 targetFloorPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetFloorPosition); bool droppedInNest = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref droppedInNest, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HoneyStinger)(object)target).DropItemServerRpc(objectRef, targetFloorPosition, droppedInNest); target.__rpc_exec_stage = (__RpcExecStage)0; } private static void __rpc_handler_2578808197(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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference objectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref objectRef, default(ForNetworkSerializable)); Vector3 targetFloorPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetFloorPosition); bool droppedInNest = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref droppedInNest, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HoneyStinger)(object)target).DropItemClientRpc(objectRef, targetFloorPosition, droppedInNest); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2180071176(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { NetworkObjectReference objectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref objectRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HoneyStinger)(object)target).GrabItemServerRpc(objectRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3836483981(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference objectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref objectRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HoneyStinger)(object)target).GrabItemClientRpc(objectRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3041775037(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; ((HoneyStinger)(object)target).HitPlayerServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2236956743(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; ((HoneyStinger)(object)target).HitPlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "HoneyStinger"; } } public class SpecialBarber : EnemyAI { public float minDistance; public float maxDistance; [Space(5f)] public float jumpSpeed = 5f; public float jumpTime = 0.25f; public float startingInterval = 2f; public float endingInterval = 0.2f; public int snareBeatAmount; [Space(3f)] public float currentInterval; private float beatTimer; [Space(5f)] public bool isJumping; private float jumpTimer; private bool jumpingLastFrame; private int beatsSinceSeeingPlayer; private bool hasLOS; private int currentHour; private bool jumpCycle; public AISearchRoutine searchRoutine; private float timeSinceSnip; private float snareIntervalTimer; public AudioSource musicAudio; public AudioSource musicAudio2; public AudioClip snareDrum; public AudioClip[] paradeClips; public AudioClip snipScissors; private int previousParadeClip; private int snareNum; public float snareOffset; public MeshRenderer[] scissorBlades; public SkinnedMeshRenderer skin; public Material scissorGuyMat; private Material thisMaterial; private RaycastHit hit; private bool IsCrouching; private bool DoBarberEffect; public TelePoint Telepoint; public override void Awake() { ((EnemyAI)this).Awake(); if (scissorBlades.Length != 0) { thisMaterial = ((Renderer)scissorBlades[0]).material; ((Renderer)scissorBlades[1]).sharedMaterial = thisMaterial; ((Renderer)skin).sharedMaterial = thisMaterial; } } [ClientRpc] public void SyncMasterClaySurgeonClientRpc() { //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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown 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(399805102u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 399805102u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { TimeOfDay.Instance.onHourChanged.AddListener(new UnityAction(HourChanged)); } } } public void ListenToMasterSurgeon() { } public override void Start() { ((EnemyAI)this).Start(); HourChanged(); } private void ChooseMasterSurgeon() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown if (!((NetworkBehaviour)this).IsServer) { return; } if (((NetworkBehaviour)this).IsServer) { SpecialBarber[] array = Object.FindObjectsByType((FindObjectsSortMode)0); int num = 1000; int num2 = -50; for (int i = 0; i < array.Length; i++) { if (((EnemyAI)array[i]).thisEnemyIndex < num) { num = ((EnemyAI)array[i]).thisEnemyIndex; num2 = i; } } TimeOfDay.Instance.onHourChanged.AddListener(new UnityAction(HourChanged)); } else if ((Object)(object)musicAudio2 != (Object)null) { Object.Destroy((Object)(object)((Component)musicAudio2).gameObject); } } public override void OnDestroy() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown ((EnemyAI)this).OnDestroy(); TimeOfDay.Instance.onHourChanged.RemoveListener(new UnityAction(HourChanged)); } public override void DoAIInterval() { //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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } PlayerControllerB targetPlayer = base.targetPlayer; if (((EnemyAI)this).TargetClosestPlayer(5f, true, 120f, false, false, true)) { hasLOS = true; beatsSinceSeeingPlayer = 0; if (searchRoutine.inProgress) { ((EnemyAI)this).StopSearch(searchRoutine, true); } } else if (beatsSinceSeeingPlayer > 6) { if (hasLOS) { hasLOS = false; } if (!searchRoutine.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchRoutine); } } else if ((Object)(object)targetPlayer != (Object)null) { base.targetPlayer = targetPlayer; } if (!((NetworkBehaviour)this).IsServer) { return; } if (Physics.Raycast(((Component)this).transform.position + Vector3.up, Vector3.up, 7.5f, LayerMask.GetMask(new string[1] { "Room" }))) { if (!IsCrouching) { IsCrouching = true; SetCrouchedAnimationClientRpc(value: true); } } else if (IsCrouching) { IsCrouching = false; SetCrouchedAnimationClientRpc(value: false); } } [ClientRpc] private void SetCrouchedAnimationClientRpc(bool value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(902767523u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 902767523u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetBool("inside", value); } } } private void PlayMusic() { if (snareIntervalTimer <= 0f) { snareIntervalTimer = 100f; musicAudio.PlayOneShot(snareDrum); WalkieTalkie.TransmitOneShotAudio(musicAudio, snareDrum, 1f); musicAudio2.PlayOneShot(snareDrum); } else { snareIntervalTimer -= Time.deltaTime; } } private void SetMusicVolume() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) float num = 0f; float num2 = 1000f; num = Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)this).transform.position); if (num < num2) { num2 = num; } if (num2 < 40f) { float num3 = ((!(num2 < 20f)) ? Mathf.Lerp(1f, 0.25f, num2 / 50f) : Mathf.Lerp(0.4f, 0f, num2 / 10f)); musicAudio2.volume = Mathf.Lerp(musicAudio2.volume, num3, 2.5f * Time.deltaTime); } else { musicAudio2.volume = Mathf.Lerp(musicAudio2.volume, 0f, 4f * Time.deltaTime); } } private void SetVisibility() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_002f: Unknown result type (might be due to invalid IL or missing references) float num = Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)this).transform.position + Vector3.up * 0.7f); thisMaterial.SetFloat("_AlphaCutoff", (num - minDistance) / (maxDistance - minDistance)); PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!localPlayerController.isPlayerDead && (Object)(object)localPlayerController != (Object)null && num < 15f && num > maxDistance + 2f) { localPlayerController.IncreaseFearLevelOverTime(0.37f, 0.25f); } } public override void Update() { ((EnemyAI)this).Update(); if (DoBarberEffect) { SetVisibility(); } SetDanceClock(); SetMusicVolume(); if (StartOfRound.Instance.allPlayersDead) { return; } PlayMusic(); timeSinceSnip += Time.deltaTime; if (!((NetworkBehaviour)this).IsOwner) { return; } if (base.isEnemyDead || base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else if (isJumping) { if (timeSinceSnip < 0.7f) { timeSinceSnip += Time.deltaTime; base.agent.speed = 0f; } jumpTimer -= Time.deltaTime; if (jumpTimer <= 0f) { isJumping = false; base.agent.speed = 0f; } else { base.agent.speed = jumpSpeed; } } if (beatTimer <= 0f) { beatTimer = currentInterval; DoBeatOnOwnerClient(); } else { beatTimer -= Time.deltaTime; } } public override void OnCollideWithPlayer(Collider other) { //IL_003e: 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) ((EnemyAI)this).OnCollideWithPlayer(other); if (!(timeSinceSnip < 1f)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { val.DamagePlayer(100, true, true, (CauseOfDeath)0, 6, false, default(Vector3)); HUDManager.Instance.flashFilter = 1f; KillPlayerServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void KillPlayerServerRpc() { //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(3977145253u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3977145253u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; KillPlayerClientRpc(); } } } [ClientRpc] public void KillPlayerClientRpc() { //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(4043322008u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4043322008u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = 0f; beatTimer += 2f; } snareIntervalTimer = Mathf.Min(snareIntervalTimer + 2f, 4f); timeSinceSnip = 0f; base.creatureAnimator.SetTrigger("snip"); base.creatureSFX.PlayOneShot(snipScissors); } } private void DoBeatOnOwnerClient() { DanceBeat(); DoBeatServerRpc(); } [ServerRpc] public void DoBeatServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3628829117u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3628829117u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DoBeatClientRpc(); } } [ClientRpc] public void DoBeatClientRpc() { //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(3754159865u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3754159865u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { DanceBeat(); } } } private void HourChanged() { currentInterval = Mathf.Clamp(Mathf.Lerp(startingInterval, endingInterval, (float)TimeOfDay.Instance.hour / (float)TimeOfDay.Instance.numberOfHours), endingInterval, startingInterval); } private void DanceBeat() { //IL_009c: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) if (base.stunNormalizedTimer > 0f) { return; } isJumping = true; jumpTimer = jumpTime; jumpCycle = !jumpCycle; base.creatureAnimator.SetBool("walkCycle", jumpCycle); if (!((NetworkBehaviour)this).IsOwner) { return; } beatsSinceSeeingPlayer++; if (hasLOS && (Object)(object)base.targetPlayer != (Object)null) { Vector3 val = ((Component)base.targetPlayer).transform.position; if (Physics.Raycast(((Component)base.targetPlayer).transform.position + Vector3.up * 0.5f, Vector3.down, ref hit, 7f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { val = ((RaycastHit)(ref hit)).point; } Vector3 onUnitSphere = Random.onUnitSphere; onUnitSphere.y = 0f; Ray val2 = default(Ray); ((Ray)(ref val2))..ctor(val, onUnitSphere); float num = Vector3.Distance(((Component)this).transform.position, val); val = ((!Physics.Raycast(val2, ref hit, num, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) ? ((Ray)(ref val2)).GetPoint(num) : ((RaycastHit)(ref hit)).point); ((EnemyAI)this).SetDestinationToPosition(val, false); } } public override void AnimationEventA() { //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).AnimationEventA(); if (((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).SyncPositionToClients(); } if (!(timeSinceSnip < 0.4f)) { int num = Random.Range(0, paradeClips.Length); if (num == previousParadeClip) { num = (num + 1) % paradeClips.Length; } previousParadeClip = num; float pitch = Random.Range(0.95f, 1.05f); musicAudio.pitch = pitch; musicAudio.PlayOneShot(paradeClips[num]); WalkieTalkie.TransmitOneShotAudio(musicAudio, paradeClips[num], 1f); snareIntervalTimer = currentInterval - snareOffset; snareNum = 0; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!localPlayerController.isPlayerDead && localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.7f, 70f, (int)maxDistance - 1, -1f, -1)) { localPlayerController.JumpToFearLevel(0.85f, true); } musicAudio2.pitch = pitch; musicAudio2.PlayOneShot(paradeClips[num]); } } private void SetDanceClock() { } 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 ((NetworkBehaviour)this).__registerRpc(399805102u, new RpcReceiveHandler(__rpc_handler_399805102), "SyncMasterClaySurgeonClientRpc"); ((NetworkBehaviour)this).__registerRpc(902767523u, new RpcReceiveHandler(__rpc_handler_902767523), "SetCrouchedAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(3977145253u, new RpcReceiveHandler(__rpc_handler_3977145253), "KillPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(4043322008u, new RpcReceiveHandler(__rpc_handler_4043322008), "KillPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3628829117u, new RpcReceiveHandler(__rpc_handler_3628829117), "DoBeatServerRpc"); ((NetworkBehaviour)this).__registerRpc(3754159865u, new RpcReceiveHandler(__rpc_handler_3754159865), "DoBeatClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_399805102(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; ((SpecialBarber)(object)target).SyncMasterClaySurgeonClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_902767523(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 crouchedAnimationClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref crouchedAnimationClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SpecialBarber)(object)target).SetCrouchedAnimationClientRpc(crouchedAnimationClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3977145253(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; ((SpecialBarber)(object)target).KillPlayerServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4043322008(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; ((SpecialBarber)(object)target).KillPlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3628829117(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((SpecialBarber)(object)target).DoBeatServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3754159865(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; ((SpecialBarber)(object)target).DoBeatClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SpecialBarber"; } } internal class SpecialBees : EnemyAI { private float timeAtLastHurtingPlayer; public AISearchRoutine searchForPlayers; private float chasePlayerTimer; private float timeAtSpawning; private float randomSpeed; public AudioSource buzzing; public override void Start() { ((EnemyAI)this).Start(); timeAtSpawning = Time.realtimeSinceStartup; if (((NetworkBehaviour)this).IsServer) { randomSpeed = Random.Range(4f, 6f); SetSpeedClientsClientRpc(randomSpeed); } } [ClientRpc] private void SetSpeedClientsClientRpc(float speed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(934412802u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref speed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 934412802u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; randomSpeed = speed; } } } public override void OnCollideWithPlayer(Collider other) { //IL_007b: 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) ((EnemyAI)this).OnCollideWithPlayer(other); if (!(Time.realtimeSinceStartup - timeAtSpawning < 1.7f) && !(Time.realtimeSinceStartup - timeAtLastHurtingPlayer < 0.5f)) { timeAtLastHurtingPlayer = Time.realtimeSinceStartup; PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null && (Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController) { val.DamagePlayer(10, true, true, (CauseOfDeath)14, 0, false, default(Vector3)); } } } public override void DoAIInterval() { //IL_00eb: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.allPlayersDead) { return; } if (!((EnemyAI)this).TargetClosestPlayer(4f, true, 180f, false, false, true)) { if (base.movingTowardsTargetPlayer) { buzzing.pitch = Mathf.Lerp(buzzing.pitch, 1.15f, Time.deltaTime * 5f); base.agent.speed = Mathf.Max(base.agent.speed - base.AIIntervalTime, randomSpeed); chasePlayerTimer += base.AIIntervalTime; if (chasePlayerTimer > 3f) { base.movingTowardsTargetPlayer = false; } } else { if (!searchForPlayers.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } buzzing.pitch = Mathf.Lerp(buzzing.pitch, 1f, Time.deltaTime * 5f); base.agent.speed = randomSpeed; } } else { base.movingTowardsTargetPlayer = true; chasePlayerTimer = 0f; float num = randomSpeed; base.agent.speed = Mathf.Min(base.agent.speed + base.AIIntervalTime * 0.75f, num); buzzing.pitch = Mathf.Lerp(buzzing.pitch, 1.3f, Time.deltaTime * 5f); if (base.currentOwnershipOnThisClient != (int)base.targetPlayer.playerClientId) { ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); } } } 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 ((NetworkBehaviour)this).__registerRpc(934412802u, new RpcReceiveHandler(__rpc_handler_934412802), "SetSpeedClientsClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_934412802(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 speedClientsClientRpc = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref speedClientsClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SpecialBees)(object)target).SetSpeedClientsClientRpc(speedClientsClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SpecialBees"; } } public class SpecialJester : EnemyAI { public AudioSource farAudio; public AISearchRoutine roamMap; private Vector3 spawnPosition; public float popUpTimer; public float beginCrankingTimer; private int previousState; public AudioClip popGoesTheWeaselTheme; public AudioClip popUpSFX; public AudioClip screamingSFX; public AudioClip killPlayerSFX; private Vector3 previousPosition; public float maxAnimSpeed; private float noPlayersToChaseTimer; private bool targetingPlayer; private bool poppedOnce; public int BodyPartGrabType = 5; public float MinRunSpeed = 0f; public float MaxRunSpeed = 5f; public float MaxWalkSpeed = 5f; public float PlayerBodyGrabTime = 1.8f; public float MinSearchTimer = 1f; public float MaxSearchTimer = 1f; public float MinCrankTimer = 1f; public float MaxCrankTimer = 1f; public float PopUpMultiplier = 1f; public bool InstaPop = true; public Transform headRigTarget; public Transform lookForwardTarget; public Collider mainCollider; private bool inKillAnimation; private Coroutine killPlayerAnimCoroutine; public Transform grabBodyPoint; public override void Start() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); spawnPosition = ((Component)this).transform.position; SetJesterInitialValues(); } public override void DoAIInterval() { //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0215: 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) ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.livingPlayers == 0 || base.isEnemyDead) { return; } if (!((NetworkBehaviour)this).IsServer && ((NetworkBehaviour)this).IsOwner && base.currentBehaviourStateIndex != 2) { ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); } switch (base.currentBehaviourStateIndex) { case 0: { if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = MaxWalkSpeed; } base.agent.stoppingDistance = 4f; base.addPlayerVelocityToDestination = 0f; PlayerControllerB targetPlayer2 = base.targetPlayer; if (((EnemyAI)this).TargetClosestPlayer(3f, true, 70f, false, false, true)) { if (roamMap.inProgress) { ((EnemyAI)this).StopSearch(roamMap, true); } ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); } else { base.targetPlayer = targetPlayer2; } if (!((Object)(object)base.targetPlayer != (Object)null) && (Object)(object)base.targetPlayer == (Object)null && !roamMap.inProgress) { ((EnemyAI)this).StartSearch(spawnPosition, roamMap); } break; } case 1: base.agent.speed = 0f; break; case 2: { base.agent.stoppingDistance = 0f; PlayerControllerB targetPlayer = base.targetPlayer; bool flag = false; if ((Object)(object)base.targetPlayer == (Object)null) { flag = true; } else if (!((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false, true) || ((EnemyAI)this).PathIsIntersectedByLineOfSight(RoundManager.Instance.GetNavMeshPosition(((Component)base.targetPlayer).transform.position, default(NavMeshHit), 5f, base.agent.areaMask), false, true, false)) { flag = true; } base.addPlayerVelocityToDestination = 1f; if (!((EnemyAI)this).TargetClosestPlayer(4f, false, 70f, false, false, true) && (Object)(object)targetPlayer != (Object)null && !flag) { base.targetPlayer = targetPlayer; } if ((Object)(object)base.targetPlayer != (Object)null) { if (roamMap.inProgress) { ((EnemyAI)this).StopSearch(roamMap, true); } ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); if ((Object)(object)base.targetPlayer != (Object)(object)targetPlayer) { ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); } } break; } } } private void CalculateAnimationSpeed(float maxSpeed = 1f) { //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_0012: 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_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) Vector3 val = Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, maxSpeed); float num = ((Vector3)(ref val)).magnitude / (Time.deltaTime * 3f); base.creatureAnimator.SetFloat("speedOfMovement", num); previousPosition = ((Component)this).transform.position; base.creatureAnimator.SetBool("walking", num > 0.05f); } private void SetJesterInitialValues() { base.targetPlayer = null; popUpTimer = Random.Range(MinCrankTimer, MaxCrankTimer); beginCrankingTimer = Random.Range(MinSearchTimer, MaxSearchTimer); if (StartOfRound.Instance.connectedPlayersAmount == 0) { beginCrankingTimer = Random.Range(MinSearchTimer, MaxSearchTimer); } base.creatureAnimator.SetBool("turningCrank", false); base.creatureAnimator.SetBool("poppedOut", false); base.creatureAnimator.SetFloat("CrankSpeedMultiplier", 1f); base.creatureAnimator.SetBool("stunned", false); mainCollider.isTrigger = false; noPlayersToChaseTimer = 0f; farAudio.Stop(); base.creatureVoice.Stop(); base.creatureSFX.Stop(); if (!poppedOnce && InstaPop) { ((EnemyAI)this).SwitchToBehaviourState(1); poppedOnce = true; } } public override void Update() { //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) if (base.isEnemyDead) { return; } CalculateAnimationSpeed(maxAnimSpeed); switch (base.currentBehaviourStateIndex) { case 0: if (previousState != 0) { previousState = 0; mainCollider.isTrigger = false; SetJesterInitialValues(); } if (!((NetworkBehaviour)this).IsOwner) { break; } if (base.stunNormalizedTimer > 0f) { beginCrankingTimer -= Time.deltaTime * 15f; } if ((Object)(object)base.targetPlayer != (Object)null) { beginCrankingTimer -= Time.deltaTime; if (beginCrankingTimer <= 0f) { ((EnemyAI)this).SwitchToBehaviourState(1); } } break; case 1: if (previousState != 1) { previousState = 1; base.creatureAnimator.SetBool("turningCrank", true); farAudio.clip = popGoesTheWeaselTheme; farAudio.Play(); base.agent.speed = 0f; } if (base.stunNormalizedTimer > 0f) { farAudio.Pause(); base.creatureAnimator.SetFloat("CrankSpeedMultiplier", 0f); } else { if (!farAudio.isPlaying) { farAudio.UnPause(); } base.creatureAnimator.SetFloat("CrankSpeedMultiplier", 1f); popUpTimer -= Time.deltaTime * PopUpMultiplier; if (popUpTimer <= 0f && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).SwitchToBehaviourState(2); } } if (!((NetworkBehaviour)this).IsOwner) { } break; case 2: if (previousState != 2) { previousState = 2; farAudio.Stop(); base.creatureAnimator.SetBool("poppedOut", true); base.creatureAnimator.SetFloat("CrankSpeedMultiplier", 1f); base.creatureSFX.PlayOneShot(popUpSFX); WalkieTalkie.TransmitOneShotAudio(base.creatureSFX, popUpSFX, 1f); base.creatureVoice.clip = screamingSFX; base.creatureVoice.Play(); base.agent.speed = 0f; mainCollider.isTrigger = true; base.agent.stoppingDistance = 0f; } if (((NetworkBehaviour)this).IsOwner && (Object)(object)base.targetPlayer != (Object)null && ((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer.gameplayCamera).transform.position, 80f, 80, -1f, (Transform)null)) { headRigTarget.rotation = Quaternion.Lerp(headRigTarget.rotation, Quaternion.LookRotation(((Component)base.targetPlayer.gameplayCamera).transform.position - ((Component)headRigTarget).transform.position, Vector3.up), 5f * Time.deltaTime); } else { headRigTarget.rotation = Quaternion.Lerp(headRigTarget.rotation, Quaternion.LookRotation(lookForwardTarget.position - ((Component)headRigTarget).transform.position, Vector3.up), 5f * Time.deltaTime); } if (!((NetworkBehaviour)this).IsOwner) { break; } if (inKillAnimation || base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = Mathf.Clamp(base.agent.speed + Time.deltaTime * 1.45f, MinRunSpeed, MaxRunSpeed); } base.creatureAnimator.SetBool("stunned", base.stunNormalizedTimer > 0f); if (!targetingPlayer) { bool flag = false; for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled && StartOfRound.Instance.allPlayerScripts[i].isInsideFactory) { flag = true; } } if (!flag) { noPlayersToChaseTimer -= Time.deltaTime; if (noPlayersToChaseTimer <= 0f) { ((EnemyAI)this).SwitchToBehaviourState(0); } } } else { noPlayersToChaseTimer = 5f; } break; } ((EnemyAI)this).Update(); } public override void OnCollideWithPlayer(Collider other) { if (!Object.op_Implicit((Object)(object)((Component)other).gameObject.GetComponent())) { return; } ((EnemyAI)this).OnCollideWithPlayer(other); if (!inKillAnimation && !base.isEnemyDead && base.currentBehaviourStateIndex == 2) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { inKillAnimation = true; KillPlayerServerRpc((int)val.playerClientId); } } } [ServerRpc(RequireOwnership = false)] public void KillPlayerServerRpc(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.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2418096927u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2418096927u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!inKillAnimation || ((NetworkBehaviour)StartOfRound.Instance.allPlayerScripts[playerId]).IsOwnedByServer) { inKillAnimation = true; KillPlayerClientRpc(playerId); } else { CancelKillPlayerClientRpc(); } } } [ClientRpc] public void CancelKillPlayerClientRpc() { //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(1812490851u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1812490851u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (killPlayerAnimCoroutine == null) { inKillAnimation = false; } } } [ClientRpc] public void KillPlayerClientRpc(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(2107773215u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2107773215u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (killPlayerAnimCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(killPlayerAnimCoroutine); } killPlayerAnimCoroutine = ((MonoBehaviour)this).StartCoroutine(killPlayerAnimation(playerId)); } } private IEnumerator killPlayerAnimation(int playerId) { base.creatureSFX.PlayOneShot(killPlayerSFX); inKillAnimation = true; PlayerControllerB playerScript = StartOfRound.Instance.allPlayerScripts[playerId]; playerScript.KillPlayer(Vector3.zero, true, (CauseOfDeath)6, 0, default(Vector3), false); base.creatureAnimator.SetTrigger("KillPlayer"); float startTime = Time.realtimeSinceStartup; yield return (object)new WaitUntil((Func)(() => (Object)(object)playerScript.deadBody != (Object)null || Time.realtimeSinceStartup - startTime > 2f)); DeadBodyInfo body = playerScript.deadBody; if ((Object)(object)body != (Object)null && (Object)(object)body.attachedTo == (Object)null) { body.attachedLimb = body.bodyParts[BodyPartGrabType]; body.attachedTo = grabBodyPoint; body.matchPositionExactly = true; } yield return (object)new WaitForSeconds(PlayerBodyGrabTime); if ((Object)(object)body != (Object)null && (Object)(object)body.attachedTo == (Object)(object)grabBodyPoint) { body.attachedLimb = null; body.attachedTo = null; body.matchPositionExactly = false; } yield return (object)new WaitForSeconds(0.4f); inKillAnimation = false; } 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 ((NetworkBehaviour)this).__registerRpc(2418096927u, new RpcReceiveHandler(__rpc_handler_2418096927), "KillPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(1812490851u, new RpcReceiveHandler(__rpc_handler_1812490851), "CancelKillPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2107773215u, new RpcReceiveHandler(__rpc_handler_2107773215), "KillPlayerClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_2418096927(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; ((SpecialJester)(object)target).KillPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1812490851(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; ((SpecialJester)(object)target).CancelKillPlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2107773215(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; ((SpecialJester)(object)target).KillPlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SpecialJester"; } } } namespace WesleysInteriorTools.Configs { internal class NutcrackerConfig : MonoBehaviour { public UnityEvent ConfigEvent; private void Start() { if (WesleysInteriorToolsPlugin.GetNutcrackerValue()) { ConfigEvent.Invoke(); } } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace WesleysInteriorTools.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }