Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of SCP966 v1.1.7
BepInEx/plugins/ProjectSCP.SCP966.dll
Decompiled 11 hours agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalLib.Modules; using Microsoft.CodeAnalysis; using ProjectSCP.SCP966.NetcodePatcher; using SCP1507.Configurations; using SCP966; using SCP966.Ai; using SCP966.SCP966Manager; using Unity.Collections; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("ProjectSCP.SCP966")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.1.7.0")] [assembly: AssemblyInformationalVersion("1.1.7+a50b1f4f77216ab1f206c130fc0e7090c1d0ac48")] [assembly: AssemblyProduct("SCP966")] [assembly: AssemblyTitle("ProjectSCP.SCP966")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.1.7.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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] [Microsoft.CodeAnalysis.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] [Microsoft.CodeAnalysis.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; } } } [HarmonyPatch(typeof(HUDManager))] internal class ScanPatch { [HarmonyPatch("PingScan_performed")] [HarmonyPostfix] private static void PostFix(CallbackContext context) { if ((Object)(object)Scp966Manager.Instance != (Object)null) { Scp966Manager.Instance.StartScanOnAllInstances(); } } } namespace SCP1507.Configurations { [Serializable] public class Config : SyncedInstance<Config> { public ConfigEntry<float> TIME_YOU_SEE_MONSTER { get; private set; } public ConfigEntry<int> RARITY { get; private set; } public Config(ConfigFile cfg) { InitInstance(this); TIME_YOU_SEE_MONSTER = cfg.Bind<float>("Visibility", "Time you see the monster", 0.2f, "The amount of time you will see SCP 966 upon scan. It should not be higher than 1.2"); RARITY = cfg.Bind<int>("Spawning", "Rarity", 30, "The rarity of SCp 966 on all the moons"); } public static void RequestSync() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (!SyncedInstance<Config>.IsClient) { return; } FastBufferWriter val = default(FastBufferWriter); ((FastBufferWriter)(ref val))..ctor(SyncedInstance<Config>.IntSize, (Allocator)2, -1); try { SyncedInstance<Config>.MessageManager.SendNamedMessage("Xilef992SCP966_OnRequestConfigSync", 0uL, val, (NetworkDelivery)3); } finally { ((IDisposable)(FastBufferWriter)(ref val)).Dispose(); } } public static void OnRequestSync(ulong clientId, FastBufferReader _) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (!SyncedInstance<Config>.IsHost) { return; } Plugin.Logger.LogInfo((object)$"Config sync request received from client: {clientId}"); byte[] array = SyncedInstance<Config>.SerializeToBytes(SyncedInstance<Config>.Instance); int num = array.Length; FastBufferWriter val = default(FastBufferWriter); ((FastBufferWriter)(ref val))..ctor(num + SyncedInstance<Config>.IntSize, (Allocator)2, -1); try { ((FastBufferWriter)(ref val)).WriteValueSafe<int>(ref num, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteBytesSafe(array, -1, 0); SyncedInstance<Config>.MessageManager.SendNamedMessage("Xilef992SCP966_OnReceiveConfigSync", clientId, val, (NetworkDelivery)3); } catch (Exception arg) { Plugin.Logger.LogInfo((object)$"Error occurred syncing config with client: {clientId}\n{arg}"); } finally { ((IDisposable)(FastBufferWriter)(ref val)).Dispose(); } } public static void OnReceiveSync(ulong _, FastBufferReader reader) { //IL_0024: 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) if (!((FastBufferReader)(ref reader)).TryBeginRead(SyncedInstance<Config>.IntSize)) { Plugin.Logger.LogError((object)"Config sync error: Could not begin reading buffer."); return; } int num = default(int); ((FastBufferReader)(ref reader)).ReadValueSafe<int>(ref num, default(ForPrimitives)); if (!((FastBufferReader)(ref reader)).TryBeginRead(num)) { Plugin.Logger.LogError((object)"Config sync error: Host could not sync."); return; } byte[] data = new byte[num]; ((FastBufferReader)(ref reader)).ReadBytesSafe(ref data, num, 0); SyncedInstance<Config>.SyncInstance(data); Plugin.Logger.LogInfo((object)"Successfully synced config with host."); } } public static class ConfigurationsPatch { [CompilerGenerated] private static class <>O { public static HandleNamedMessageDelegate <0>__OnRequestSync; public static HandleNamedMessageDelegate <1>__OnReceiveSync; } [HarmonyPostfix] [HarmonyPatch(typeof(PlayerControllerB), "ConnectClientToPlayerObject")] public static void InitializeLocalPlayer() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown if (((NetworkBehaviour)RoundManager.Instance).IsHost) { CustomMessagingManager messageManager = SyncedInstance<Config>.MessageManager; object obj = <>O.<0>__OnRequestSync; if (obj == null) { HandleNamedMessageDelegate val = Config.OnRequestSync; <>O.<0>__OnRequestSync = val; obj = (object)val; } messageManager.RegisterNamedMessageHandler("SCP966_OnRequestConfigSync", (HandleNamedMessageDelegate)obj); SyncedInstance<Config>.Synced = true; return; } SyncedInstance<Config>.Synced = false; CustomMessagingManager messageManager2 = SyncedInstance<Config>.MessageManager; object obj2 = <>O.<1>__OnReceiveSync; if (obj2 == null) { HandleNamedMessageDelegate val2 = Config.OnReceiveSync; <>O.<1>__OnReceiveSync = val2; obj2 = (object)val2; } messageManager2.RegisterNamedMessageHandler("SCP966_OnReceiveConfigSync", (HandleNamedMessageDelegate)obj2); Config.RequestSync(); } [HarmonyPostfix] [HarmonyPatch(typeof(GameNetworkManager), "StartDisconnect")] public static void PlayerLeave() { SyncedInstance<Config>.RevertSync(); } } public class SyncedInstance<T> { [NonSerialized] protected static int IntSize = 4; internal static CustomMessagingManager MessageManager => NetworkManager.Singleton.CustomMessagingManager; internal static bool IsClient => NetworkManager.Singleton.IsClient; internal static bool IsHost => NetworkManager.Singleton.IsHost; public static T Default { get; private set; } public static T Instance { get; private set; } public static bool Synced { get; internal set; } protected void InitInstance(T instance) { Default = instance; Instance = instance; IntSize = 4; } internal static void SyncInstance(byte[] data) { Instance = DeserializeFromBytes(data); Synced = true; } internal static void RevertSync() { Instance = Default; Synced = false; } public static byte[] SerializeToBytes(T val) { BinaryFormatter binaryFormatter = new BinaryFormatter(); using MemoryStream memoryStream = new MemoryStream(); try { binaryFormatter.Serialize(memoryStream, val); return memoryStream.ToArray(); } catch (Exception arg) { Debug.Log((object)$"Error serializing instance: {arg}"); return null; } } public static T DeserializeFromBytes(byte[] data) { BinaryFormatter binaryFormatter = new BinaryFormatter(); using MemoryStream serializationStream = new MemoryStream(data); try { return (T)binaryFormatter.Deserialize(serializationStream); } catch (Exception arg) { Debug.Log((object)$"Error deserializing instance: {arg}"); return default(T); } } } } namespace SCP966 { [BepInPlugin("ProjectSCP.SCP966", "SCP966", "1.1.7")] public class Plugin : BaseUnityPlugin { internal static ManualLogSource Logger; public static AssetBundle? ModAssets; private readonly Harmony harmony = new Harmony("ProjectSCP.SCP966"); public static Config Config { get; internal set; } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Config = new Config(((BaseUnityPlugin)this).Config); InitializeNetworkBehaviours(); string path = "scp966modassets"; ModAssets = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), path)); if ((Object)(object)ModAssets == (Object)null) { Logger.LogError((object)"Failed to load custom assets."); return; } EnemyType val = ModAssets.LoadAsset<EnemyType>("SCP966Enemy"); TerminalNode val2 = ModAssets.LoadAsset<TerminalNode>("SCP966TN"); TerminalKeyword val3 = ModAssets.LoadAsset<TerminalKeyword>("SCP966TK"); Dictionary<LevelTypes, int> dictionary = new Dictionary<LevelTypes, int> { { (LevelTypes)4, 40 }, { (LevelTypes)(-1), Config.RARITY.Value }, { (LevelTypes)1024, 20 } }; Dictionary<string, int> dictionary2 = new Dictionary<string, int>(); NetworkPrefabs.RegisterNetworkPrefab(val.enemyPrefab); Enemies.RegisterEnemy(val, dictionary, dictionary2, val2, val3); harmony.PatchAll(typeof(ConfigurationsPatch)); harmony.PatchAll(typeof(ScanPatch)); Logger.LogInfo((object)"Plugin ProjectSCP.SCP966 is loaded!"); } private static void InitializeNetworkBehaviours() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } } public static class PluginInfo { public const string PLUGIN_GUID = "ProjectSCP.SCP966"; public const string PLUGIN_NAME = "SCP966"; public const string PLUGIN_VERSION = "1.1.7"; } } namespace SCP966.SCP966Manager { public class Scp966Manager : MonoBehaviour { private static Scp966Manager _instance; private List<Scp966> _allScp966Instances = new List<Scp966>(); public static Scp966Manager Instance => _instance; private void Awake() { if ((Object)(object)_instance != (Object)null && (Object)(object)_instance != (Object)(object)this) { Object.Destroy((Object)(object)((Component)this).gameObject); } else { _instance = this; } } public void RegisterScp966Instance(Scp966 instance) { _allScp966Instances.Add(instance); } public void UnregisterScp966Instance(Scp966 instance) { _allScp966Instances.Remove(instance); } public void StartScanOnAllInstances() { foreach (Scp966 allScp966Instance in _allScp966Instances) { allScp966Instance.StartScanCoroutine(); } } } } namespace SCP966.Ai { public class AnimatorCallIn : MonoBehaviour { public Scp966 scpScript; public void Attack() { scpScript.SwingAttackHitClientRpc(); } } public class Scp966 : EnemyAI { [CompilerGenerated] private sealed class <IdlePlay>d__40 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Scp966 <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <IdlePlay>d__40(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown int num = <>1__state; Scp966 scp = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; scp.PlayOnShotIdleClientRpc(RandomNumberGenerator.GetInt32(scp.idles.Length)); scp.waitTimer = 5 + RandomNumberGenerator.GetInt32(20); break; } if (!((EnemyAI)scp).isEnemyDead) { <>2__current = (object)new WaitForSeconds(scp.waitTimer); <>1__state = 1; return true; } 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 <ScanCoroutine>d__38 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Scp966 <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ScanCoroutine>d__38(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown int num = <>1__state; Scp966 scp = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; scp.EnableMesh(); <>2__current = (object)new WaitForSeconds(0f + Plugin.Config.TIME_YOU_SEE_MONSTER.Value); <>1__state = 1; return true; case 1: <>1__state = -1; scp.DisableMesh(); scp.gettingScanned = false; <>2__current = (object)new WaitForSeconds(1.2f - Plugin.Config.TIME_YOU_SEE_MONSTER.Value); <>1__state = 2; return true; case 2: <>1__state = -1; scp.canScan = true; 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 <killPlayer>d__43 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Scp966 <>4__this; public PlayerControllerB playerControllerB; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <killPlayer>d__43(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; Scp966 scp = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 1; return true; case 1: <>1__state = -1; ((MonoBehaviour)scp).StopCoroutine(scp.killCoroutine); if (scp.currentDamage >= playerControllerB.health) { playerControllerB.KillPlayer(Vector3.up, true, (CauseOfDeath)6, 1, default(Vector3), false); scp.SetWeightPlayerClientRpc(playerControllerB.playerClientId, 0f); } else { playerControllerB.DamagePlayer(scp.currentDamage, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } 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(); } } public SkinnedMeshRenderer mesh; public Transform lookAt; public Transform defaultLookAt; public Transform AttackArea; [Header("Damage Attacks")] public int firstAttack; public int secondAttack; public int thirdAttack; private int currentDamage; public float attackCooldown; private float attackCooldownBeheader; private float? previousNightVisionValue; [Header("Audio")] public AudioClip[] echoes; public AudioClip[] idles; private Coroutine passiveSound; private float waitTimer; private bool justStopedMoving = true; private bool weightModifiedLocal; private bool gettingScanned; private bool canScan = true; private Coroutine killCoroutine; [NonSerialized] private NetworkVariable<NetworkBehaviourReference> _playerNetVar = new NetworkVariable<NetworkBehaviourReference>(default(NetworkBehaviourReference), (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); private bool noRegen; private float previousStamina; [NonSerialized] public bool isVisibleForLocalPlayer; private PlayerControllerB localPlayer; private GameObject foundNightVision; private Transform batteryTransform; private Transform barTransform; public PlayerControllerB Scp966TargetPlayer { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown return (PlayerControllerB)NetworkBehaviourReference.op_Implicit(_playerNetVar.Value); } set { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)value == (Object)null) { _playerNetVar.Value = NetworkBehaviourReference.op_Implicit((NetworkBehaviour)null); } else { _playerNetVar.Value = new NetworkBehaviourReference((NetworkBehaviour)(object)value); } } } public override void Start() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown ((EnemyAI)this).Start(); localPlayer = RoundManager.Instance.playersManager.localPlayerController; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); attackCooldownBeheader = attackCooldown; if (((NetworkBehaviour)this).IsHost) { passiveSound = ((MonoBehaviour)this).StartCoroutine(IdlePlay()); } if ((Object)(object)Scp966Manager.Instance == (Object)null) { GameObject val = new GameObject("Scp966Manager"); val.AddComponent<Scp966Manager>(); } Scp966Manager.Instance.RegisterScp966Instance(this); } private void LateUpdate() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) CheckIfLocalPlayerHasNightVision(); if ((Object)(object)Scp966TargetPlayer != (Object)null) { lookAt.position = Scp966TargetPlayer.playerEye.position; } else { lookAt.position = defaultLookAt.position; } attackCooldown -= Time.deltaTime; if (noRegen) { if (localPlayer.sprintMeter > previousStamina) { localPlayer.sprintMeter = previousStamina; } else { previousStamina = localPlayer.sprintMeter; } } else { previousStamina = localPlayer.sprintMeter; } } public override void DoAIInterval() { //IL_0112: 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_00df: 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_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: 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_0160: 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_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); switch (base.currentBehaviourStateIndex) { case 0: { DoAnimationClientRpc("Walking", value: true); base.agent.autoBraking = true; base.agent.speed = 5f; base.agent.stoppingDistance = 1f; PlayerControllerB val = ((EnemyAI)this).CheckLineOfSightForPlayer(45f, 60, 3); if ((Object)(object)val != (Object)null) { ((EnemyAI)this).StopSearch(base.currentSearch, true); Scp966TargetPlayer = val; ((EnemyAI)this).SwitchToBehaviourClientRpc(1); } break; } case 1: base.agent.stoppingDistance = 8f; base.agent.speed = 5f; base.agent.autoBraking = true; if (!Scp966TargetPlayer.isInsideFactory || Scp966TargetPlayer.isPlayerDead || Vector3.Distance(((Component)this).transform.position, ((Component)Scp966TargetPlayer).transform.position) > 25f) { base.agent.ResetPath(); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); SetWeightPlayerClientRpc(Scp966TargetPlayer.playerClientId, 0f); Scp966TargetPlayer = null; break; } ((EnemyAI)this).SetDestinationToPosition(((Component)Scp966TargetPlayer).transform.position, false); if (Vector3.Distance(((Component)this).transform.position, ((Component)Scp966TargetPlayer).transform.position) < base.agent.stoppingDistance) { DoAnimationClientRpc("Walking", value: false); if (justStopedMoving) { switch (RandomNumberGenerator.GetInt32(3)) { case 0: MonsterLogger("WE ARE doing nothing"); break; case 1: MonsterLogger("WE ARE SCREAMING"); DoAnimationClientRpc("Scream"); PlayScreamClientRpc(RandomNumberGenerator.GetInt32(echoes.Length)); break; case 2: MonsterLogger("Staring"); DoAnimationClientRpc("Stare"); break; } } justStopedMoving = false; } else { justStopedMoving = true; DoAnimationClientRpc("Walking", value: true); } if (!Scp966TargetPlayer.isPlayerDead) { SetWeightPlayerClientRpc(Scp966TargetPlayer.playerClientId, 1f); CheckIfTargetHasLowStamClientRpc(Scp966TargetPlayer.playerClientId); } break; case 2: base.agent.stoppingDistance = 0f; base.agent.speed = 5f; base.agent.acceleration = 12f; base.agent.autoBraking = false; DoAnimationClientRpc("Walking", value: true); if (!Scp966TargetPlayer.isInsideFactory || Scp966TargetPlayer.isPlayerDead || Vector3.Distance(((Component)this).transform.position, ((Component)Scp966TargetPlayer).transform.position) > 25f) { base.agent.ResetPath(); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); SetWeightPlayerClientRpc(Scp966TargetPlayer.playerClientId, 0f); break; } ((EnemyAI)this).SetDestinationToPosition(((Component)Scp966TargetPlayer).transform.position, false); if (Vector3.Distance(((Component)this).transform.position, ((Component)Scp966TargetPlayer).transform.position) < 1.2f && attackCooldown <= 0.27f) { DoAnimationClientRpc("Attack"); switch (base.creatureAnimator.GetInteger("AttackNumber")) { case 0: SetCurrentDamageClientRpc(firstAttack, 1); break; case 1: SetCurrentDamageClientRpc(secondAttack, 2); break; case 2: SetCurrentDamageClientRpc(thirdAttack, 0); break; default: MonsterLogger("We are outside of possible attack array!", pleaseReport: true); break; } } if (!Scp966TargetPlayer.isPlayerDead) { SetWeightPlayerClientRpc(Scp966TargetPlayer.playerClientId, 1f); CheckIfTargetHasLowStamClientRpc(Scp966TargetPlayer.playerClientId); } break; default: MonsterLogger("Behaviour State was changed to an non real one", pleaseReport: true); break; } } private void EnableMesh() { isVisibleForLocalPlayer = true; if ((Object)(object)mesh == (Object)null) { mesh = ((Component)this).GetComponent<SkinnedMeshRenderer>(); } ((Renderer)mesh).enabled = true; } private void DisableMesh() { isVisibleForLocalPlayer = false; if ((Object)(object)mesh == (Object)null) { mesh = ((Component)this).GetComponent<SkinnedMeshRenderer>(); } ((Renderer)mesh).enabled = false; } private void CheckIfLocalPlayerHasNightVision() { //IL_00be: Unknown result type (might be due to invalid IL or missing references) if (gettingScanned) { return; } if ((Object)(object)foundNightVision == (Object)null) { foundNightVision = GameObject.Find("nightVision(Clone)"); if ((Object)(object)foundNightVision != (Object)null) { batteryTransform = foundNightVision.transform.Find("Battery"); if ((Object)(object)batteryTransform != (Object)null) { barTransform = batteryTransform.Find("Bar"); } } } if ((Object)(object)foundNightVision != (Object)null && (Object)(object)batteryTransform != (Object)null && (Object)(object)barTransform != (Object)null) { GameObject gameObject = ((Component)batteryTransform).gameObject; if (gameObject.activeSelf) { float x = barTransform.localScale.x; if (previousNightVisionValue.HasValue) { if (x < previousNightVisionValue.Value) { EnableMesh(); } else { DisableMesh(); } previousNightVisionValue = x; } else { MonsterLogger("There was no value for previousNightVisionValue"); previousNightVisionValue = x; } } else { DisableMesh(); } } else { DisableMesh(); } } public void StartScanCoroutine() { if (canScan) { canScan = false; gettingScanned = true; ((MonoBehaviour)this).StartCoroutine(ScanCoroutine()); } } [IteratorStateMachine(typeof(<ScanCoroutine>d__38))] private IEnumerator ScanCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ScanCoroutine>d__38(0) { <>4__this = this }; } public override void HitEnemy(int force = 1, PlayerControllerB? playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); SendIfTargetHasLowStamServerRpc(); if (base.isEnemyDead) { return; } base.enemyHP -= force; if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead) { if (base.searchCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.searchCoroutine); } ((EnemyAI)this).KillEnemyOnOwnerClient(false); ((MonoBehaviour)this).StopCoroutine(passiveSound); SetWeightPlayerClientRpc(Scp966TargetPlayer.playerClientId, 0f); } } [IteratorStateMachine(typeof(<IdlePlay>d__40))] private IEnumerator IdlePlay() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <IdlePlay>d__40(0) { <>4__this = this }; } [ClientRpc] public void PlayOnShotIdleClientRpc(int x) { //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(594416341u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, x); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 594416341u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureVoice.PlayOneShot(idles[x]); } } } [ClientRpc] public void SwingAttackHitClientRpc() { //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_00ce: 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_00de: 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(3731458306u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3731458306u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; int num = 8; Collider[] array = Physics.OverlapBox(AttackArea.position, AttackArea.localScale, Quaternion.identity, num); if (array.Length != 0) { Collider[] array2 = array; foreach (Collider val3 in array2) { PlayerControllerB val4 = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(val3, false, false); if ((Object)(object)val4 != (Object)null) { base.creatureSFX.Play(); MonsterLogger(val4.health.ToString()); killCoroutine = ((MonoBehaviour)this).StartCoroutine(killPlayer(val4)); } } } attackCooldown = attackCooldownBeheader; } [IteratorStateMachine(typeof(<killPlayer>d__43))] private IEnumerator killPlayer(PlayerControllerB playerControllerB) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <killPlayer>d__43(0) { <>4__this = this, playerControllerB = playerControllerB }; } [ClientRpc] public void PlayScreamClientRpc(int x) { //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(1177901251u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, x); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1177901251u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureVoice.PlayOneShot(echoes[x]); } } } [ClientRpc] public void DoAnimationClientRpc(string animationName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2020107260u, val, (RpcDelivery)0); bool flag = animationName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(animationName, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2020107260u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetTrigger(animationName); } } [ClientRpc] public void DoAnimationClientRpc(string animationName, bool value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1148248770u, val, (RpcDelivery)0); bool flag = animationName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(animationName, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1148248770u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetBool(animationName, value); } } [ClientRpc] public void SetCurrentDamageClientRpc(int x, int animation) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(388176069u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, x); BytePacker.WriteValueBitPacked(val2, animation); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 388176069u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; currentDamage = x; base.creatureAnimator.SetInteger("AttackNumber", animation); } } } [ClientRpc] public void SetWeightPlayerClientRpc(ulong clientId, float weight) { //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 val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3591909219u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref weight, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3591909219u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (RoundManager.Instance.playersManager.localPlayerController.playerClientId == clientId) { if (weight == 0f) { noRegen = false; } else if (weight == 1f) { noRegen = true; } } } [ClientRpc] public void CheckIfTargetHasLowStamClientRpc(ulong clientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2762657010u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2762657010u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)RoundManager.Instance.playersManager.localPlayerController == (Object)(object)Scp966TargetPlayer && Scp966TargetPlayer.sprintMeter <= 0.3f) { SendIfTargetHasLowStamServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void SendIfTargetHasLowStamServerRpc() { //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(2218761627u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2218761627u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((EnemyAI)this).SwitchToBehaviourClientRpc(2); } } } private void MonsterLogger(string x, bool pleaseReport = false) { Plugin.Logger.LogInfo((object)("[SCP966SleepKiller][SCP966 - AI CLASS][" + (pleaseReport ? "This Error should be reported with the context of the error" : "NO NEED REPORT") + "] :: " + x)); } public override void OnDestroy() { ((EnemyAI)this).OnDestroy(); Scp966Manager.Instance.UnregisterScp966Instance(this); } protected override void __initializeVariables() { if (_playerNetVar == null) { throw new Exception("Scp966._playerNetVar cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)_playerNetVar).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)_playerNetVar, "_playerNetVar"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)_playerNetVar); ((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 ((NetworkBehaviour)this).__registerRpc(594416341u, new RpcReceiveHandler(__rpc_handler_594416341), "PlayOnShotIdleClientRpc"); ((NetworkBehaviour)this).__registerRpc(3731458306u, new RpcReceiveHandler(__rpc_handler_3731458306), "SwingAttackHitClientRpc"); ((NetworkBehaviour)this).__registerRpc(1177901251u, new RpcReceiveHandler(__rpc_handler_1177901251), "PlayScreamClientRpc"); ((NetworkBehaviour)this).__registerRpc(2020107260u, new RpcReceiveHandler(__rpc_handler_2020107260), "DoAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(1148248770u, new RpcReceiveHandler(__rpc_handler_1148248770), "DoAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(388176069u, new RpcReceiveHandler(__rpc_handler_388176069), "SetCurrentDamageClientRpc"); ((NetworkBehaviour)this).__registerRpc(3591909219u, new RpcReceiveHandler(__rpc_handler_3591909219), "SetWeightPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2762657010u, new RpcReceiveHandler(__rpc_handler_2762657010), "CheckIfTargetHasLowStamClientRpc"); ((NetworkBehaviour)this).__registerRpc(2218761627u, new RpcReceiveHandler(__rpc_handler_2218761627), "SendIfTargetHasLowStamServerRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_594416341(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 x = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref x); target.__rpc_exec_stage = (__RpcExecStage)1; ((Scp966)(object)target).PlayOnShotIdleClientRpc(x); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3731458306(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; ((Scp966)(object)target).SwingAttackHitClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1177901251(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 x = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref x); target.__rpc_exec_stage = (__RpcExecStage)1; ((Scp966)(object)target).PlayScreamClientRpc(x); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2020107260(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string animationName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationName, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((Scp966)(object)target).DoAnimationClientRpc(animationName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1148248770(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string animationName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationName, false); } bool value = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref value, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Scp966)(object)target).DoAnimationClientRpc(animationName, value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_388176069(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int x = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref x); int animation = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref animation); target.__rpc_exec_stage = (__RpcExecStage)1; ((Scp966)(object)target).SetCurrentDamageClientRpc(x, animation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3591909219(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) { ulong clientId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref clientId); float weight = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref weight, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Scp966)(object)target).SetWeightPlayerClientRpc(clientId, weight); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2762657010(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 clientId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref clientId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Scp966)(object)target).CheckIfTargetHasLowStamClientRpc(clientId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2218761627(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; ((Scp966)(object)target).SendIfTargetHasLowStamServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "Scp966"; } } public enum State { Searching, Tiering, Chasing } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable<NetworkBehaviourReference>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<NetworkBehaviourReference>(); } } } namespace ProjectSCP.SCP966.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }