#define DEBUG using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using Dawn.Utils; using Dusk; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using Reiko888.BloodWitch.NetcodePatcher; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.VFX; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("DunGen")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.ASPP")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.UnityNav")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.XR.CoreUtils")] [assembly: IgnoresAccessChecksTo("Unity.XR.Management")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.ConformanceAutomation")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MetaQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MockRuntime")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.OculusQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.RuntimeDebugger")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.SpatialTracking")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("UnityEngine.XR.LegacyInputHelpers")] [assembly: AssemblyCompany("Reiko888.BloodWitch")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.2.0")] [assembly: AssemblyInformationalVersion("1.0.2+f9d2a7d91a99870fa7aafc83342fe07b51feb3a6")] [assembly: AssemblyProduct("Blood Witch")] [assembly: AssemblyTitle("Reiko888.BloodWitch")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BloodWitch { [Serializable] public struct LevelMaterialSwap { public SkinnedMeshRenderer targetRenderer; public int materialIndex; public Material level1Material; public Material level2Material; public Material level3Material; public Material level4Material; } public class BloodWitchAI : EnemyAI { [Serializable] public class LimbGroup { public SkinnedMeshRenderer[] renderers; } private enum State { GrannyLevel1, GrannyLevel2, GrannyLevel3, MonsterLevel4 } private Dictionary previousPlayerHealths = new Dictionary(); [Header("Material Swaps")] public LevelMaterialSwap[] grannyMaterialSwaps; private Random enemyRandom = null; public GameObject[] outsideNodes; public SkinnedMeshRenderer[] skin; public Material[] thisMaterial; private bool hasLOS; private float LOStimer = 0f; public float chaseTimer = 0f; public bool canTeleport = true; public bool hasTeleported; private float chosenBloodTimer; private float teleportCooldownTimer; private Vector3 lastPosition; public Vector3 recentBlood; private Vector3 chosenTeleportNode; private const float MAX_ACCELERATION = 35f; private const float MIN_ACCELERATION = 10f; private const float MONSTER_SPEED_DIVISOR = 4.5f; private const float LINE_OF_SIGHT_DISTANCE = 120f; private Animator[] monsterAnimators; public LimbGroup[] removableLimbs; public GameObject[] severedLimbPrefabs; private float[] limbRegenTimers; private float limbRegenDuration; private bool[] isLimbDetached; private bool isConsumingBlood = false; private float consumeTimer = 0f; private Vector3 consumptionLockPosition; private float consumeDuration; public Transform currentBloodTarget; private List consumedBloodTargets = new List(); private float bloodSearchTimer = 0f; private float bloodTargetWaitTimer = 0f; private float currentMonsterSpeed = 2f; private Vector3 previousPosition; private float averageVelocity; private float velocityInterval; private float velocityAverageCount; public GameObject geyserPrefab; private GameObject currentActiveGeyser; public GameObject playerBloodExplosionPrefab; [Header("Footprints")] public GameObject footprintPrefab; public int maxFootprints = 15; public float footprintDistanceThreshold = 1.5f; public float footprintLateralOffset = 0.3f; public float footprintBackwardOffset = 1.2f; public float footprintLifetime = 4f; private float accumulatedFootprintDistance = 0f; private Vector3 previousFootprintPosition; private bool alternateFootprint = false; private float activeFootprintTimer = 0f; private GameObject[] footprintPool; private float[] footprintTimers; private int currentFootprintIndex = 0; public GameObject bloodOrb; public GameObject dagger; public PlayAudioAnimationEvent grannyAudioAnimationEvent; public PlayAudioAnimationEvent monsterAudioAnimationEvent; [Header("Audio")] public AudioClip[] hitSFX; public AudioClip[] monsterAttackSFX; public AudioClip[] monsterSeePlayerSFX; public AudioClip[] monsterHitPlayerSFX; private float monsterSeePlayerCooldown = 0f; public AudioClip[] laughingClips; public AudioClip[] level3LaughingClips; public AudioClip[] levelUpScreams; public AudioClip[] levelUpScreamsDistant; private float laughCooldown = 0f; public AudioClip bloodExplosionSFX; public AudioClip boilTarget2DSFX; public AudioClip teleportSFX; public AudioClip consumeBloodSFX; public AudioClip transformationSFX; public AudioClip transformationSFXDistant; public AudioClip stabSFX; public AudioSource daggerAudioSource; public AudioSource breathingAudioSource; public AudioSource screamAudioSource; public AudioSource distantScreamAudioSource; private AudioSource boil2DAudioSource; public GameObject grannyModelContainer; public GameObject monsterModelContainer; public GameObject portalPrefab; public AudioClip portalStartSFX; public AudioClip portalCloseSFX; public GameObject[] level2EyeEffects; public ParticleSystem BloodSpurtParticleArmL; public ParticleSystem BloodSpurtParticleArmR; public ParticleSystem BloodSpurtParticleHead; public ParticleSystem BloodSpurtParticleBackL; public ParticleSystem BloodSpurtParticleBackR; private float timeSinceLastAttack; private bool isShipLeavingHandled = false; public int bloodConsumed = 0; private float explosionTimer = 0f; private float lastBoilTime = 0f; private float explosionThreshold = 5f; private float geyserCooldown; private float geyserCooldownThreshold; private float grannyAttackCooldownThreshold; private bool hasStartedTransformation = false; private bool isCurrentlyTransforming = false; private bool isWaitingForLevelUp = false; private bool isPausedAfterAttack = false; private bool isWalkingIntoPortal = false; private EntranceTeleport[] allTeleports; private float doorTransitionCooldown = 0f; private static FieldInfo currentBloodIndexField = typeof(PlayerControllerB).GetField("currentBloodIndex", BindingFlags.Instance | BindingFlags.NonPublic); private int Level1TPCooldown; private int Level2TPCooldown; private int Level3TPCooldown; private int Level1ConsumeReq; private int Level2ConsumeReq; private int Level3ConsumeReq; private bool canUseEnemyBlood; private bool canUsePlayerBlood; private bool canMonstGoOutside; private bool canGrannyGoOutside; private int granny1to2base; private int granny3base; private int monsterBaseSpeed; private int monsterMaxSpeed; private int limbHealth; private int currentLimbDamage = 0; private Vector3 targetPlayerLastPos; private Vector3 targetPlayerVelocity; private Coroutine consumeCoroutine; private Coroutine portalCoroutine; private GameObject entrancePortal; private GameObject exitPortal; public int CurrentLevel { get { if (bloodConsumed >= Level3ConsumeReq) { return 4; } if (bloodConsumed >= Level2ConsumeReq) { return 3; } if (bloodConsumed >= Level1ConsumeReq) { return 2; } return 1; } } [Conditional("DEBUG")] private void LogIfDebugBuild(string text) { if (Plugin.Logger != null) { Plugin.Logger.LogInfo((object)text); } else { Debug.Log((object)(" " + text)); } } private void SpawnFootprint() { //IL_0047: 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_004d: 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_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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_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_009a: 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_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_00ba: 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_00c4: 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_00ea: 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_010f: 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_0142: 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_0152: 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_015a: 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_0163: 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_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) //IL_01a3: 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_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: 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) if (footprintPool == null || footprintPool.Length == 0) { return; } GameObject val = footprintPool[currentFootprintIndex]; if ((Object)(object)val == (Object)null) { return; } Vector3 forward = ((Component)this).transform.forward; if (forward == Vector3.zero) { forward = Vector3.forward; } Vector3 right = ((Component)this).transform.right; float num = (alternateFootprint ? footprintLateralOffset : (0f - footprintLateralOffset)); Vector3 val2 = ((Component)this).transform.position - forward * footprintBackwardOffset + right * num + Vector3.up * 1f; int collidersAndRoomMaskAndDefault = StartOfRound.Instance.collidersAndRoomMaskAndDefault; collidersAndRoomMaskAndDefault &= ~(1 << ((Component)this).gameObject.layer); RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(val2, Vector3.down, ref val3, 4f, collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && !(Vector3.Dot(((RaycastHit)(ref val3)).normal, Vector3.up) < 0.7f)) { val.transform.position = ((RaycastHit)(ref val3)).point + Vector3.up * 0.02f; Vector3 val4 = Vector3.ProjectOnPlane(forward, ((RaycastHit)(ref val3)).normal); Vector3 normalized = ((Vector3)(ref val4)).normalized; if (normalized != Vector3.zero) { val.transform.rotation = Quaternion.LookRotation(-((RaycastHit)(ref val3)).normal, normalized); } Vector3 localScale = val.transform.localScale; localScale.x = (alternateFootprint ? Mathf.Abs(localScale.x) : (0f - Mathf.Abs(localScale.x))); val.transform.localScale = localScale; val.SetActive(true); footprintTimers[currentFootprintIndex] = footprintLifetime; alternateFootprint = !alternateFootprint; currentFootprintIndex = (currentFootprintIndex + 1) % maxFootprints; } } private void ApplyLevelMaterials(int level) { if (grannyMaterialSwaps == null || grannyMaterialSwaps.Length == 0) { return; } LevelMaterialSwap[] array = grannyMaterialSwaps; for (int i = 0; i < array.Length; i++) { LevelMaterialSwap levelMaterialSwap = array[i]; if ((Object)(object)levelMaterialSwap.targetRenderer == (Object)null) { continue; } Material val = null; if (level == 1 && (Object)(object)levelMaterialSwap.level1Material != (Object)null) { val = levelMaterialSwap.level1Material; } else if (level == 2 && (Object)(object)levelMaterialSwap.level2Material != (Object)null) { val = levelMaterialSwap.level2Material; } else if (level == 3 && (Object)(object)levelMaterialSwap.level3Material != (Object)null) { val = levelMaterialSwap.level3Material; } else if (level >= 4 && (Object)(object)levelMaterialSwap.level4Material != (Object)null) { val = levelMaterialSwap.level4Material; } if ((Object)(object)val != (Object)null) { Material[] sharedMaterials = ((Renderer)levelMaterialSwap.targetRenderer).sharedMaterials; if (levelMaterialSwap.materialIndex >= 0 && levelMaterialSwap.materialIndex < sharedMaterials.Length) { sharedMaterials[levelMaterialSwap.materialIndex] = val; ((Renderer)levelMaterialSwap.targetRenderer).sharedMaterials = sharedMaterials; } } } if (level2EyeEffects == null) { return; } GameObject[] array2 = level2EyeEffects; foreach (GameObject val2 in array2) { if ((Object)(object)val2 != (Object)null) { val2.SetActive(level >= 2); } } } public override void Start() { //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); Level1TPCooldown = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Level 1: Teleport cooldown").Value; consumeDuration = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Levels 1-3: Consume blood duration").Value; grannyAttackCooldownThreshold = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Levels 1-3: Granny stab attack cooldown").Value; explosionThreshold = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Level 3: Player explosion timer").Value; geyserCooldownThreshold = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Levels 2: Geyser ability cooldown").Value; Level2TPCooldown = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Level 2: Teleport cooldown").Value; Level3TPCooldown = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Level 3: Teleport cooldown").Value; Level1ConsumeReq = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Level 1: Blood Consumption level up requirement").Value; Level2ConsumeReq = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Level 2: Blood Consumption level up requirement").Value; Level3ConsumeReq = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Level 3: Blood Consumption level up requirement").Value; canUseEnemyBlood = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Levels 1-3: Level up on enemy blood").Value; canUsePlayerBlood = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Levels 1-3: Level up on player damage blood").Value; canMonstGoOutside = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Level 4: Can monster go outside?").Value; canGrannyGoOutside = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Levels 1-3: Consume outside blood").Value; granny1to2base = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Levels 1-2: Granny base speed").Value; granny3base = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Level 3: Speed of granny").Value; monsterBaseSpeed = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Level 4: Base monster speed").Value; monsterMaxSpeed = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Level 4: Max monster speed").Value; limbHealth = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Levels 1-3: Limb health").Value; limbRegenDuration = ((AssetBundleLoader)(object)ContentHandler.Instance.bwAssets).GetConfig("Levels 1-3: Limb regeneration duration").Value; if ((Object)(object)monsterModelContainer != (Object)null) { monsterAnimators = monsterModelContainer.GetComponentsInChildren(true); } base.updatePositionThreshold = 0.5f; ApplyLevelMaterials(CurrentLevel); if ((Object)(object)footprintPrefab != (Object)null) { footprintPool = (GameObject[])(object)new GameObject[maxFootprints]; footprintTimers = new float[maxFootprints]; for (int i = 0; i < maxFootprints; i++) { GameObject val = Object.Instantiate(footprintPrefab, Vector3.zero, Quaternion.identity); val.transform.SetParent((Transform)null, true); val.SetActive(false); footprintPool[i] = val; footprintTimers[i] = 0f; } } bloodSearchTimer = 2f; base.currentBehaviourStateIndex = 1; boil2DAudioSource = ((Component)this).gameObject.AddComponent(); boil2DAudioSource.clip = boilTarget2DSFX; enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex); List list = new List(); if (skin != null) { SkinnedMeshRenderer[] array = skin; foreach (SkinnedMeshRenderer val2 in array) { if ((Object)(object)val2 != (Object)null) { list.AddRange(((Renderer)val2).materials); } } } if (!RoundManager.Instance.hasInitializedLevelRandomSeed) { RoundManager.Instance.InitializeRandomNumberGenerators(); } ((EnemyAI)this).GetAINodes(); outsideNodes = GameObject.FindGameObjectsWithTag("OutsideAINode"); if (removableLimbs != null) { limbRegenTimers = new float[removableLimbs.Length]; isLimbDetached = new bool[removableLimbs.Length]; } } public void SyncStateSafely(int newStateIndex) { if (((NetworkBehaviour)this).IsServer) { SyncStateSafelyClientRpc(newStateIndex); } else { SyncStateSafelyServerRpc(newStateIndex); } } [ServerRpc(RequireOwnership = false)] private void SyncStateSafelyServerRpc(int newStateIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(928502956u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, newStateIndex); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 928502956u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SyncStateSafelyClientRpc(newStateIndex); } } } [ClientRpc] private void SyncStateSafelyClientRpc(int newStateIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(632903206u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, newStateIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 632903206u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LogIfDebugBuild($"State changed from {(State)base.currentBehaviourStateIndex} to {(State)newStateIndex}"); base.currentBehaviourStateIndex = newStateIndex; } } } private void HandleMonsterSpeed() { //IL_0121: 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_0131: 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_016a: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsServer && (Object)(object)base.agent != (Object)null && base.agent.isOnNavMesh && !isPausedAfterAttack && !isCurrentlyTransforming) { if ((Object)(object)base.targetPlayer != (Object)null && hasLOS) { currentMonsterSpeed += Time.deltaTime * 2.5f; base.agent.acceleration = Mathf.MoveTowards(base.agent.acceleration, 35f, Time.deltaTime * 5f); } else { currentMonsterSpeed -= Time.deltaTime * 4f; base.agent.acceleration = Mathf.MoveTowards(base.agent.acceleration, 10f, Time.deltaTime * 8f); } currentMonsterSpeed = Mathf.Clamp(currentMonsterSpeed, (float)monsterBaseSpeed, (float)monsterMaxSpeed); base.agent.speed = currentMonsterSpeed; } Vector3 val = ((Component)this).transform.position - previousPosition; float num = ((Vector3)(ref val)).magnitude / Time.deltaTime; averageVelocity = Mathf.Lerp(averageVelocity, num, Time.deltaTime * 10f); previousPosition = ((Component)this).transform.position; float num2 = Mathf.Clamp(averageVelocity / 4.5f, 0.5f, 4f); if ((Object)(object)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetFloat("monsterSpeedMult", num2); } if (monsterAnimators != null) { Animator[] array = monsterAnimators; foreach (Animator val2 in array) { val2.SetFloat("monsterSpeedMult", num2); } } } private void HandleFootprints() { //IL_00ff: 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_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: 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_0131: 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_011b: 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) if (footprintPool != null && footprintTimers != null) { for (int i = 0; i < footprintPool.Length; i++) { if (footprintTimers[i] > 0f) { footprintTimers[i] -= Time.deltaTime; if (footprintTimers[i] <= 0f && (Object)(object)footprintPool[i] != (Object)null) { footprintPool[i].SetActive(false); } } } } if (activeFootprintTimer > 0f) { activeFootprintTimer -= Time.deltaTime; } if (activeFootprintTimer > 0f && !base.isEnemyDead && !isCurrentlyTransforming && !isConsumingBlood && footprintPool != null && footprintPool.Length != 0) { if (previousFootprintPosition == Vector3.zero) { previousFootprintPosition = ((Component)this).transform.position; } float num = Vector3.Distance(((Component)this).transform.position, previousFootprintPosition); accumulatedFootprintDistance += num; previousFootprintPosition = ((Component)this).transform.position; if (accumulatedFootprintDistance >= footprintDistanceThreshold) { accumulatedFootprintDistance = 0f; SpawnFootprint(); } } else if (!isConsumingBlood) { previousFootprintPosition = ((Component)this).transform.position; } } private void HandleLimbRegeneration() { if (removableLimbs == null) { return; } for (int i = 0; i < removableLimbs.Length; i++) { if (!isLimbDetached[i]) { continue; } limbRegenTimers[i] -= Time.deltaTime; if (limbRegenTimers[i] <= 0f) { isLimbDetached[i] = false; if (i == 0 && (Object)(object)bloodOrb != (Object)null) { bloodOrb.SetActive(true); } if (i == 1 && (Object)(object)dagger != (Object)null) { dagger.SetActive(true); } if (i == 2 && CurrentLevel >= 2 && level2EyeEffects != null) { GameObject[] array = level2EyeEffects; foreach (GameObject val in array) { if ((Object)(object)val != (Object)null) { val.SetActive(true); } } } if (removableLimbs[i] != null && removableLimbs[i].renderers != null) { SetLimbVisibility(i, 1f); } } else if (removableLimbs[i] != null && removableLimbs[i].renderers != null) { float progress = ((limbRegenDuration > 0f) ? (1f - limbRegenTimers[i] / limbRegenDuration) : 1f); SetLimbVisibility(i, progress); } } } public override void DoAIInterval() { //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: 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_0220: 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_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0793: Unknown result type (might be due to invalid IL or missing references) //IL_076e: Unknown result type (might be due to invalid IL or missing references) //IL_077e: Unknown result type (might be due to invalid IL or missing references) //IL_0663: 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_067b: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_0650: Unknown result type (might be due to invalid IL or missing references) //IL_062b: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_0847: Unknown result type (might be due to invalid IL or missing references) //IL_0853: 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_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead || isCurrentlyTransforming || isPausedAfterAttack || base.stunNormalizedTimer > 0f || isWalkingIntoPortal) { return; } if (!isConsumingBlood) { ((EnemyAI)this).DoAIInterval(); } bool flag = hasLOS; int currentLevel = CurrentLevel; int num = currentLevel - 1; if (base.currentBehaviourStateIndex != num) { LogIfDebugBuild($"Switching state from {base.currentBehaviourStateIndex} to {num} (Level {currentLevel})"); SyncStateSafely(num); if (currentLevel == 4 && !hasStartedTransformation) { hasStartedTransformation = true; canTeleport = false; TriggerTransformationClientRpc(); } else if (currentLevel < 4) { if ((Object)(object)grannyModelContainer != (Object)null) { grannyModelContainer.SetActive(true); } if ((Object)(object)monsterModelContainer != (Object)null) { monsterModelContainer.SetActive(false); } } } if (isConsumingBlood) { return; } if (((NetworkBehaviour)this).IsServer && (Object)(object)base.agent != (Object)null) { switch ((State)base.currentBehaviourStateIndex) { case State.GrannyLevel1: case State.GrannyLevel2: base.agent.speed = granny1to2base; break; case State.GrannyLevel3: base.agent.speed = granny3base; break; } } if ((Object)(object)base.targetPlayer != (Object)null && !isConsumingBlood) { if (currentLevel == 4 && base.targetPlayer.isInsideFactory == base.isOutside) { base.movingTowardsTargetPlayer = false; EntranceTeleport closestDoorToMonster = GetClosestDoorToMonster(); if (!((Object)(object)closestDoorToMonster != (Object)null)) { return; } ((EnemyAI)this).SetDestinationToPosition(((Component)closestDoorToMonster).transform.position, false); if (Vector3.Distance(((Component)this).transform.position, ((Component)closestDoorToMonster).transform.position) < 4f && doorTransitionCooldown <= 0f) { EntranceTeleport correspondingDoor = GetCorrespondingDoor(closestDoorToMonster); if ((Object)(object)correspondingDoor != (Object)null) { doorTransitionCooldown = 3f; TeleportEnemyServerRpc(correspondingDoor.entrancePoint.position, !base.isOutside); } } return; } if (((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer.gameplayCamera).transform.position, 120f, 60, -1f, (Transform)null)) { hasLOS = true; lastPosition = ((Component)base.targetPlayer).transform.position; if (base.currentSearch != null && base.currentSearch.inProgress) { ((EnemyAI)this).StopSearch(base.currentSearch, true); } ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); bool flag2 = removableLimbs != null && isLimbDetached != null && isLimbDetached.Length != 0 && isLimbDetached[0]; if (currentLevel == 3 && !flag2) { if (explosionTimer <= 0f && (Object)(object)base.creatureAnimator != (Object)null) { LogIfDebugBuild("Started boiling player " + base.targetPlayer.playerUsername); SyncBoilingAnimationClientRpc(isBoiling: true, exploded: false); } explosionTimer += base.AIIntervalTime; SyncBoilTargetClientRpc((int)base.targetPlayer.playerClientId, explosionTimer); if (explosionTimer >= explosionThreshold) { LogIfDebugBuild("Started boiling player " + base.targetPlayer.playerUsername); SyncBoilingAnimationClientRpc(isBoiling: true, exploded: false); base.targetPlayer.isSinking = false; } if (explosionTimer >= explosionThreshold) { LogIfDebugBuild("Exploding player " + base.targetPlayer.playerUsername); ExplodePlayer(base.targetPlayer); base.targetPlayer = null; explosionTimer = 0f; SyncBoilingAnimationClientRpc(isBoiling: false, exploded: true); SyncBoilTargetClientRpc(-1, 0f); } } else if (currentLevel == 2 && !flag2 && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < 15f && geyserCooldown <= 0f) { LogIfDebugBuild("Casting Geyser on player " + base.targetPlayer.playerUsername); CastBloodGeyser(base.targetPlayer); geyserCooldown = geyserCooldownThreshold; } if (flag2 && explosionTimer > 0f) { explosionTimer = 0f; SyncBoilingAnimationClientRpc(isBoiling: false, exploded: false); SyncBoilTargetClientRpc(-1, 0f); } } else { if (hasLOS) { LogIfDebugBuild("Lost Line of Sight to target player."); } hasLOS = false; if (explosionTimer > 0f) { explosionTimer = 0f; SyncBoilingAnimationClientRpc(isBoiling: false, exploded: false); SyncBoilTargetClientRpc(-1, 0f); } explosionTimer = 0f; if (chaseTimer <= 0f) { base.targetPlayer = null; if (base.currentSearch == null || !base.currentSearch.inProgress) { if (base.isOutside) { ((EnemyAI)this).StartSearch(((EnemyAI)this).ChooseFarthestNodeFromPosition(((Component)this).transform.position, false, 0, false, 50, -1).position, (AISearchRoutine)null); } else { ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); } } } else { ((EnemyAI)this).SetDestinationToPosition(lastPosition, false); if (Vector3.Distance(((Component)this).transform.position, lastPosition) <= 2f) { chaseTimer = 0f; } } } } else { hasLOS = false; explosionTimer = 0f; if (((EnemyAI)this).TargetClosestPlayer(5f, true, 120f, false, false, true)) { hasLOS = true; chaseTimer = 10f; lastPosition = ((Component)base.targetPlayer).transform.position; if (base.currentSearch != null && base.currentSearch.inProgress) { ((EnemyAI)this).StopSearch(base.currentSearch, true); } ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); } else if (base.currentSearch == null || !base.currentSearch.inProgress) { if (base.isOutside) { ((EnemyAI)this).StartSearch(((EnemyAI)this).ChooseFarthestNodeFromPosition(((Component)this).transform.position, false, 0, false, 50, -1).position, (AISearchRoutine)null); } else { ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); } } if (currentLevel == 4 && monsterSeePlayerCooldown <= 0f && Random.Range(0, 100) < 1) { monsterSeePlayerCooldown = 15f; if (((NetworkBehaviour)this).IsServer) { PlayMonsterSeePlayerSFXClientRpc(); } } if (((currentLevel == 4 && canMonstGoOutside) || (currentLevel < 4 && canGrannyGoOutside)) && doorTransitionCooldown <= 0f) { EntranceTeleport closestDoorToMonster2 = GetClosestDoorToMonster(); if ((Object)(object)closestDoorToMonster2 != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)closestDoorToMonster2).transform.position) < 4f) { if (Random.Range(0, 100) < 30) { EntranceTeleport correspondingDoor2 = GetCorrespondingDoor(closestDoorToMonster2); if ((Object)(object)correspondingDoor2 != (Object)null) { doorTransitionCooldown = 15f; TeleportEnemyServerRpc(correspondingDoor2.entrancePoint.position, !base.isOutside); } } else { doorTransitionCooldown = 5f; } } } } if (!flag && hasLOS && CurrentLevel == 4 && monsterSeePlayerCooldown <= 0f) { monsterSeePlayerCooldown = 5f; if (((NetworkBehaviour)this).IsServer) { PlayMonsterSeePlayerSFXClientRpc(); } } } public override void Update() { //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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_0279: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0380: 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_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_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_050f: 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) //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (((NetworkBehaviour)this).IsServer && (Object)(object)StartOfRound.Instance != (Object)null && StartOfRound.Instance.allPlayerScripts != null) { PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if ((Object)(object)val != (Object)null && !val.isPlayerDead) { if (!previousPlayerHealths.ContainsKey(val.playerClientId)) { previousPlayerHealths[val.playerClientId] = val.health; } else if (val.health < previousPlayerHealths[val.playerClientId]) { Vector3 onUnitSphere = Random.onUnitSphere; onUnitSphere.y = Mathf.Abs(onUnitSphere.y); val.DropBlood(onUnitSphere, true, false); PlayerBloodPatch.SpawnPersistentBlood(val); previousPlayerHealths[val.playerClientId] = val.health; } else if (val.health > previousPlayerHealths[val.playerClientId]) { previousPlayerHealths[val.playerClientId] = val.health; } } else if ((Object)(object)val != (Object)null && val.isPlayerDead) { previousPlayerHealths[val.playerClientId] = 100; } } } if ((Object)(object)StartOfRound.Instance != (Object)null && StartOfRound.Instance.shipIsLeaving && !isShipLeavingHandled) { isShipLeavingHandled = true; HandleShipLeft(); } if (base.isEnemyDead) { return; } if (base.stunNormalizedTimer > 0f) { if ((Object)(object)base.creatureAnimator != (Object)null && !base.creatureAnimator.GetBool("hasBeenStunned")) { base.creatureAnimator.SetBool("hasBeenStunned", true); } if (((NetworkBehaviour)this).IsServer && (Object)(object)base.agent != (Object)null && base.agent.isOnNavMesh) { base.agent.isStopped = true; base.agent.velocity = Vector3.zero; } return; } if ((Object)(object)base.creatureAnimator != (Object)null && base.creatureAnimator.GetBool("hasBeenStunned")) { base.creatureAnimator.SetBool("hasBeenStunned", false); if (((NetworkBehaviour)this).IsServer && (Object)(object)base.agent != (Object)null && base.agent.isOnNavMesh) { base.agent.isStopped = false; } } if (isWalkingIntoPortal) { return; } if (doorTransitionCooldown > 0f) { doorTransitionCooldown -= Time.deltaTime; } if (monsterSeePlayerCooldown > 0f) { monsterSeePlayerCooldown -= Time.deltaTime; } if ((Object)(object)base.targetPlayer != (Object)null) { targetPlayerVelocity = (((Component)base.targetPlayer).transform.position - targetPlayerLastPos) / Time.deltaTime; targetPlayerLastPos = ((Component)base.targetPlayer).transform.position; } if (hasTeleported) { LogIfDebugBuild("Processing hasTeleported and starting consumption."); hasTeleported = false; if (consumeCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(consumeCoroutine); } consumeCoroutine = ((MonoBehaviour)this).StartCoroutine(TeleportThenConsumeRoutine()); } if (base.currentBehaviourStateIndex == 3) { HandleMonsterSpeed(); } timeSinceLastAttack += Time.deltaTime; chosenBloodTimer -= Time.deltaTime; if (!isConsumingBlood && !isWalkingIntoPortal && !isCurrentlyTransforming) { teleportCooldownTimer -= Time.deltaTime; } geyserCooldown -= Time.deltaTime; laughCooldown -= Time.deltaTime; if (!base.isEnemyDead && (Object)(object)base.agent != (Object)null && base.agent.isOnNavMesh && base.currentBehaviourStateIndex != 3 && !isWalkingIntoPortal) { base.agent.speed = 3.5f; } HandleFootprints(); if (isConsumingBlood) { base.movingTowardsTargetPlayer = false; base.targetPlayer = null; ((Component)this).transform.position = consumptionLockPosition; base.serverPosition = consumptionLockPosition; if (((NetworkBehaviour)this).IsServer && (Object)(object)base.agent != (Object)null && base.agent.isOnNavMesh) { base.agent.isStopped = true; base.agent.velocity = Vector3.zero; } return; } HandleLimbRegeneration(); bool flag = removableLimbs != null && isLimbDetached != null && isLimbDetached.Length != 0 && isLimbDetached[0]; if (!((NetworkBehaviour)this).IsServer || !canTeleport || !(teleportCooldownTimer <= 0f) || isConsumingBlood || !(explosionTimer <= 0f) || CurrentLevel >= 4 || flag) { return; } if (bloodTargetWaitTimer > 0f) { bloodTargetWaitTimer -= Time.deltaTime; } bloodSearchTimer -= Time.deltaTime; if (!(bloodSearchTimer <= 0f)) { return; } bloodSearchTimer = 2f; if ((Object)(object)currentBloodTarget == (Object)null || !((Component)currentBloodTarget).gameObject.activeInHierarchy) { Transform val2 = FindBestBloodSource(); if ((Object)(object)val2 != (Object)null && (Object)(object)val2 != (Object)(object)currentBloodTarget) { currentBloodTarget = val2; bloodTargetWaitTimer = 3f; } } if ((Object)(object)currentBloodTarget != (Object)null && bloodTargetWaitTimer <= 0f) { FindNodeNearestToBlood(currentBloodTarget.position); } } private IEnumerator TeleportThenConsumeRoutine() { isConsumingBlood = true; base.movingTowardsTargetPlayer = false; if (((NetworkBehaviour)this).IsServer) { if (base.currentSearch != null && base.currentSearch.inProgress) { ((EnemyAI)this).StopSearch(base.currentSearch, true); } ((EnemyAI)this).SetDestinationToPosition(((Component)this).transform.position, false); if ((Object)(object)base.agent != (Object)null) { base.agent.speed = 0f; base.agent.velocity = Vector3.zero; if (base.agent.isOnNavMesh) { base.agent.isStopped = true; base.agent.ResetPath(); } } } yield return (object)new WaitForSeconds(0.1f); if ((Object)(object)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetBool("isConsuming", true); } if ((Object)(object)consumeBloodSFX != (Object)null && (Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.PlayOneShot(consumeBloodSFX); } yield return (object)new WaitForSeconds(consumeDuration - 0.2f); if (!isConsumingBlood) { yield break; } activeFootprintTimer = 20f; int tempBlood = bloodConsumed; tempBlood++; if (tempBlood < 9) { isConsumingBlood = false; if ((Object)(object)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetBool("isConsuming", false); } if (((NetworkBehaviour)this).IsServer && (Object)(object)base.agent != (Object)null && base.agent.isOnNavMesh) { base.agent.isStopped = false; } } else { isWaitingForLevelUp = true; } ((MonoBehaviour)this).StartCoroutine(DelayedConsumeBlood(0.5f)); if ((Object)(object)currentBloodTarget != (Object)null && !consumedBloodTargets.Contains(currentBloodTarget)) { consumedBloodTargets.Add(currentBloodTarget); currentBloodTarget = null; } } private Transform FindBestBloodSource() { //IL_0025: 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_02d9: Unknown result type (might be due to invalid IL or missing references) Transform bestSource = null; float closestSqrDistance = float.MaxValue; Vector3 myPos = ((Component)this).transform.position; LogIfDebugBuild("FindBestBloodSource: Searching for blood sources..."); bool canGoOutside = (CurrentLevel < 4 && canGrannyGoOutside) || (CurrentLevel == 4 && canMonstGoOutside); if ((Object)(object)StartOfRound.Instance != (Object)null && StartOfRound.Instance.allPlayerScripts != null) { PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if ((Object)(object)val != (Object)null && val.playerBloodPooledObjects != null) { foreach (GameObject playerBloodPooledObject in val.playerBloodPooledObjects) { if ((Object)(object)playerBloodPooledObject != (Object)null) { CheckSource(playerBloodPooledObject.transform); } } } if ((Object)(object)val != (Object)null && val.isPlayerDead && (Object)(object)val.deadBody != (Object)null) { CheckSource(((Component)val.deadBody).transform); } } } if (EnemyBloodPatch.enemyBloodDrops != null) { foreach (GameObject enemyBloodDrop in EnemyBloodPatch.enemyBloodDrops) { if (!((Object)(object)enemyBloodDrop == (Object)null)) { if (((Object)enemyBloodDrop).name.StartsWith("PlayerPersistentBloodDrop")) { CheckSource(enemyBloodDrop.transform); } else if (((Object)enemyBloodDrop).name.StartsWith("EnemyBloodDrop")) { CheckSource(enemyBloodDrop.transform); } } } } if (canUseEnemyBlood && (Object)(object)RoundManager.Instance != (Object)null && RoundManager.Instance.SpawnedEnemies != null) { foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { if ((Object)(object)spawnedEnemy != (Object)null && (Object)(object)spawnedEnemy != (Object)(object)this && spawnedEnemy.isEnemyDead) { CheckSource(((Component)spawnedEnemy).transform); } } } if ((Object)(object)bestSource != (Object)null) { LogIfDebugBuild($"FindBestBloodSource: Found best source at {bestSource.position} with squared distance {closestSqrDistance}"); } else { LogIfDebugBuild("FindBestBloodSource: No valid blood sources found."); } return bestSource; void CheckSource(Transform source) { //IL_003c: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)source == (Object)null) && ((Component)source).gameObject.activeInHierarchy && !consumedBloodTargets.Contains(source) && (canGoOutside || !IsPositionOutside(source.position))) { Vector3 val2 = myPos - source.position; float sqrMagnitude = ((Vector3)(ref val2)).sqrMagnitude; if (sqrMagnitude < closestSqrDistance) { closestSqrDistance = sqrMagnitude; bestSource = source; } } } static bool IsPositionOutside(Vector3 pos) { //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_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_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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)RoundManager.Instance == (Object)null) { return false; } float num = float.MaxValue; float num2 = float.MaxValue; Vector3 val3; if (RoundManager.Instance.insideAINodes != null) { GameObject[] insideAINodes = RoundManager.Instance.insideAINodes; foreach (GameObject val2 in insideAINodes) { if ((Object)(object)val2 != (Object)null) { val3 = val2.transform.position - pos; float sqrMagnitude = ((Vector3)(ref val3)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; } } } } if (RoundManager.Instance.outsideAINodes != null) { GameObject[] outsideAINodes = RoundManager.Instance.outsideAINodes; foreach (GameObject val4 in outsideAINodes) { if ((Object)(object)val4 != (Object)null) { val3 = val4.transform.position - pos; float sqrMagnitude2 = ((Vector3)(ref val3)).sqrMagnitude; if (sqrMagnitude2 < num2) { num2 = sqrMagnitude2; } } } } return num2 < num; } } private void FindNodeNearestToBlood(Vector3 bloodLocation) { //IL_0210: 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_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_021d: 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_007d: 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_0234: 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_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0270: 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_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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) if (!canTeleport) { return; } GameObject val = null; float num = float.MaxValue; bool setOutside = false; Vector3 val3; if ((Object)(object)RoundManager.Instance != (Object)null) { if (RoundManager.Instance.insideAINodes != null) { GameObject[] insideAINodes = RoundManager.Instance.insideAINodes; foreach (GameObject val2 in insideAINodes) { if (!((Object)(object)val2 == (Object)null)) { val3 = val2.transform.position - bloodLocation; float sqrMagnitude = ((Vector3)(ref val3)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; val = val2; setOutside = false; } } } } if (((CurrentLevel < 4 && canGrannyGoOutside) || (CurrentLevel == 4 && canMonstGoOutside)) && RoundManager.Instance.outsideAINodes != null) { GameObject[] outsideAINodes = RoundManager.Instance.outsideAINodes; foreach (GameObject val4 in outsideAINodes) { if (!((Object)(object)val4 == (Object)null)) { val3 = val4.transform.position - bloodLocation; float sqrMagnitude2 = ((Vector3)(ref val3)).sqrMagnitude; if (sqrMagnitude2 < num) { num = sqrMagnitude2; val = val4; setOutside = true; } } } } } if ((Object)(object)val == (Object)null && base.allAINodes != null) { GameObject[] allAINodes = base.allAINodes; foreach (GameObject val5 in allAINodes) { if (!((Object)(object)val5 == (Object)null)) { val3 = val5.transform.position - bloodLocation; float sqrMagnitude3 = ((Vector3)(ref val3)).sqrMagnitude; if (sqrMagnitude3 < num) { num = sqrMagnitude3; val = val5; setOutside = base.isOutside; } } } } if ((Object)(object)val != (Object)null) { ResetTeleportCooldown(CurrentLevel); chosenTeleportNode = val.transform.position; Vector3 val6 = bloodLocation; NavMeshHit val7 = default(NavMeshHit); if (NavMesh.SamplePosition(bloodLocation, ref val7, 3f, -1)) { val6 = ((NavMeshHit)(ref val7)).position; NavMeshHit val8 = default(NavMeshHit); if ((Object)(object)val != (Object)null && NavMesh.Raycast(val.transform.position, val6, ref val8, -1)) { val6 = val.transform.position; } } else if ((Object)(object)val != (Object)null) { LogIfDebugBuild("Blood not on navmesh, chosing another spot"); val6 = val.transform.position; } LogIfDebugBuild($"Found closest node at {num} squared units. Teleporting ontop of blood."); if (((NetworkBehaviour)this).IsServer) { if (portalCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(portalCoroutine); } portalCoroutine = ((MonoBehaviour)this).StartCoroutine(PortalSequenceRoutine(val6, setOutside)); } else { TeleportBWServerRpc(val6, setOutside); } } else { LogIfDebugBuild("No AI nodes found at all. Teleport cancelled"); } } [ClientRpc] public void SpawnEntrancePortalClientRpc(Vector3 position, Quaternion rotation) { //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_00f9: 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) 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(137346814u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val)).WriteValueSafe(ref rotation); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 137346814u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)portalPrefab != (Object)null) { entrancePortal = Object.Instantiate(portalPrefab, position, rotation); ParticleSystem[] componentsInChildren = entrancePortal.GetComponentsInChildren(); ParticleSystem[] array = componentsInChildren; foreach (ParticleSystem val3 in array) { val3.Play(); } VisualEffect[] componentsInChildren2 = entrancePortal.GetComponentsInChildren(); VisualEffect[] array2 = componentsInChildren2; foreach (VisualEffect val4 in array2) { val4.Play(); } } if ((Object)(object)portalStartSFX != (Object)null && (Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.PlayOneShot(portalStartSFX); } } [ClientRpc] public void SpawnExitPortalClientRpc(Vector3 position, Quaternion rotation) { //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_00f9: 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) 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(2348840876u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val)).WriteValueSafe(ref rotation); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2348840876u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)portalPrefab != (Object)null) { exitPortal = Object.Instantiate(portalPrefab, position, rotation); ParticleSystem[] componentsInChildren = exitPortal.GetComponentsInChildren(); ParticleSystem[] array = componentsInChildren; foreach (ParticleSystem val3 in array) { val3.Play(); } VisualEffect[] componentsInChildren2 = exitPortal.GetComponentsInChildren(); VisualEffect[] array2 = componentsInChildren2; foreach (VisualEffect val4 in array2) { val4.Play(); } } } [ClientRpc] public void ClosePortalsClientRpc() { //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(3985111250u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3985111250u, 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)portalCloseSFX != (Object)null && (Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.PlayOneShot(portalCloseSFX); } if ((Object)(object)entrancePortal != (Object)null) { Object.Destroy((Object)(object)entrancePortal); } if ((Object)(object)exitPortal != (Object)null) { Object.Destroy((Object)(object)exitPortal); } } } [ClientRpc] public void CancelInterruptibleActionsClientRpc() { //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(2103324487u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2103324487u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (isWalkingIntoPortal) { isWalkingIntoPortal = false; if (portalCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(portalCoroutine); } if ((Object)(object)entrancePortal != (Object)null) { Object.Destroy((Object)(object)entrancePortal); } if ((Object)(object)exitPortal != (Object)null) { Object.Destroy((Object)(object)exitPortal); } } if (isConsumingBlood) { isConsumingBlood = false; if (consumeCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(consumeCoroutine); } } if ((Object)(object)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetBool("isConsuming", false); } if ((Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.Stop(); } } private IEnumerator PortalSequenceRoutine(Vector3 bloodLocation, bool setOutside) { //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) isWalkingIntoPortal = true; base.movingTowardsTargetPlayer = false; if (base.currentSearch != null && base.currentSearch.inProgress) { ((EnemyAI)this).StopSearch(base.currentSearch, true); } Vector3 entrancePos = ((Component)this).transform.position + ((Component)this).transform.forward * 1.5f; entrancePos.y += 2f; SpawnEntrancePortalClientRpc(entrancePos, ((Component)this).transform.rotation); Quaternion exitRot = Quaternion.Euler(90f, 0f, 0f); SpawnExitPortalClientRpc(bloodLocation, exitRot); float t = 0f; if ((Object)(object)base.agent != (Object)null && base.agent.isOnNavMesh) { base.agent.isStopped = false; base.agent.SetDestination(entrancePos); base.agent.speed = 3f; } while (t < 1f) { t += Time.deltaTime; yield return null; } TeleportBWClientRpc(bloodLocation, setOutside); isWalkingIntoPortal = false; yield return (object)new WaitForSeconds(2f); ClosePortalsClientRpc(); } private void TeleportBloodWitch(Vector3 bloodLocation, bool setOutside) { //IL_006c: 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_00b4: 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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) base.movingTowardsTargetPlayer = false; if (base.currentSearch != null && base.currentSearch.inProgress) { ((EnemyAI)this).StopSearch(base.currentSearch, true); } if (base.isOutside != setOutside) { ((EnemyAI)this).SetEnemyOutside(setOutside); } if (((NetworkBehaviour)this).IsServer && (Object)(object)base.agent != (Object)null) { base.agent.Warp(bloodLocation); base.agent.isStopped = true; base.agent.ResetPath(); base.agent.velocity = Vector3.zero; } else if (!((NetworkBehaviour)this).IsServer) { ((Component)this).transform.position = bloodLocation; } if ((Object)(object)teleportSFX != (Object)null && (Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.PlayOneShot(teleportSFX); } base.serverPosition = bloodLocation; consumptionLockPosition = bloodLocation; } [ServerRpc(RequireOwnership = false)] public void TeleportBWServerRpc(Vector3 bloodLocation, bool setOutside) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_010c: 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(2800373253u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref bloodLocation); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setOutside, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2800373253u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (portalCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(portalCoroutine); } portalCoroutine = ((MonoBehaviour)this).StartCoroutine(PortalSequenceRoutine(bloodLocation, setOutside)); } } [ServerRpc(RequireOwnership = false)] public void AddBloodSourceServerRpc(Vector3 bloodPosition, string playerUsername) { //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_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_010c: 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_0123: Expected O, but got Unknown //IL_0129: 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) 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(2747021489u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref bloodPosition); bool flag = playerUsername != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(playerUsername, false); } ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2747021489u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; GameObject val3 = new GameObject("PlayerPersistentBloodDrop_" + playerUsername); val3.transform.position = bloodPosition; EnemyBloodPatch.enemyBloodDrops.Add(val3); Object.Destroy((Object)(object)val3, 60f); } } [ClientRpc] public void TeleportBWClientRpc(Vector3 bloodLocation, bool setOutside) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2755236353u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref bloodLocation); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setOutside, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2755236353u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TeleportBloodWitch(bloodLocation, setOutside); hasTeleported = true; } } } private IEnumerator TransformationRoutine() { isConsumingBlood = false; isWaitingForLevelUp = false; isCurrentlyTransforming = true; if ((Object)(object)base.agent != (Object)null) { base.agent.speed = 0f; if (base.agent.isOnNavMesh) { base.agent.isStopped = true; } } if ((Object)(object)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetBool("isConsuming", false); base.creatureAnimator.SetBool("isTransforming", true); } if ((Object)(object)transformationSFX != (Object)null && (Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.PlayOneShot(transformationSFX); } if ((Object)(object)transformationSFXDistant != (Object)null && (Object)(object)distantScreamAudioSource != (Object)null) { distantScreamAudioSource.clip = transformationSFXDistant; distantScreamAudioSource.Play(); } yield return (object)new WaitForSeconds(3f); if ((Object)(object)BloodSpurtParticleBackL != (Object)null) { BloodSpurtParticleBackL.Play(); } if ((Object)(object)BloodSpurtParticleBackR != (Object)null) { BloodSpurtParticleBackR.Play(); } yield return (object)new WaitForSeconds(3f); if ((Object)(object)grannyModelContainer != (Object)null) { grannyModelContainer.SetActive(false); } if ((Object)(object)monsterModelContainer != (Object)null) { monsterModelContainer.SetActive(true); } if (((NetworkBehaviour)this).IsServer && (Object)(object)base.agent != (Object)null) { if (base.agent.isOnNavMesh) { base.agent.isStopped = false; } base.agent.speed = 4f; base.agent.acceleration = 2f; } if ((Object)(object)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetBool("isTransforming", false); } isCurrentlyTransforming = false; } private IEnumerator DelayedConsumeBlood(float delay) { yield return (object)new WaitForSeconds(delay); ConsumeBlood(); } public void ConsumeBlood() { if (((NetworkBehaviour)this).IsServer) { int currentLevel = CurrentLevel; bloodConsumed++; int currentLevel2 = CurrentLevel; ConsumeBloodClientRpc(bloodConsumed, currentLevel, currentLevel2); ResetTeleportCooldown(currentLevel2); } } private void ResetTeleportCooldown(int level) { switch (level) { case 3: teleportCooldownTimer = Level3TPCooldown; break; case 2: teleportCooldownTimer = Level2TPCooldown; break; default: teleportCooldownTimer = Level1TPCooldown; break; } } [ClientRpc] public void ConsumeBloodClientRpc(int newBloodCount, int oldLevel, int newLevel) { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3612684352u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, newBloodCount); BytePacker.WriteValueBitPacked(val, oldLevel); BytePacker.WriteValueBitPacked(val, newLevel); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3612684352u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; bloodConsumed = newBloodCount; LogIfDebugBuild($"Consumed blood! Level is now: {CurrentLevel}"); if (newLevel > oldLevel) { ApplyLevelMaterials(newLevel); } if (newLevel > oldLevel && newLevel < 4 && levelUpScreams != null && levelUpScreams.Length != 0 && (Object)(object)screamAudioSource != (Object)null) { int num = Random.Range(0, levelUpScreams.Length); screamAudioSource.PlayOneShot(levelUpScreams[num]); if (levelUpScreamsDistant != null && levelUpScreamsDistant.Length > num && (Object)(object)distantScreamAudioSource != (Object)null) { distantScreamAudioSource.clip = levelUpScreamsDistant[num]; distantScreamAudioSource.Play(); } } } public void CastBloodGeyser(PlayerControllerB player) { //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_00cd: 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_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_00ed: 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_00f0: 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_00b7: 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_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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_0167: 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_0108: 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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: 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_0163: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsServer || (CurrentLevel < 4 && removableLimbs != null && isLimbDetached != null && isLimbDetached.Length != 0 && isLimbDetached[0])) { return; } LogIfDebugBuild("Casting blood geyser on " + player.playerUsername); SyncGeyserAnimationClientRpc(); Vector3 position = ((Component)player).transform.position; if ((Object)(object)player == (Object)(object)base.targetPlayer) { Vector3 val = targetPlayerVelocity; if (((Vector3)(ref val)).magnitude > 10f) { val = ((Vector3)(ref val)).normalized * 10f; } position += val * 1.5f; } else { position += ((Component)player.playerBodyAnimator).transform.forward * 2f; } Transform val2 = ((EnemyAI)this).ChooseClosestNodeToPosition(position, false, 0); if ((Object)(object)val2 != (Object)null) { if (Vector3.Distance(val2.position, ((Component)player).transform.position) <= 10f) { position = val2.position; } else { Transform val3 = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)player).transform.position, false, 0); if ((Object)(object)val3 != (Object)null) { position = val3.position; } } } SpawnGeyserWarningClientRpc(position); ((MonoBehaviour)this).StartCoroutine(GeyserAttackDelay(position)); } [ClientRpc] public void SyncGeyserAnimationClientRpc() { //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(1271143743u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1271143743u, 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)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetTrigger("useGeyser"); } } } [ServerRpc(RequireOwnership = false)] public void SpawnGeyserWarningServerRpc(Vector3 position) { //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) 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(114578014u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 114578014u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SpawnGeyserWarningClientRpc(position); } } } [ClientRpc] public void SpawnGeyserWarningClientRpc(Vector3 position) { //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_00ec: 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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4007448664u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4007448664u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)geyserPrefab != (Object)null)) { return; } currentActiveGeyser = Object.Instantiate(geyserPrefab, position, Quaternion.identity); Transform val3 = currentActiveGeyser.transform.Find("Warning"); if ((Object)(object)val3 != (Object)null) { AudioSource component = ((Component)val3).GetComponent(); if ((Object)(object)component != (Object)null) { component.Play(); } } } private IEnumerator GeyserAttackDelay(Vector3 position) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) yield return (object)new WaitForSeconds(1.5f); SpawnGeyserAttackClientRpc(position); yield return (object)new WaitForSeconds(2f); DestroyGeyserClientRpc(); } [ClientRpc] public void SpawnGeyserAttackClientRpc(Vector3 position) { //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_017a: 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(846989029u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 846989029u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)currentActiveGeyser != (Object)null) { Animator componentInChildren = currentActiveGeyser.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.SetBool("Toggle Geyser", true); } VisualEffect componentInChildren2 = currentActiveGeyser.GetComponentInChildren(); if ((Object)(object)componentInChildren2 != (Object)null) { componentInChildren2.SetBool("Toggle Geyser", true); } Transform val3 = currentActiveGeyser.transform.Find("Cast"); if ((Object)(object)val3 != (Object)null) { AudioSource component = ((Component)val3).GetComponent(); if ((Object)(object)component != (Object)null) { component.Play(); } } } ((MonoBehaviour)this).StartCoroutine(ClientGeyserDamageRoutine(position)); } private IEnumerator ClientGeyserDamageRoutine(Vector3 position) { //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) for (float lingerTimer = 0f; lingerTimer < 2f; lingerTimer += 0.25f) { if ((Object)(object)GameNetworkManager.Instance != (Object)null && (Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)null) { PlayerControllerB localPlayer = GameNetworkManager.Instance.localPlayerController; if (!localPlayer.isPlayerDead && Vector3.Distance(((Component)localPlayer).transform.position, position) <= 3.5f) { localPlayer.DamagePlayer(15, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } } yield return (object)new WaitForSeconds(0.25f); } } [ClientRpc] public void DestroyGeyserClientRpc() { //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(4229153322u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4229153322u, 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)currentActiveGeyser != (Object)null) { Object.Destroy((Object)(object)currentActiveGeyser); currentActiveGeyser = null; } } } public override void SetEnemyStunned(bool setToStunned, float setToStunTime = 1f, PlayerControllerB setStunnedByPlayer = null) { if (CurrentLevel != 4) { float num = Mathf.Min(setToStunTime, 2.5f); ((EnemyAI)this).SetEnemyStunned(setToStunned, num, setStunnedByPlayer); } } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { if (CurrentLevel == 4) { return; } ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (base.isEnemyDead) { return; } if (isWalkingIntoPortal) { isWalkingIntoPortal = false; if (portalCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(portalCoroutine); } if (((NetworkBehaviour)this).IsServer) { ClosePortalsClientRpc(); } } if (isConsumingBlood) { isConsumingBlood = false; if (consumeCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(consumeCoroutine); } if (((NetworkBehaviour)this).IsServer && (Object)(object)base.agent != (Object)null && base.agent.isOnNavMesh) { base.agent.isStopped = false; base.agent.speed = 4f; } } if ((Object)(object)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetBool("isConsuming", false); } if ((Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.Stop(); } if (((NetworkBehaviour)this).IsServer) { CancelInterruptibleActionsClientRpc(); } if ((Object)(object)playerWhoHit != (Object)null && ((NetworkBehaviour)this).IsServer) { base.targetPlayer = playerWhoHit; base.movingTowardsTargetPlayer = true; if (base.currentSearch != null) { ((EnemyAI)this).StopSearch(base.currentSearch, true); } } if (!isLimbDetached[2] && !isLimbDetached[3] && ((NetworkBehaviour)this).IsServer) { PlayHitSFXClientRpc(); } if (!((NetworkBehaviour)this).IsServer || removableLimbs == null) { return; } currentLimbDamage += force; if (currentLimbDamage < limbHealth) { return; } currentLimbDamage = 0; List list = new List(); for (int i = 0; i < isLimbDetached.Length; i++) { if (!isLimbDetached[i]) { list.Add(i); } } if (list.Count <= 0) { return; } List list2 = new List(); if (list.Contains(0) || list.Contains(1)) { if (list.Contains(0)) { list2.Add(0); } if (list.Contains(1)) { list2.Add(1); } } else if (list.Contains(2)) { list2.Add(2); } else if (list.Contains(3)) { list2.Add(3); } int limbIndex = list2[Random.Range(0, list2.Count)]; DetachLimbClientRpc(limbIndex); } [ServerRpc(RequireOwnership = false)] public void DetachLimbServerRpc(int limbIndex) { //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(2863038974u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, limbIndex); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2863038974u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DetachLimbClientRpc(limbIndex); } } } [ClientRpc] public void DetachLimbClientRpc(int limbIndex) { //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_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: 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(221976847u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, limbIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 221976847u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (isLimbDetached[limbIndex]) { return; } isLimbDetached[limbIndex] = true; limbRegenTimers[limbIndex] = limbRegenDuration; if (limbIndex == 0 && (Object)(object)bloodOrb != (Object)null) { bloodOrb.SetActive(false); } if (limbIndex == 1 && (Object)(object)dagger != (Object)null) { dagger.SetActive(false); } switch (limbIndex) { case 0: if ((Object)(object)BloodSpurtParticleArmL != (Object)null) { BloodSpurtParticleArmL.Play(); } break; case 1: if ((Object)(object)BloodSpurtParticleArmR != (Object)null) { BloodSpurtParticleArmR.Play(); } break; case 2: { if ((Object)(object)BloodSpurtParticleHead != (Object)null) { BloodSpurtParticleHead.Play(); } if (level2EyeEffects == null) { break; } GameObject[] array = level2EyeEffects; foreach (GameObject val3 in array) { if ((Object)(object)val3 != (Object)null) { val3.SetActive(false); } } break; } case 3: if ((Object)(object)BloodSpurtParticleBackL != (Object)null) { BloodSpurtParticleBackL.Play(); } if ((Object)(object)BloodSpurtParticleBackR != (Object)null) { BloodSpurtParticleBackR.Play(); } break; } if (removableLimbs[limbIndex] != null && removableLimbs[limbIndex].renderers != null && removableLimbs[limbIndex].renderers.Length != 0) { if (severedLimbPrefabs != null && severedLimbPrefabs.Length > limbIndex && (Object)(object)severedLimbPrefabs[limbIndex] != (Object)null) { Transform transform = ((Component)removableLimbs[limbIndex].renderers[0]).transform; GameObject val4 = Object.Instantiate(severedLimbPrefabs[limbIndex], transform.position, transform.rotation); MeshCollider componentInChildren = val4.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.convex = true; } Rigidbody componentInChildren2 = val4.GetComponentInChildren(); if ((Object)(object)componentInChildren2 != (Object)null) { componentInChildren2.isKinematic = false; componentInChildren2.useGravity = true; } else { LogIfDebugBuild("Warning: Severed limb prefab is missing a Rigidbody!"); } ParticleSystem[] componentsInChildren = val4.GetComponentsInChildren(); ParticleSystem[] array2 = componentsInChildren; foreach (ParticleSystem val5 in array2) { val5.Play(); } VisualEffect[] componentsInChildren2 = val4.GetComponentsInChildren(); VisualEffect[] array3 = componentsInChildren2; foreach (VisualEffect val6 in array3) { val6.Play(); } Object.Destroy((Object)(object)val4, 20f); } SetLimbVisibility(limbIndex, 0f); } bool flag = true; for (int l = 0; l < isLimbDetached.Length; l++) { if (!isLimbDetached[l]) { flag = false; break; } } if (flag) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } public void ExplodePlayer(PlayerControllerB player) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsServer) { LogIfDebugBuild("Exploding player " + player.playerUsername); SpawnBloodExplosionClientRpc((int)player.playerClientId, ((Component)player).transform.position); } } [ServerRpc(RequireOwnership = false)] public void SpawnBloodExplosionServerRpc(int playerId, Vector3 pos) { //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_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_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(576825490u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 576825490u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SpawnBloodExplosionClientRpc(playerId, pos); } } } [ClientRpc] public void SpawnBloodExplosionClientRpc(int playerId, Vector3 pos) { //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_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_00f8: 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_014b: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: 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_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_021c: 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(187518395u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 187518395u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)playerBloodExplosionPrefab != (Object)null) { GameObject val3 = Object.Instantiate(playerBloodExplosionPrefab, pos, Quaternion.identity); ParticleSystem[] componentsInChildren = val3.GetComponentsInChildren(); ParticleSystem[] array = componentsInChildren; foreach (ParticleSystem val4 in array) { val4.Play(true); } } if ((Object)(object)bloodExplosionSFX != (Object)null) { AudioSource.PlayClipAtPoint(bloodExplosionSFX, pos, 1f); } if (!((Object)(object)StartOfRound.Instance != (Object)null)) { return; } PlayerControllerB val5 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val5 != (Object)null)) { return; } if ((Object)(object)val5 == (Object)(object)GameNetworkManager.Instance.localPlayerController && !val5.isPlayerDead) { val5.DamagePlayer(100, true, true, (CauseOfDeath)3, -1, false, default(Vector3)); } if (!val5.isPlayerDead || (val5.isPlayerDead && (Object)(object)val5.deadBody != (Object)null)) { for (int j = 0; j < 20; j++) { Vector3 onUnitSphere = Random.onUnitSphere; onUnitSphere.y = Mathf.Abs(onUnitSphere.y); val5.DropBlood(onUnitSphere, true, false); } } } public override void OnCollideWithPlayer(Collider other) { //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) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0299: 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_02e0: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (base.isEnemyDead || isConsumingBlood) { return; } PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if (!((Object)(object)val != (Object)null) || !(timeSinceLastAttack >= 1f) || (CurrentLevel == 4 && isPausedAfterAttack) || (removableLimbs != null && isLimbDetached != null && isLimbDetached.Length > 1 && isLimbDetached[1])) { return; } timeSinceLastAttack = 0f; if (CurrentLevel < 4) { val.DamagePlayer(20, true, true, (CauseOfDeath)14, 0, false, default(Vector3)); if (((NetworkBehaviour)this).IsServer) { PlayStabSFXClientRpc(); } else { PlayStabSFXServerRpc(); } if (!(laughCooldown <= 0f)) { return; } if (CurrentLevel == 3 && level3LaughingClips != null && level3LaughingClips.Length != 0) { int num = enemyRandom.Next(0, level3LaughingClips.Length); if (((NetworkBehaviour)this).IsServer) { PlayLaughClientRpc(num, isLevel3: true); } else { PlayLaughServerRpc(num, level3: true); } laughCooldown = 1f; } else if (laughingClips != null && laughingClips.Length != 0) { int num2 = enemyRandom.Next(0, laughingClips.Length); if (((NetworkBehaviour)this).IsServer) { PlayLaughClientRpc(num2, isLevel3: false); } else { PlayLaughServerRpc(num2, level3: false); } laughCooldown = 1f; } return; } if ((Object)(object)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetTrigger("MonsterAttack"); } if (monsterAnimators != null) { Animator[] array = monsterAnimators; foreach (Animator val2 in array) { val2.SetTrigger("MonsterAttack"); } } if (((NetworkBehaviour)this).IsServer) { PlayMonsterAttackSFXClientRpc(); } else { PlayMonsterAttackSFXServerRpc(); } ((MonoBehaviour)this).StartCoroutine(PauseAfterAttack(3f)); bool flag = val.health - 40 <= 0 || val.isPlayerDead; val.DamagePlayer(40, true, true, (CauseOfDeath)6, 0, false, default(Vector3)); if (((NetworkBehaviour)this).IsServer) { PlayMonsterHitPlayerSFXClientRpc(); } else { PlayMonsterHitPlayerSFXServerRpc(); } if (flag) { if (((NetworkBehaviour)this).IsServer) { SpawnBloodExplosionClientRpc((int)val.playerClientId, ((Component)val).transform.position); } else { SpawnBloodExplosionServerRpc((int)val.playerClientId, ((Component)val).transform.position); } } } private IEnumerator PauseAfterAttack(float duration) { isPausedAfterAttack = true; base.agent.speed = 0f; if (base.agent.isOnNavMesh) { base.agent.isStopped = true; } yield return (object)new WaitForSeconds(duration); if (!base.isEnemyDead) { isPausedAfterAttack = false; if (base.agent.isOnNavMesh) { base.agent.isStopped = false; } } } [ClientRpc] public void TriggerTransformationClientRpc() { //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(3770485879u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3770485879u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; hasStartedTransformation = true; ((MonoBehaviour)this).StartCoroutine(TransformationRoutine()); } } } [ClientRpc] public void SyncBoilingAnimationClientRpc(bool isBoiling, bool exploded) { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(528985630u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref isBoiling, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref exploded, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 528985630u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetBool("isBoiling", isBoiling); if (isBoiling) { base.creatureAnimator.SetTrigger("startBoiling"); } if (exploded) { base.creatureAnimator.SetBool("explodedPlayer", true); } else if (!isBoiling) { base.creatureAnimator.SetBool("explodedPlayer", false); } } } [ServerRpc(RequireOwnership = false)] public void PlayStabSFXServerRpc() { //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(565943159u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 565943159u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayStabSFXClientRpc(); } } } private void PlayRandomClip(AudioClip[] clips, AudioSource source) { if (clips != null && clips.Length != 0 && !((Object)(object)source == (Object)null)) { source.PlayOneShot(clips[Random.Range(0, clips.Length)]); } } [ClientRpc] public void PlayStabSFXClientRpc() { //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(4081515618u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4081515618u, 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)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetTrigger("hasStabbed"); } if ((Object)(object)stabSFX != (Object)null && (Object)(object)daggerAudioSource != (Object)null) { daggerAudioSource.PlayOneShot(stabSFX); } } } private void SetLimbVisibility(int limbIndex, float progress) { //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_0105: Unknown result type (might be due to invalid IL or missing references) if (removableLimbs == null || limbIndex < 0 || limbIndex >= removableLimbs.Length || removableLimbs[limbIndex] == null || removableLimbs[limbIndex].renderers == null) { return; } SkinnedMeshRenderer[] renderers = removableLimbs[limbIndex].renderers; foreach (SkinnedMeshRenderer val in renderers) { if (!((Object)(object)val != (Object)null) || ((Renderer)val).materials == null) { continue; } Material[] materials = ((Renderer)val).materials; foreach (Material val2 in materials) { if (val2.HasProperty("_AlphaCutoff")) { val2.SetFloat("_AlphaCutoff", Mathf.Lerp(1f, 0.011f, progress)); } if (val2.HasProperty("_Color")) { Color color = val2.color; color.a = Mathf.Lerp(0f, 1f, progress); val2.color = color; } } } } public override void KillEnemy(bool destroy = false) { ((EnemyAI)this).KillEnemy(destroy); if ((Object)(object)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetBool("hasDied", true); } if ((Object)(object)grannyAudioAnimationEvent != (Object)null) { grannyAudioAnimationEvent.enableAudio = false; } if ((Object)(object)monsterAudioAnimationEvent != (Object)null) { monsterAudioAnimationEvent.enableAudio = false; } if ((Object)(object)breathingAudioSource != (Object)null) { breathingAudioSource.Stop(); } if ((Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.Stop(); } if ((Object)(object)base.creatureSFX != (Object)null) { base.creatureSFX.Stop(); } if ((Object)(object)boil2DAudioSource != (Object)null) { boil2DAudioSource.Stop(); } if (removableLimbs != null) { for (int i = 0; i < removableLimbs.Length; i++) { if (isLimbDetached != null && isLimbDetached.Length > i && isLimbDetached[i]) { SetLimbVisibility(i, 0f); } } } if ((Object)(object)screamAudioSource != (Object)null) { screamAudioSource.Stop(); } } [ServerRpc(RequireOwnership = false)] public void PlayMonsterAttackSFXServerRpc() { //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(3056569202u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3056569202u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayMonsterAttackSFXClientRpc(); } } } [ClientRpc] public void PlayMonsterAttackSFXClientRpc() { //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(1524123529u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1524123529u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (monsterAttackSFX != null && monsterAttackSFX.Length != 0 && (Object)(object)base.creatureSFX != (Object)null) { PlayRandomClip(monsterAttackSFX, base.creatureSFX); } } } [ServerRpc(RequireOwnership = false)] public void PlayMonsterHitPlayerSFXServerRpc() { //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(3517694732u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3517694732u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayMonsterHitPlayerSFXClientRpc(); } } } [ClientRpc] public void PlayMonsterHitPlayerSFXClientRpc() { //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(2733143598u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2733143598u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (monsterHitPlayerSFX != null && monsterHitPlayerSFX.Length != 0 && (Object)(object)base.creatureSFX != (Object)null) { PlayRandomClip(monsterHitPlayerSFX, base.creatureSFX); } } } [ClientRpc] public void PlayMonsterSeePlayerSFXClientRpc() { //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(2065609393u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2065609393u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (monsterSeePlayerSFX != null && monsterSeePlayerSFX.Length != 0 && (Object)(object)base.creatureVoice != (Object)null) { PlayRandomClip(monsterSeePlayerSFX, base.creatureVoice); } } } [ClientRpc] public void PlayHitSFXClientRpc() { //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(2331869931u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2331869931u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (hitSFX != null && hitSFX.Length != 0 && (Object)(object)base.creatureVoice != (Object)null) { PlayRandomClip(hitSFX, base.creatureVoice); } } } [ServerRpc(RequireOwnership = false)] public void PlayLaughServerRpc(int index, bool level3) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2560491129u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, index); ((FastBufferWriter)(ref val)).WriteValueSafe(ref level3, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2560491129u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayLaughClientRpc(index, level3); } } } [ClientRpc] public void PlayLaughClientRpc(int clipIndex, bool isLevel3) { //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(3962856111u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, clipIndex); ((FastBufferWriter)(ref val)).WriteValueSafe(ref isLevel3, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3962856111u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (isLevel3) { if (level3LaughingClips != null && clipIndex >= 0 && clipIndex < level3LaughingClips.Length && (Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.PlayOneShot(level3LaughingClips[clipIndex]); } } else if (laughingClips != null && clipIndex >= 0 && clipIndex < laughingClips.Length && (Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.PlayOneShot(laughingClips[clipIndex]); } } [ClientRpc] public void SyncBoilTargetClientRpc(int playerId, float explosionTimerValue) { //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(1947921314u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref explosionTimerValue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1947921314u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)boil2DAudioSource == (Object)null) { return; } if (playerId == -1) { if (boil2DAudioSource.isPlaying) { boil2DAudioSource.Stop(); } boil2DAudioSource.pitch = 1f; } else if ((Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)null && (int)GameNetworkManager.Instance.localPlayerController.playerClientId == playerId) { if (!boil2DAudioSource.isPlaying && (Object)(object)boilTarget2DSFX != (Object)null) { boil2DAudioSource.Play(); } float num = explosionThreshold; float num2 = Mathf.Clamp01(explosionTimerValue / num); boil2DAudioSource.pitch = 1f + num2 * 1.5f; } } public static Vector3? GetLatestBloodDropLocation(PlayerControllerB player) { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null) { return null; } List playerBloodPooledObjects = player.playerBloodPooledObjects; if (playerBloodPooledObjects == null || playerBloodPooledObjects.Count == 0 || currentBloodIndexField == null) { return null; } try { int num = (int)currentBloodIndexField.GetValue(player); int index = (num - 1 + playerBloodPooledObjects.Count) % playerBloodPooledObjects.Count; GameObject val = playerBloodPooledObjects[index]; if ((Object)(object)val != (Object)null && val.activeSelf) { return val.transform.position; } } catch (Exception ex) { ManualLogSource logger = Plugin.Logger; if (logger != null) { logger.LogError((object)("Error retrieving player's currentBloodIndex: " + ex.Message)); } } return null; } private EntranceTeleport GetClosestDoorToMonster() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) if (allTeleports == null || allTeleports.Length == 0) { allTeleports = Object.FindObjectsOfType(); } EntranceTeleport result = null; float num = float.MaxValue; EntranceTeleport[] array = allTeleports; foreach (EntranceTeleport val in array) { if (val.isEntranceToBuilding == base.isOutside) { float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position); if (num2 < num) { num = num2; result = val; } } } return result; } private EntranceTeleport GetCorrespondingDoor(EntranceTeleport chaserDoor) { if ((Object)(object)chaserDoor == (Object)null) { return null; } if (allTeleports == null || allTeleports.Length == 0) { allTeleports = Object.FindObjectsOfType(); } EntranceTeleport[] array = allTeleports; foreach (EntranceTeleport val in array) { if (val.entranceId == chaserDoor.entranceId && val.isEntranceToBuilding != chaserDoor.isEntranceToBuilding) { return val; } } return null; } [ServerRpc] public void TeleportEnemyServerRpc(Vector3 pos, bool setOutside) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Invalid comparison between Unknown and I4 //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1460063819u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setOutside, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1460063819u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TeleportEnemyClientRpc(pos, setOutside); } } [ClientRpc] public void TeleportEnemyClientRpc(Vector3 pos, bool setOutside) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(189671596u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setOutside, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 189671596u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TeleportEnemyLocally(pos, setOutside); } } } private void TeleportEnemyLocally(Vector3 pos, bool setOutside) { //IL_0024: 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_004a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.agent != (Object)null) { ((Behaviour)base.agent).enabled = false; } ((Component)this).transform.position = pos; if ((Object)(object)base.agent != (Object)null) { ((Behaviour)base.agent).enabled = true; } base.serverPosition = pos; ((EnemyAI)this).SetEnemyOutside(setOutside); if ((Object)(object)RoundManager.Instance != (Object)null) { EntranceTeleport val = RoundManager.FindMainEntranceScript(setOutside); if ((Object)(object)val != (Object)null && val.doorAudios != null && val.doorAudios.Length != 0 && (Object)(object)val.entrancePointAudio != (Object)null) { val.entrancePointAudio.PlayOneShot(val.doorAudios[0]); } } } private void HandleShipLeft() { LogIfDebugBuild("Ship is leaving! Cleaning up BloodWitch."); if ((Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.Stop(); } if ((Object)(object)daggerAudioSource != (Object)null) { daggerAudioSource.Stop(); } if ((Object)(object)breathingAudioSource != (Object)null) { breathingAudioSource.Stop(); } if ((Object)(object)screamAudioSource != (Object)null) { screamAudioSource.Stop(); } if ((Object)(object)distantScreamAudioSource != (Object)null) { distantScreamAudioSource.Stop(); } if ((Object)(object)boil2DAudioSource != (Object)null) { boil2DAudioSource.Stop(); } if ((Object)(object)entrancePortal != (Object)null) { Object.Destroy((Object)(object)entrancePortal); } if ((Object)(object)exitPortal != (Object)null) { Object.Destroy((Object)(object)exitPortal); } if ((Object)(object)bloodOrb != (Object)null) { bloodOrb.SetActive(false); } ((EnemyAI)this).KillEnemy(true); } public override void OnDestroy() { ((EnemyAI)this).OnDestroy(); if ((Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.Stop(); } if ((Object)(object)daggerAudioSource != (Object)null) { daggerAudioSource.Stop(); } if ((Object)(object)breathingAudioSource != (Object)null) { breathingAudioSource.Stop(); } if ((Object)(object)screamAudioSource != (Object)null) { screamAudioSource.Stop(); } if ((Object)(object)distantScreamAudioSource != (Object)null) { distantScreamAudioSource.Stop(); } if ((Object)(object)boil2DAudioSource != (Object)null) { boil2DAudioSource.Stop(); } LogIfDebugBuild("OnDestroy successful."); } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Expected O, but got Unknown //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Expected O, but got Unknown //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Expected O, but got Unknown //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(928502956u, new RpcReceiveHandler(__rpc_handler_928502956), "SyncStateSafelyServerRpc"); ((NetworkBehaviour)this).__registerRpc(632903206u, new RpcReceiveHandler(__rpc_handler_632903206), "SyncStateSafelyClientRpc"); ((NetworkBehaviour)this).__registerRpc(137346814u, new RpcReceiveHandler(__rpc_handler_137346814), "SpawnEntrancePortalClientRpc"); ((NetworkBehaviour)this).__registerRpc(2348840876u, new RpcReceiveHandler(__rpc_handler_2348840876), "SpawnExitPortalClientRpc"); ((NetworkBehaviour)this).__registerRpc(3985111250u, new RpcReceiveHandler(__rpc_handler_3985111250), "ClosePortalsClientRpc"); ((NetworkBehaviour)this).__registerRpc(2103324487u, new RpcReceiveHandler(__rpc_handler_2103324487), "CancelInterruptibleActionsClientRpc"); ((NetworkBehaviour)this).__registerRpc(2800373253u, new RpcReceiveHandler(__rpc_handler_2800373253), "TeleportBWServerRpc"); ((NetworkBehaviour)this).__registerRpc(2747021489u, new RpcReceiveHandler(__rpc_handler_2747021489), "AddBloodSourceServerRpc"); ((NetworkBehaviour)this).__registerRpc(2755236353u, new RpcReceiveHandler(__rpc_handler_2755236353), "TeleportBWClientRpc"); ((NetworkBehaviour)this).__registerRpc(3612684352u, new RpcReceiveHandler(__rpc_handler_3612684352), "ConsumeBloodClientRpc"); ((NetworkBehaviour)this).__registerRpc(1271143743u, new RpcReceiveHandler(__rpc_handler_1271143743), "SyncGeyserAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(114578014u, new RpcReceiveHandler(__rpc_handler_114578014), "SpawnGeyserWarningServerRpc"); ((NetworkBehaviour)this).__registerRpc(4007448664u, new RpcReceiveHandler(__rpc_handler_4007448664), "SpawnGeyserWarningClientRpc"); ((NetworkBehaviour)this).__registerRpc(846989029u, new RpcReceiveHandler(__rpc_handler_846989029), "SpawnGeyserAttackClientRpc"); ((NetworkBehaviour)this).__registerRpc(4229153322u, new RpcReceiveHandler(__rpc_handler_4229153322), "DestroyGeyserClientRpc"); ((NetworkBehaviour)this).__registerRpc(2863038974u, new RpcReceiveHandler(__rpc_handler_2863038974), "DetachLimbServerRpc"); ((NetworkBehaviour)this).__registerRpc(221976847u, new RpcReceiveHandler(__rpc_handler_221976847), "DetachLimbClientRpc"); ((NetworkBehaviour)this).__registerRpc(576825490u, new RpcReceiveHandler(__rpc_handler_576825490), "SpawnBloodExplosionServerRpc"); ((NetworkBehaviour)this).__registerRpc(187518395u, new RpcReceiveHandler(__rpc_handler_187518395), "SpawnBloodExplosionClientRpc"); ((NetworkBehaviour)this).__registerRpc(3770485879u, new RpcReceiveHandler(__rpc_handler_3770485879), "TriggerTransformationClientRpc"); ((NetworkBehaviour)this).__registerRpc(528985630u, new RpcReceiveHandler(__rpc_handler_528985630), "SyncBoilingAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(565943159u, new RpcReceiveHandler(__rpc_handler_565943159), "PlayStabSFXServerRpc"); ((NetworkBehaviour)this).__registerRpc(4081515618u, new RpcReceiveHandler(__rpc_handler_4081515618), "PlayStabSFXClientRpc"); ((NetworkBehaviour)this).__registerRpc(3056569202u, new RpcReceiveHandler(__rpc_handler_3056569202), "PlayMonsterAttackSFXServerRpc"); ((NetworkBehaviour)this).__registerRpc(1524123529u, new RpcReceiveHandler(__rpc_handler_1524123529), "PlayMonsterAttackSFXClientRpc"); ((NetworkBehaviour)this).__registerRpc(3517694732u, new RpcReceiveHandler(__rpc_handler_3517694732), "PlayMonsterHitPlayerSFXServerRpc"); ((NetworkBehaviour)this).__registerRpc(2733143598u, new RpcReceiveHandler(__rpc_handler_2733143598), "PlayMonsterHitPlayerSFXClientRpc"); ((NetworkBehaviour)this).__registerRpc(2065609393u, new RpcReceiveHandler(__rpc_handler_2065609393), "PlayMonsterSeePlayerSFXClientRpc"); ((NetworkBehaviour)this).__registerRpc(2331869931u, new RpcReceiveHandler(__rpc_handler_2331869931), "PlayHitSFXClientRpc"); ((NetworkBehaviour)this).__registerRpc(2560491129u, new RpcReceiveHandler(__rpc_handler_2560491129), "PlayLaughServerRpc"); ((NetworkBehaviour)this).__registerRpc(3962856111u, new RpcReceiveHandler(__rpc_handler_3962856111), "PlayLaughClientRpc"); ((NetworkBehaviour)this).__registerRpc(1947921314u, new RpcReceiveHandler(__rpc_handler_1947921314), "SyncBoilTargetClientRpc"); ((NetworkBehaviour)this).__registerRpc(1460063819u, new RpcReceiveHandler(__rpc_handler_1460063819), "TeleportEnemyServerRpc"); ((NetworkBehaviour)this).__registerRpc(189671596u, new RpcReceiveHandler(__rpc_handler_189671596), "TeleportEnemyClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_928502956(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int newStateIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newStateIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).SyncStateSafelyServerRpc(newStateIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_632903206(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int newStateIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newStateIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).SyncStateSafelyClientRpc(newStateIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_137346814(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 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); Quaternion rotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).SpawnEntrancePortalClientRpc(position, rotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2348840876(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 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); Quaternion rotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).SpawnExitPortalClientRpc(position, rotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3985111250(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; ((BloodWitchAI)(object)target).ClosePortalsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2103324487(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; ((BloodWitchAI)(object)target).CancelInterruptibleActionsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2800373253(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 bloodLocation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref bloodLocation); bool setOutside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setOutside, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).TeleportBWServerRpc(bloodLocation, setOutside); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2747021489(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_008c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 bloodPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref bloodPosition); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string playerUsername = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerUsername, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).AddBloodSourceServerRpc(bloodPosition, playerUsername); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2755236353(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 bloodLocation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref bloodLocation); bool setOutside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setOutside, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).TeleportBWClientRpc(bloodLocation, setOutside); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3612684352(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 newBloodCount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newBloodCount); int oldLevel = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref oldLevel); int newLevel = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newLevel); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).ConsumeBloodClientRpc(newBloodCount, oldLevel, newLevel); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1271143743(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; ((BloodWitchAI)(object)target).SyncGeyserAnimationClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_114578014(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 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).SpawnGeyserWarningServerRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4007448664(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 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).SpawnGeyserWarningClientRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_846989029(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 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).SpawnGeyserAttackClientRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4229153322(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; ((BloodWitchAI)(object)target).DestroyGeyserClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2863038974(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 limbIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref limbIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).DetachLimbServerRpc(limbIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_221976847(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 limbIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref limbIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).DetachLimbClientRpc(limbIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_576825490(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).SpawnBloodExplosionServerRpc(playerId, pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_187518395(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).SpawnBloodExplosionClientRpc(playerId, pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3770485879(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; ((BloodWitchAI)(object)target).TriggerTransformationClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_528985630(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 isBoiling = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isBoiling, default(ForPrimitives)); bool exploded = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref exploded, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).SyncBoilingAnimationClientRpc(isBoiling, exploded); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_565943159(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; ((BloodWitchAI)(object)target).PlayStabSFXServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4081515618(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; ((BloodWitchAI)(object)target).PlayStabSFXClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3056569202(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; ((BloodWitchAI)(object)target).PlayMonsterAttackSFXServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1524123529(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; ((BloodWitchAI)(object)target).PlayMonsterAttackSFXClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3517694732(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; ((BloodWitchAI)(object)target).PlayMonsterHitPlayerSFXServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2733143598(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; ((BloodWitchAI)(object)target).PlayMonsterHitPlayerSFXClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2065609393(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; ((BloodWitchAI)(object)target).PlayMonsterSeePlayerSFXClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2331869931(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; ((BloodWitchAI)(object)target).PlayHitSFXClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2560491129(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 index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); bool level = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref level, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).PlayLaughServerRpc(index, level); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3962856111(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 clipIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipIndex); bool isLevel = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isLevel, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).PlayLaughClientRpc(clipIndex, isLevel); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1947921314(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 explosionTimerValue = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref explosionTimerValue, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).SyncBoilTargetClientRpc(playerId, explosionTimerValue); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1460063819(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); bool setOutside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setOutside, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).TeleportEnemyServerRpc(pos, setOutside); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_189671596(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); bool setOutside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setOutside, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BloodWitchAI)(object)target).TeleportEnemyClientRpc(pos, setOutside); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "BloodWitchAI"; } } internal class BWContentHandler : ContentHandler { public class BWAssets : AssetBundleLoader { public BWAssets(DuskMod mod, string filePath) : base(mod, filePath) { } } internal BWAssets? bwAssets; public BWContentHandler(DuskMod mod) : base(mod) { ((ContentHandler)this).RegisterContent("bloodwitch", ref bwAssets, false); } } [HarmonyPatch(typeof(EnemyAI))] public class EnemyBloodPatch { public static List enemyBloodDrops = new List(); [HarmonyPatch("HitEnemy")] [HarmonyPostfix] public static void HitEnemyPostfix(EnemyAI __instance, int force, PlayerControllerB playerWhoHit, bool playHitSFX, int hitID) { //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Expected O, but got Unknown //IL_023e: 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_00fb: 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_0105: 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_013a: 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_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) //IL_015f: 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_0169: 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_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance == (Object)null || __instance.isEnemyDead || __instance is BloodWitchAI) { return; } GameObject val = null; if ((Object)(object)StartOfRound.Instance != (Object)null && StartOfRound.Instance.allPlayerScripts != null && StartOfRound.Instance.allPlayerScripts.Length != 0) { PlayerControllerB val2 = StartOfRound.Instance.allPlayerScripts[0]; if ((Object)(object)val2 != (Object)null && val2.playerBloodPooledObjects != null && val2.playerBloodPooledObjects.Count > 0) { GameObject val3 = val2.playerBloodPooledObjects[0]; if ((Object)(object)val3 != (Object)null) { val = Object.Instantiate(val3); ((Object)val).name = "EnemyBloodDrop_" + __instance.enemyType.enemyName; Ray val4 = default(Ray); ((Ray)(ref val4))..ctor(((Component)__instance).transform.position + Vector3.up * 1f, Vector3.down); RaycastHit val5 = default(RaycastHit); if (Physics.Raycast(val4, ref val5, 6f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { val.transform.position = ((RaycastHit)(ref val5)).point + Vector3.up * 0.05f; val.transform.rotation = Quaternion.LookRotation(Vector3.down, Vector3.up); Vector3 localEulerAngles = val.transform.localEulerAngles; localEulerAngles.z = Random.Range(-180f, 180f); val.transform.localEulerAngles = localEulerAngles; float num = Random.Range(0.23f, 0.62f); val.transform.localScale = new Vector3(num + Random.Range(-0.1f, 0.1f), num + Random.Range(-0.1f, 0.1f), 0.55f); val.SetActive(true); } else { Object.Destroy((Object)(object)val); val = null; } } } } if ((Object)(object)val == (Object)null) { val = new GameObject("EnemyBloodDrop_" + __instance.enemyType.enemyName); val.transform.position = ((Component)__instance).transform.position; } enemyBloodDrops.Add(val); Object.Destroy((Object)(object)val, 120f); enemyBloodDrops.RemoveAll((GameObject x) => (Object)(object)x == (Object)null); } } [HarmonyPatch(typeof(PlayerControllerB))] public class PlayerBloodPatch { [HarmonyPatch("DamagePlayer")] [HarmonyPostfix] public static void DamagePlayerPostfix(PlayerControllerB __instance) { SpawnPersistentBlood(__instance); } [HarmonyPatch("DamagePlayerClientRpc")] [HarmonyPostfix] public static void DamagePlayerClientRpcPostfix(PlayerControllerB __instance) { SpawnPersistentBlood(__instance); } public static void SpawnPersistentBlood(PlayerControllerB __instance) { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_009c: 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_00d1: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: 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_0116: 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_017c: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance == (Object)null || __instance.isPlayerDead) { return; } GameObject val = null; if (__instance.playerBloodPooledObjects != null && __instance.playerBloodPooledObjects.Count > 0) { GameObject val2 = __instance.playerBloodPooledObjects[0]; if ((Object)(object)val2 != (Object)null) { val = Object.Instantiate(val2); ((Object)val).name = "PlayerPersistentBloodDrop_" + __instance.playerUsername; Ray val3 = default(Ray); ((Ray)(ref val3))..ctor(((Component)__instance).transform.position + Vector3.up * 1f, Vector3.down); RaycastHit val4 = default(RaycastHit); if (Physics.Raycast(val3, ref val4, 6f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { val.transform.position = ((RaycastHit)(ref val4)).point + Vector3.up * 0.05f; val.transform.rotation = Quaternion.LookRotation(Vector3.down, Vector3.up); Vector3 localEulerAngles = val.transform.localEulerAngles; localEulerAngles.z = Random.Range(-180f, 180f); val.transform.localEulerAngles = localEulerAngles; float num = Random.Range(0.23f, 0.62f); val.transform.localScale = new Vector3(num + Random.Range(-0.1f, 0.1f), num + Random.Range(-0.1f, 0.1f), 0.55f); val.SetActive(true); } else { Object.Destroy((Object)(object)val); val = null; } } } if ((Object)(object)val != (Object)null && (Object)(object)__instance == (Object)(object)GameNetworkManager.Instance.localPlayerController) { BloodWitchAI[] array = Object.FindObjectsOfType(); BloodWitchAI[] array2 = array; foreach (BloodWitchAI bloodWitchAI in array2) { if ((Object)(object)bloodWitchAI != (Object)null) { bloodWitchAI.AddBloodSourceServerRpc(val.transform.position, __instance.playerUsername); } } } if ((Object)(object)val != (Object)null) { EnemyBloodPatch.enemyBloodDrops.Add(val); Object.Destroy((Object)(object)val, 60f); EnemyBloodPatch.enemyBloodDrops.RemoveAll((GameObject x) => (Object)(object)x == (Object)null); } } } [BepInPlugin("reiko888.BloodWitch", "Blood Witch", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] internal class Plugin : BaseUnityPlugin { public const string modGUID = "reiko888.BloodWitch"; public const string modName = "Blood Witch"; public const string modVersion = "1.0.0"; public static Plugin Instance = null; internal static ManualLogSource Logger = null; internal static readonly Harmony harmony = new Harmony("reiko888.BloodWitch"); internal static DuskMod mod = null; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } Logger = ((BaseUnityPlugin)this).Logger; AssetBundle val = AssetBundleUtils.LoadBundle(Assembly.GetExecutingAssembly(), "bw_contentcontainer"); mod = DuskMod.RegisterMod((BaseUnityPlugin)(object)this, val); mod.RegisterContentHandlers(); harmony.PatchAll(Assembly.GetExecutingAssembly()); Logger.LogInfo((object)"Plugin Blood Witch is loaded!"); } } public static class PluginInfo { public const string PLUGIN_GUID = "Reiko888.BloodWitch"; public const string PLUGIN_NAME = "Blood Witch"; public const string PLUGIN_VERSION = "1.0.2"; } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace Reiko888.BloodWitch.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }