using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalLib.Modules; using LethalSirenHead.NetcodePatcher; using Unity.Netcode; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("LethalSirenHead")] [assembly: AssemblyDescription("Adds Trevor Henderson's Siren Head to Lethal Company")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Ccode-lang")] [assembly: AssemblyProduct("LethalSirenHead")] [assembly: AssemblyCopyright("MIT License")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("22afcc53-9f27-49f9-b82d-3ff7e8026cce")] [assembly: AssemblyFileVersion("2.0.4")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.0.4.0")] [module: UnverifiableCode] [module: NetcodePatchedAssembly] namespace LethalSirenHead { [BepInPlugin("Ccode.SirenHead", "SirenHead", "2.0.3")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { private const string MyGuid = "Ccode.SirenHead"; private const string PluginName = "SirenHead"; private const string VersionString = "2.0.3"; private static readonly Harmony Harmony = new Harmony("Ccode.SirenHead"); public static ManualLogSource Log; public static EnemyType SirenEnemy; public static ConfigEntry AIStart; public static ConfigEntry walkSpeed; public static ConfigEntry runSpeed; public static ConfigEntry Levels; public static AudioClip[] spotSound; public static AudioClip[] stepSound; public static AudioClip[] walkieChatter; public static AudioClip OhMyGodIts; public void Awake() { AIStart = ((BaseUnityPlugin)this).Config.Bind("General", "AI Start Animation", "random", "Which animation Siren Head will spawn in"); walkSpeed = ((BaseUnityPlugin)this).Config.Bind("General", "Siren Head Walk Speed", 3.5f, "Walking speed of Siren Head"); runSpeed = ((BaseUnityPlugin)this).Config.Bind("General", "Siren Head Run Speed", 7f, "Running speed of Siren Head"); Levels = ((BaseUnityPlugin)this).Config.Bind("General", "Moons", "VowLevel:100;MarchLevel:100", "Moons that Siren Head will spawn on. Format as: \"MoonName:SpawnWeight\". Check README for more info."); Assets.PopulateAssets(); SirenEnemy = Assets.MainAssetBundle.LoadAsset("SirenHead"); TerminalNode val = Assets.MainAssetBundle.LoadAsset("SirenHeadTN"); TerminalKeyword val2 = Assets.MainAssetBundle.LoadAsset("SirenHeadKW"); spotSound = Utils.LoadSounds(Assets.MainAssetBundle, "sirenheadspot"); stepSound = Utils.LoadSounds(Assets.MainAssetBundle, "sirenfoot"); walkieChatter = Utils.LoadSounds(Assets.MainAssetBundle, "sirenchatter"); OhMyGodIts = Assets.MainAssetBundle.LoadAsset("oh_my_god_its.wav"); AudioClip[] array = spotSound; foreach (AudioClip val3 in array) { Debug.Log((object)((object)val3).ToString()); } AudioClip[] array2 = stepSound; foreach (AudioClip val4 in array2) { Debug.Log((object)((object)val4).ToString()); } AudioClip[] array3 = walkieChatter; foreach (AudioClip val5 in array3) { Debug.Log((object)((object)val5).ToString()); } var (dictionary, dictionary2) = SolveLevels(Levels.Value); NetworkPrefabs.RegisterNetworkPrefab(SirenEnemy.enemyPrefab); Harmony.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"SirenHead 2.0.3 loaded."); Enemies.RegisterEnemy(SirenEnemy, dictionary, dictionary2, val, val2); Log = ((BaseUnityPlugin)this).Logger; Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array4 = types; foreach (Type type in array4) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array5 = methods; foreach (MethodInfo methodInfo in array5) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } private (Dictionary spawnRateByLevelType, Dictionary spawnRateByCustomLevelType) SolveLevels(string config) { //IL_008e: 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) Dictionary dictionary = new Dictionary(); Dictionary dictionary2 = new Dictionary(); string[] array = config.Split(new char[1] { ';' }); string[] array2 = array; foreach (string text in array2) { string[] array3 = text.Trim().Split(new char[1] { ':' }); if (array3.Length != 2) { continue; } int result = 0; if (int.TryParse(array3[1], out result)) { if (Enum.TryParse(array3[0], ignoreCase: true, out LevelTypes result2)) { dictionary[result2] = result; ((BaseUnityPlugin)this).Logger.LogInfo((object)$"Registered spawn rate for level type {result2} to {result}"); } else { dictionary2[array3[0]] = result; ((BaseUnityPlugin)this).Logger.LogInfo((object)$"Registered spawn rate for custom level type {array3[0]} to {result}"); } } } return (dictionary, dictionary2); } } public static class Assets { public static AssetBundle MainAssetBundle; public static void PopulateAssets() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); MainAssetBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "sirenheadassets")); if ((Object)(object)MainAssetBundle == (Object)null) { Plugin.Log.LogError((object)"Failed to load custom assets."); } } } internal class Utils { public static AudioClip[] LoadSounds(AssetBundle bundle, string prefix) { List list = new List(); string[] allAssetNames = bundle.GetAllAssetNames(); foreach (string text in allAssetNames) { if (text.Contains(prefix)) { list.Add(bundle.LoadAsset(text)); } } return list.ToArray(); } } } namespace LethalSirenHead.Enemy { public class SirenHeadAI : EnemyAI { public enum State { WANDERING, TREEING, CHASING } [CompilerGenerated] private sealed class d__35 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public ulong player; public SirenHeadAI <>4__this; private PlayerControllerB 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__35(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = StartOfRound.Instance.allPlayerScripts[player]; if (5__1.AllowPlayerDeath()) { <>4__this.UpdatePlayerIdOfCaughtPlayerClientRpc(5__1.playerClientId); } if (((NetworkBehaviour)<>4__this).IsHost || ((NetworkBehaviour)<>4__this).IsServer) { ((EnemyAI)<>4__this).creatureAnimator.SetBool("Eating", true); try { if (((object)5__1.currentlyHeldObjectServer).GetType().Name == "NoisemakerProp" && ((Object)((Component)5__1.currentlyHeldObjectServer).gameObject.GetComponent().sharedMesh).name == "Airhorn" && Random.Range(0, 9) == 0) { <>4__this.startThePartyClientRpc(); } } catch { } } ((EnemyAI)<>4__this).inSpecialAnimation = true; if (5__1.AllowPlayerDeath()) { 5__1.isInElevator = false; 5__1.isInHangarShipRoom = false; } <>2__current = (object)new WaitForSeconds(5f); <>1__state = 1; return true; case 1: <>1__state = -1; ((EnemyAI)<>4__this).inSpecialAnimation = false; if (5__1.AllowPlayerDeath()) { 5__1.KillPlayer(Vector3.zero, false, (CauseOfDeath)8, 0, default(Vector3), false); } <>4__this.UpdatePlayerIdOfCaughtPlayerClientRpc(10000uL); <>4__this.makewanderClientRpc(); if (((NetworkBehaviour)<>4__this).IsHost || ((NetworkBehaviour)<>4__this).IsServer) { ((EnemyAI)<>4__this).creatureAnimator.SetBool("Eating", false); } ((EnemyAI)<>4__this).inSpecialAnimationWithPlayer = null; if (5__1.AllowPlayerDeath()) { 5__1.inSpecialInteractAnimation = false; 5__1.inAnimationWithEnemy = null; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__33 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public SirenHeadAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__33(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((EnemyAI)<>4__this).inSpecialAnimation = true; if (((NetworkBehaviour)<>4__this).IsHost || ((NetworkBehaviour)<>4__this).IsServer) { ((EnemyAI)<>4__this).creatureAnimator.SetBool("UnTree", true); ((EnemyAI)<>4__this).creatureAnimator.SetBool("Tree", false); } <>2__current = (object)new WaitForSeconds(2.5416f); <>1__state = 1; return true; case 1: <>1__state = -1; if (((NetworkBehaviour)<>4__this).IsHost || ((NetworkBehaviour)<>4__this).IsServer) { ((EnemyAI)<>4__this).creatureAnimator.SetBool("UnTree", false); } <>4__this.makechaseClientRpc(); ((EnemyAI)<>4__this).agent.angularSpeed = 100f; ((EnemyAI)<>4__this).inSpecialAnimation = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private AISearchRoutine wander = new AISearchRoutine(); private PlayerControllerB[] players; private PlayerControllerB[] closePlayers; private string AIStart = Plugin.AIStart.Value; private float walkSpeed = Plugin.walkSpeed.Value; private float runSpeed = Plugin.runSpeed.Value; private float walkieTimer = 0f; private float walkieInterval = 0f; public Transform headPos; private ulong playerIdOfCaughtPlayer = 10000uL; public override void Start() { ((EnemyAI)this).Start(); int num = Random.Range(0, 2); string value = Plugin.AIStart.Value; if (value == "random") { if (num == 0) { AIStart = "tree"; } else { AIStart = "standard"; } } else if (value == "tree") { AIStart = "tree"; } if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer) { walkieInterval = Random.Range(60f, 90f); ConfigSyncClientRpc(AIStart, walkSpeed, runSpeed); } } public PlayerControllerB[] CheckLineOfSightForPositionCompat(float width = 45f, int range = 60, Transform eyeObject = null, float proximityCheck = -1f, int layerMask = -1) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Invalid comparison between Unknown and I4 //IL_00aa: 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_00b7: 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_00c8: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) if (layerMask == -1) { layerMask = StartOfRound.Instance.collidersAndRoomMaskAndDefault; } if ((Object)(object)eyeObject == (Object)null) { eyeObject = base.eye; } if (base.isOutside && !base.enemyType.canSeeThroughFog && (int)TimeOfDay.Instance.currentLevelWeather == 3) { range = Mathf.Clamp(range, 0, 30); } List list = new List(4); for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (!((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true)) { continue; } Vector3 position = ((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position; if (Vector3.Distance(base.eye.position, position) < (float)range && !Physics.Linecast(eyeObject.position, position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { Vector3 val = position - eyeObject.position; if (Vector3.Angle(eyeObject.forward, val) < width || Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position) < proximityCheck) { list.Add(StartOfRound.Instance.allPlayerScripts[i]); } } } if (list.Count == 4) { return StartOfRound.Instance.allPlayerScripts; } if (list.Count > 0) { return list.ToArray(); } return null; } public bool LineOfSightForPositionCompat(Vector3 objectPosition, float width = 45f, int range = 60, float proximityAwareness = -1f, Transform overrideEye = null) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) if (!base.isOutside) { if (objectPosition.y > -80f) { return false; } } else if (objectPosition.y < -100f) { return false; } Transform val = (((Object)(object)overrideEye != (Object)null) ? overrideEye : ((!((Object)(object)base.eye == (Object)null)) ? base.eye : ((Component)this).transform)); RaycastHit val2 = default(RaycastHit); if (Vector3.Distance(val.position, objectPosition) < (float)range && !Physics.Linecast(val.position, objectPosition, ref val2, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { Vector3 val3 = objectPosition - val.position; if (base.debugEnemyAI) { Debug.DrawRay(val.position, objectPosition - val.position, Color.green, 2f); } if (Vector3.Angle(val.forward, val3) < width || Vector3.Distance(((Component)this).transform.position, objectPosition) < proximityAwareness) { return true; } } return false; } public void PlaySound(AudioClip clip, float volume = 1f) { base.creatureVoice.PlayOneShot(clip); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, clip, 1f); } public void BroadcastOnWalkie(AudioClip clip, float volume = 1f) { for (int i = 0; i < WalkieTalkie.allWalkieTalkies.Count; i++) { if (((GrabbableObject)WalkieTalkie.allWalkieTalkies[i]).isBeingUsed) { WalkieTalkie.allWalkieTalkies[i].target.PlayOneShot(clip, volume); } } } [ClientRpc] public void playSpotOneshotClientRpc(int index) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3190762093u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3190762093u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlaySound(Plugin.spotSound[index]); } } } [ClientRpc] public void playWalkOneshotClientRpc(int index) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2872467106u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2872467106u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlaySound(Plugin.stepSound[index], 0.4f); } } } [ClientRpc] public void walkieChatterClientRpc(int index) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2456587085u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2456587085u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; BroadcastOnWalkie(Plugin.walkieChatter[index], 0.5f); } } } [ClientRpc] public void maketreeClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3470109575u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3470109575u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer) { base.creatureAnimator.SetBool("Tree", true); base.agent.speed = 0f; base.agent.angularSpeed = 0f; ((EnemyAI)this).SwitchToBehaviourClientRpc(1); } } } [ClientRpc] public void makewanderClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2775163830u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2775163830u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.agent.speed = walkSpeed; ((EnemyAI)this).StartSearch(((Component)this).transform.position, wander); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } } } [ClientRpc] public void makechaseClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1886140381u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1886140381u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.agent.speed = runSpeed; playSpotOneshotClientRpc(Random.Range(0, Plugin.spotSound.Length)); ((EnemyAI)this).SwitchToBehaviourClientRpc(2); } } } public override void DoAIInterval() { //IL_0101: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); players = CheckLineOfSightForPositionCompat(50f, 70, base.eye, 15f, StartOfRound.Instance.collidersRoomDefaultAndFoliage); closePlayers = CheckLineOfSightForPositionCompat(50f, 20, base.eye, 10f, StartOfRound.Instance.collidersRoomDefaultAndFoliage); switch (base.currentBehaviourStateIndex) { case 0: if (players != null) { ((EnemyAI)this).StopSearch(wander, true); makechaseClientRpc(); } break; case 1: if (closePlayers != null) { if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer) { UntreeClientRpc(); } else { RequestUntreeServerRpc(); } } break; case 2: if (players == null) { makewanderClientRpc(); } else { ((EnemyAI)this).SetDestinationToPosition(((Component)players[0]).transform.position, false); } break; } } public override void Update() { //IL_010b: 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_0143: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { walkieTimer += Time.deltaTime; if (walkieTimer >= walkieInterval) { walkieChatterClientRpc(Random.Range(0, Plugin.walkieChatter.Length)); walkieTimer -= walkieInterval; walkieInterval = Random.Range(60f, 90f); } } if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null) { return; } if (players != null && base.currentBehaviourStateIndex == 2 && (Object)(object)players[0] == (Object)(object)GameNetworkManager.Instance.localPlayerController) { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(1.4f, 1f); } else if (LineOfSightForPositionCompat(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, 45f, 70)) { if (Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 15f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.7f, true); } else { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.4f, true); } } } public void LateUpdate() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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) if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null) { SirenHeadVars component = ((Component)this).gameObject.GetComponent(); ((Component)base.inSpecialAnimationWithPlayer).transform.position = new Vector3(component.holdPlayerPoint.position.x, component.holdPlayerPoint.position.y - 0.2f, component.holdPlayerPoint.position.z); ((Component)base.inSpecialAnimationWithPlayer).transform.LookAt(headPos); } if (GameNetworkManager.Instance.localPlayerController.playerClientId == playerIdOfCaughtPlayer) { ((Renderer)GameNetworkManager.Instance.localPlayerController.thisPlayerModelArms).enabled = false; ((Renderer)((Component)GameNetworkManager.Instance.localPlayerController.localVisor).gameObject.GetComponentsInChildren()[0]).enabled = false; ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.LookAt(headPos); } else { ((Renderer)((Component)GameNetworkManager.Instance.localPlayerController.localVisor).gameObject.GetComponentsInChildren()[0]).enabled = true; } } public override void OnCollideWithPlayer(Collider other) { ((EnemyAI)this).OnCollideWithPlayer(other); if (StartOfRound.Instance.shipIsLeaving) { return; } PlayerControllerB component = ((Component)other).gameObject.GetComponent(); if (component.isInHangarShipRoom || ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null && component.playerClientId == base.inSpecialAnimationWithPlayer.playerClientId)) { return; } if (component.AllowPlayerDeath()) { base.inSpecialAnimationWithPlayer = component; base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = true; base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = (EnemyAI)(object)this; } if ((Object)(object)component != (Object)null && !component.isPlayerDead) { if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer) { StartEatingPlayerClientRpc(component.playerClientId); } else { RequestStartEatingPlayerServerRpc(component.playerClientId); } } } [ClientRpc] public void UpdatePlayerIdOfCaughtPlayerClientRpc(ulong id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1240534196u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, id); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1240534196u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Plugin.Log.LogInfo((object)id); playerIdOfCaughtPlayer = id; } } } public void PlayFootstep() { if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer) { playWalkOneshotClientRpc(Random.Range(0, Plugin.stepSound.Length)); } } [ClientRpc] public void ConfigSyncClientRpc(string AIStart, float walkSpeed, float runSpeed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3822494571u, val, (RpcDelivery)0); bool flag = AIStart != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(AIStart, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref walkSpeed, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref runSpeed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3822494571u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; this.AIStart = AIStart; this.walkSpeed = walkSpeed; this.runSpeed = runSpeed; if (AIStart == "tree") { maketreeClientRpc(); } else { makewanderClientRpc(); } } } [ServerRpc(RequireOwnership = false)] public void RequestStartEatingPlayerServerRpc(ulong player) { //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 val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1905488255u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, player); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1905488255u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StartEatingPlayerClientRpc(player); } } } [ClientRpc] public void StartEatingPlayerClientRpc(ulong player) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1290495213u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, player); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1290495213u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(EatPlayer(player)); } } } [ServerRpc(RequireOwnership = false)] public void RequestUntreeServerRpc() { //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 val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2632362978u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2632362978u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UntreeClientRpc(); } } } [ClientRpc] public void UntreeClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3081810346u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3081810346u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Plugin.Log.LogInfo((object)"UnTreeing"); ((MonoBehaviour)this).StartCoroutine(UntreeAndSwitch()); } } } [IteratorStateMachine(typeof(d__33))] public IEnumerator UntreeAndSwitch() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__33(0) { <>4__this = this }; } [ClientRpc] public void startThePartyClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1383007285u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1383007285u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlaySound(Plugin.OhMyGodIts); } } } [IteratorStateMachine(typeof(d__35))] public IEnumerator EatPlayer(ulong player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__35(0) { <>4__this = this, player = player }; } 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 ((NetworkBehaviour)this).__registerRpc(3190762093u, new RpcReceiveHandler(__rpc_handler_3190762093), "playSpotOneshotClientRpc"); ((NetworkBehaviour)this).__registerRpc(2872467106u, new RpcReceiveHandler(__rpc_handler_2872467106), "playWalkOneshotClientRpc"); ((NetworkBehaviour)this).__registerRpc(2456587085u, new RpcReceiveHandler(__rpc_handler_2456587085), "walkieChatterClientRpc"); ((NetworkBehaviour)this).__registerRpc(3470109575u, new RpcReceiveHandler(__rpc_handler_3470109575), "maketreeClientRpc"); ((NetworkBehaviour)this).__registerRpc(2775163830u, new RpcReceiveHandler(__rpc_handler_2775163830), "makewanderClientRpc"); ((NetworkBehaviour)this).__registerRpc(1886140381u, new RpcReceiveHandler(__rpc_handler_1886140381), "makechaseClientRpc"); ((NetworkBehaviour)this).__registerRpc(1240534196u, new RpcReceiveHandler(__rpc_handler_1240534196), "UpdatePlayerIdOfCaughtPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3822494571u, new RpcReceiveHandler(__rpc_handler_3822494571), "ConfigSyncClientRpc"); ((NetworkBehaviour)this).__registerRpc(1905488255u, new RpcReceiveHandler(__rpc_handler_1905488255), "RequestStartEatingPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(1290495213u, new RpcReceiveHandler(__rpc_handler_1290495213), "StartEatingPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2632362978u, new RpcReceiveHandler(__rpc_handler_2632362978), "RequestUntreeServerRpc"); ((NetworkBehaviour)this).__registerRpc(3081810346u, new RpcReceiveHandler(__rpc_handler_3081810346), "UntreeClientRpc"); ((NetworkBehaviour)this).__registerRpc(1383007285u, new RpcReceiveHandler(__rpc_handler_1383007285), "startThePartyClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3190762093(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); target.__rpc_exec_stage = (__RpcExecStage)1; ((SirenHeadAI)(object)target).playSpotOneshotClientRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2872467106(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); target.__rpc_exec_stage = (__RpcExecStage)1; ((SirenHeadAI)(object)target).playWalkOneshotClientRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2456587085(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); target.__rpc_exec_stage = (__RpcExecStage)1; ((SirenHeadAI)(object)target).walkieChatterClientRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3470109575(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; ((SirenHeadAI)(object)target).maketreeClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2775163830(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; ((SirenHeadAI)(object)target).makewanderClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1886140381(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; ((SirenHeadAI)(object)target).makechaseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1240534196(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong id = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref id); target.__rpc_exec_stage = (__RpcExecStage)1; ((SirenHeadAI)(object)target).UpdatePlayerIdOfCaughtPlayerClientRpc(id); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3822494571(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string aIStart = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref aIStart, false); } float num = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); float num2 = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num2, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SirenHeadAI)(object)target).ConfigSyncClientRpc(aIStart, num, num2); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1905488255(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong player = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref player); target.__rpc_exec_stage = (__RpcExecStage)1; ((SirenHeadAI)(object)target).RequestStartEatingPlayerServerRpc(player); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1290495213(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong player = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref player); target.__rpc_exec_stage = (__RpcExecStage)1; ((SirenHeadAI)(object)target).StartEatingPlayerClientRpc(player); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2632362978(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; ((SirenHeadAI)(object)target).RequestUntreeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3081810346(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; ((SirenHeadAI)(object)target).UntreeClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1383007285(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; ((SirenHeadAI)(object)target).startThePartyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SirenHeadAI"; } } public class SirenHeadAnimationCalls : MonoBehaviour { public void PlayFootstep(float filler) { ((Component)this).gameObject.GetComponentInParent().PlayFootstep(); } } internal class SirenHeadVars : MonoBehaviour { public Transform holdPlayerPoint; public AudioSource sfx; } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace LethalSirenHead.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }