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.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using System.Threading.Tasks; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalConfig; using LethalConfig.ConfigItems; using LethalConfig.ConfigItems.Options; using LethalLib.Modules; using Microsoft.CodeAnalysis; using On; using On.GameNetcodeStuff; using Shambler; using Shambler.NetcodePatcher; using Shambler.src.Soul_Devourer; using SolidLib.Registry; using SoulDev; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("bcs4313")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Shambler Enemy for Lethal Company.")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+c51dcc471e1537c434b4f4d6820e33495260355a")] [assembly: AssemblyProduct("Shambler")] [assembly: AssemblyTitle("Shambler")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SoulDev { internal class EntityWarp { public struct entrancePack { public EntranceTeleport tele; public Vector3 navPosition; } public static EntranceTeleport[] mapEntrances; public static entrancePack findNearestEntrance(EnemyAI __instance) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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) float num = 100000000f; EntranceTeleport val = null; EntranceTeleport[] array = mapEntrances; for (int i = 0; i < array.Length; i++) { if (__instance.isOutside == array[i].isEntranceToBuilding && Vector3.Distance(((Component)__instance).transform.position, ((Component)array[i]).transform.position) < num) { num = Vector3.Distance(((Component)__instance).transform.position, ((Component)array[i]).transform.position); val = array[i]; } } entrancePack result = default(entrancePack); NavMeshHit val2 = default(NavMeshHit); if ((Object)(object)val != (Object)null && NavMesh.SamplePosition(((Component)val).transform.position, ref val2, 10f, -1)) { result.navPosition = ((NavMeshHit)(ref val2)).position; } result.tele = val; return result; } public static void SendEnemyInside(EnemyAI __instance) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) __instance.isOutside = false; __instance.allAINodes = GameObject.FindGameObjectsWithTag("AINode"); EntranceTeleport tele = findNearestEntrance(__instance).tele; if (!Object.op_Implicit((Object)(object)tele)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find entrance teleport."); } Transform entrancePoint = tele.entrancePoint; if (!Object.op_Implicit((Object)(object)entrancePoint)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find best exit position."); } NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(((Component)entrancePoint).transform.position, ref val, 10f, -1)) { __instance.serverPosition = ((NavMeshHit)(ref val)).position; ((Component)__instance).transform.position = ((NavMeshHit)(ref val)).position; __instance.agent.Warp(__instance.serverPosition); __instance.SyncPositionToClients(); } else { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find exit NavmeshHit position"); } } public static void SendEnemyOutside(EnemyAI __instance, bool SpawnOnDoor = true) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) __instance.isOutside = true; __instance.allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode"); EntranceTeleport tele = findNearestEntrance(__instance).tele; if (!Object.op_Implicit((Object)(object)tele)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find entrance teleport."); } Transform entrancePoint = tele.entrancePoint; if (!Object.op_Implicit((Object)(object)entrancePoint)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find best exit position."); } NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(((Component)entrancePoint).transform.position, ref val, 10f, -1)) { __instance.serverPosition = ((NavMeshHit)(ref val)).position; ((Component)__instance).transform.position = ((NavMeshHit)(ref val)).position; __instance.agent.Warp(__instance.serverPosition); __instance.SyncPositionToClients(); } else { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find exit NavmeshHit position"); } } } internal class ShamblerEnemy : EnemyAI { public enum State { SearchingForPlayer, HeadingToEntrance, Crouching, Leaping, ClosingDistance, StabbingCapturedPlayer, HeadingToNest, PlantingStake, SneakyStab } protected Animator animator; private Vector3 nestSpot = Vector3.zero; public static List stuckPlayerIds = new List(); protected float baseLeapChance = 100f; protected float leaptime = 0f; protected Vector3 leapPos; protected EntranceTeleport nearestEntrance = null; public Vector3 nearestEntranceNavPosition = Vector3.zero; protected PlayerControllerB mostRecentPlayer = null; protected int entranceDelay = 0; protected float chanceToLocateEntrancePlayerBonus = 0f; protected float chanceToLocateEntrance = 0f; public List unreachableEnemies = new List(); public Vector3 itemNavmeshPosition = Vector3.zero; protected int sourcecycle = 75; protected float stamina = 120f; protected bool recovering = false; public int provokePoints = 0; public Transform turnCompass; protected float timeSinceHittingLocalPlayer; protected float timeSinceNewRandPos; protected Vector3 positionRandomness; protected Vector3 StalkPos; protected Random enemyRandom; protected bool isDeadAnimationDone; private bool markDead = false; public AudioSource creatureLeapLand; public AudioSource creatureAnger; private float angerSoundTimer = 0f; private float angerSoundTimer2 = 0f; public AudioSource creatureLaugh; public AudioSource creaturePlant; public AudioSource creatureSneakyStab; public AudioSource creatureDeath; public AudioSource creatureTakeDmg; public AudioSource creatureFrustrated; public AudioSource[] creatureSteps; public static List shamblerInstances = new List(); protected float runAnimationCoefficient = 14f; protected float walkAnimationCoefficient = 3f; [Header("AI Debug")] public bool debugThoughts = true; public bool debugDrawGoal = true; private Vector3 lastGoal = Vector3.zero; private bool usingCustomGoal = false; private float sizeCheckCooldown = 2f; private bool stepSoundCycle1 = false; private bool stepSoundCycle2 = false; public float stabTimeout = 6f; private bool doneStab = false; private bool isStabbing = false; public Transform stabPoint; public AudioSource creatureStab; private bool doneLeap = false; private bool isLeaping = false; private float leapTimer = 9f; private float leapAnimationLength = 0.5f; private float leapPeakHeight = 3f; public List EscapingEmployees = new List(); public PlayerControllerB capturedPlayer = null; public PlayerControllerB stabbedPlayer = null; private bool stabbedCapturedPlayer = false; public Transform capturePoint; public float captureRange = 5.35f; public float timeTillStab = 0f; private float crouchTimer = 0f; private float maxLeapDistance = 25f; public float crouchTimeout = 6f; private float spottedCooldown = 0f; private LayerMask WorldMask; private Vector3 stickyGoal = Vector3.zero; private float stickyScore = float.NegativeInfinity; private float stickyPickedAt = -999f; private float lastGoalDist = 9999f; private float stuckTimer = 0f; [SerializeField] private float goalMinLockSeconds = 1.2f; [SerializeField] private float goalRepathCooldown = 0.6f; [SerializeField] private float goalBetterBy = 0.35f; [SerializeField] private float goalArrivalTol = 0.9f; [SerializeField] private float stuckSpeedThresh = 0.15f; [SerializeField] private float stuckSeconds = 1.1f; private float coverLockUntil = -999f; private float lastSeenTime = -999f; [SerializeField] private float coverDwellSeconds = 5f; [SerializeField] private float seenGrace = 0.9f; public Transform footLCol; public Transform footRCol; public Transform armLCol; public Transform armRCol; public Transform headCol; [SerializeField] private float coverRequiredFraction = 0.7f; private float maxStabDistance = 4f; private float alertLevel = 0f; private float alertDecay = 1.5f; private float sneakyAlertLevel = 70f; private float alertRate = 1f; private float headingToNestTimeout = 6f; private float headingToNestDistance = 0f; private bool isPlanting = false; private bool donePlant = false; public GameObject heldStakeRef; public float plantCooldown = 5f; public float plantTime = -1f; private PlayerControllerB RageTarget = null; private bool inLegIndependentCoroutine = false; private void Think(string msg) { if (debugThoughts) { Debug.Log((object)$"[Shambler@{Time.time:F1}] {msg}"); } } private void OnDrawGizmosSelected() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) if (debugDrawGoal && !(lastGoal == Vector3.zero)) { Gizmos.color = Color.cyan; Gizmos.DrawLine(((Component)this).transform.position + Vector3.up * 0.5f, lastGoal + Vector3.up * 0.5f); Gizmos.DrawSphere(lastGoal, 0.25f); } } public void LogDebug(string text) { Plugin.Logger.LogInfo((object)text); } public void facePosition(Vector3 pos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) Vector3 val = pos - ((Component)this).transform.position; val.y = 0f; if (val != Vector3.zero) { Quaternion val2 = Quaternion.LookRotation(val); ((Component)this).transform.rotation = Quaternion.Euler(0f, ((Quaternion)(ref val2)).eulerAngles.y, 0f); } } public bool PlayerHeldByAnyShambler(PlayerControllerB ply) { try { foreach (ShamblerEnemy shamblerInstance in shamblerInstances) { if (Object.op_Implicit((Object)(object)shamblerInstance.capturedPlayer) && ((NetworkBehaviour)shamblerInstance.capturedPlayer).NetworkObjectId == ((NetworkBehaviour)ply).NetworkObjectId) { return true; } if (Object.op_Implicit((Object)(object)shamblerInstance.stabbedPlayer) && ((NetworkBehaviour)shamblerInstance.stabbedPlayer).NetworkObjectId == ((NetworkBehaviour)ply).NetworkObjectId) { return true; } } return false; } catch (Exception ex) { Debug.LogError((object)ex); } return false; } public override void OnDestroy() { shamblerInstances.Remove(this); ((EnemyAI)this).OnDestroy(); } public PlayerControllerB getNearestPlayer(bool addFilter = true) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB result = null; float num = 1E+09f; foreach (PlayerControllerB val in allPlayerScripts) { if (Object.op_Implicit((Object)(object)val) && !val.isPlayerDead && val.isPlayerControlled) { float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position); if (num2 < num && (PlayerQualifies(val) || !addFilter)) { num = num2; result = val; } } } return result; } public void SetAudioVolumes() { try { AudioSource obj = creatureAnger; obj.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource obj2 = creatureDeath; obj2.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource obj3 = creatureLaugh; obj3.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource obj4 = creatureLeapLand; obj4.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource obj5 = creaturePlant; obj5.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource creatureSFX = base.creatureSFX; creatureSFX.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource obj6 = creatureSneakyStab; obj6.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource obj7 = creatureStab; obj7.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource obj8 = creatureTakeDmg; obj8.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource creatureVoice = base.creatureVoice; creatureVoice.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource obj9 = creatureFrustrated; obj9.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource[] array = creatureSteps; foreach (AudioSource val in array) { AudioSource obj10 = creatureAnger; float volume = (obj10.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f); val.volume = volume; } } catch (Exception ex) { Debug.LogError((object)ex); } } public override void Start() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); if (((NetworkBehaviour)RoundManager.Instance).IsHost && Object.FindObjectsOfType().Length > Plugin.maxCount.Value) { Object.Destroy((Object)(object)((Component)this).gameObject); Debug.Log((object)"Shambler: Destroyed self (enemy count too high)"); } maxStabDistance = 5f * ((Component)this).transform.localScale.x; maxLeapDistance = 20f * ((Component)this).transform.localScale.x; captureRange = 5.35f * ((Component)this).transform.localScale.x; nestSpot = ((Component)this).transform.position; EntityWarp.mapEntrances = Object.FindObjectsOfType(false); mostRecentPlayer = getNearestPlayer(); animator = ((Component)this).gameObject.GetComponent(); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { DoAnimationClientRpc(0); } shamblerInstances.Add(this); stamina = 120f; timeSinceHittingLocalPlayer = 0f; timeSinceNewRandPos = 0f; positionRandomness = new Vector3(0f, 0f, 0f); enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex); isDeadAnimationDone = false; base.currentBehaviourStateIndex = 0; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); moaiSoundPlayClientRpc("creatureVoice"); base.enemyHP = Plugin.health.Value; WorldMask = BuildWorldMask(); Think($"WorldMask={((LayerMask)(ref WorldMask)).value} built."); PlayerControllerB nearestPlayer = getNearestPlayer(); if (Object.op_Implicit((Object)(object)nearestPlayer)) { Vector3 val = (Object.op_Implicit((Object)(object)nearestPlayer.playerEye) ? ((Component)nearestPlayer.playerEye).transform.position : (((Component)nearestPlayer).transform.position + Vector3.up * 1.6f)); Vector3 val2 = ((Component)this).transform.position + Vector3.up * 1.2f; RaycastHit val3 = default(RaycastHit); bool flag = Physics.Linecast(val, val2, ref val3, LayerMask.op_Implicit(WorldMask), (QueryTriggerInteraction)1); Think(string.Format("Initial LOS blocked={0}, hit={1}, layer={2}", flag, Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).collider) ? ((Object)((RaycastHit)(ref val3)).collider).name : "none", Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).collider) ? LayerMask.LayerToName(((Component)((RaycastHit)(ref val3)).collider).gameObject.layer) : "none")); } if (base.currentBehaviourStateIndex == 3 && Object.op_Implicit((Object)(object)base.targetPlayer)) { facePosition(((Component)base.targetPlayer).transform.position); } animator.SetLayerWeight(1, 0f); SetAudioVolumes(); } private static bool IsPlayerStaked(PlayerControllerB p) { if ((Object)(object)p == (Object)null || (Object)(object)((NetworkBehaviour)p).NetworkObject == (Object)null) { return false; } return stuckPlayerIds.Contains(((NetworkBehaviour)p).NetworkObject.NetworkObjectId); } public override void Update() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0079: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); Transform transform = ((Component)this).transform; Quaternion rotation = ((Component)this).transform.rotation; transform.rotation = Quaternion.Euler(0f, ((Quaternion)(ref rotation)).eulerAngles.y, 0f); animator.speed = 1f; sizeCheckCooldown -= Time.deltaTime; if (sizeCheckCooldown < 0f) { if (((Component)this).transform.localScale.x > 1f || ((Component)this).transform.localScale.y > 1f || ((Component)this).transform.localScale.z > 1f) { ((Component)this).transform.localScale = new Vector3(1f, 1f, 1f); maxStabDistance = 5f * ((Component)this).transform.localScale.x; maxLeapDistance = 20f * ((Component)this).transform.localScale.x; captureRange = 5.35f * ((Component)this).transform.localScale.x; } sizeCheckCooldown = 2f; } AnimatorStateInfo currentAnimatorStateInfo; if (!base.isEnemyDead && base.enemyHP <= 0 && !markDead) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); stopAllSound(); currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Death")) { currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Exit")) { animator.Play("Death", 0, 0f); } } base.isEnemyDead = true; base.enemyHP = 0; moaiSoundPlayClientRpc("creatureDeath"); deadEventClientRpc(); markDead = true; if (Plugin.disableColliderOnDeath.Value) { Collider[] components = ((Component)this).GetComponents(); foreach (Collider val in components) { val.enabled = false; } } else { BoxCollider component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { ((Collider)component).enabled = false; } } } if (base.isEnemyDead) { if (Object.op_Implicit((Object)(object)stabbedPlayer)) { stabbedPlayer = null; } if (Object.op_Implicit((Object)(object)capturedPlayer)) { capturedPlayer = null; } currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Death")) { currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("StayDead")) { animator.Play("StayDead"); } } return; } if (Object.op_Implicit((Object)(object)stabbedPlayer)) { if (!stabbedPlayer.playerCollider.enabled || !stabbedPlayer.isPlayerDead) { } stabbedPlayer.fallValue = 0f; stabbedPlayer.fallValueUncapped = 0f; if (!stabbedPlayer.isPlayerDead) { } } if (Object.op_Implicit((Object)(object)capturedPlayer)) { if (!capturedPlayer.playerCollider.enabled || !capturedPlayer.isPlayerDead) { } capturedPlayer.fallValue = 0f; capturedPlayer.fallValueUncapped = 0f; if (!capturedPlayer.isPlayerDead) { } } if (base.isEnemyDead) { if (!isDeadAnimationDone) { animator.speed = 1f; isDeadAnimationDone = true; stopAllSound(); if ((Object)(object)base.creatureVoice != (Object)null && (Object)(object)base.dieSFX != (Object)null) { base.creatureVoice.PlayOneShot(base.dieSFX); } } return; } AnimatorStateInfo currentAnimatorStateInfo2 = animator.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo2)).IsName("Walk")) { float num = ((AnimatorStateInfo)(ref currentAnimatorStateInfo2)).normalizedTime - Mathf.Floor(((AnimatorStateInfo)(ref currentAnimatorStateInfo2)).normalizedTime); if (num < 0.1f) { stepSoundCycle1 = false; stepSoundCycle2 = false; } if (num > 0.15f && !stepSoundCycle1) { moaiSoundPlayClientRpc("step"); stepSoundCycle1 = true; } if (num > 0.5f && !stepSoundCycle2) { moaiSoundPlayClientRpc("step"); stepSoundCycle2 = true; } } else { stepSoundCycle1 = (stepSoundCycle2 = false); } if (alertLevel > sneakyAlertLevel - 5f && ((NetworkBehaviour)RoundManager.Instance).IsHost) { if (angerSoundTimer <= 0f && FitToAssertDominance()) { angerSoundTimer = (float)(7.0 * enemyRandom.NextDouble() + 5.0); angerSoundTimer2 += 2.5f; moaiSoundPlayClientRpc("creatureAnger"); DoAssertDominanceClientRpc(); } else if (angerSoundTimer2 <= 0f && FitToExpressFrustration()) { angerSoundTimer2 = (float)(7.0 * enemyRandom.NextDouble() + 5.0); angerSoundTimer += 2.5f; moaiSoundPlayClientRpc("creatureFrustrated"); DoExpressFrustrationClientRpc(); } } if (angerSoundTimer >= 0f) { angerSoundTimer -= Time.deltaTime; } if (angerSoundTimer2 >= 0f) { angerSoundTimer2 -= Time.deltaTime; } if ((Object)(object)base.targetPlayer != (Object)null && base.targetPlayer.isPlayerDead) { base.targetPlayer = null; } base.movingTowardsTargetPlayer = (Object)(object)base.targetPlayer != (Object)null && !usingCustomGoal; timeSinceHittingLocalPlayer += Time.deltaTime; timeSinceNewRandPos += Time.deltaTime; if ((Object)(object)base.targetPlayer != (Object)null && ((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false, true)) { Transform obj = turnCompass; if (obj != null) { obj.LookAt(((Component)base.targetPlayer.gameplayCamera).transform.position); } } if (base.stunNormalizedTimer > 0f && !((NetworkBehaviour)RoundManager.Instance).IsHost) { } } private void LateUpdate() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) if (!base.isEnemyDead) { if (Object.op_Implicit((Object)(object)capturedPlayer)) { ((Component)capturedPlayer).transform.position = capturePoint.position; } if (Object.op_Implicit((Object)(object)stabbedPlayer)) { ((Component)stabbedPlayer).transform.position = stabPoint.position; } timeTillStab -= Time.deltaTime; } } public override void DoAIInterval() { //IL_0115: 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) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead) { return; } if (provokePoints > 0) { provokePoints--; } if (spottedCooldown > 0f) { spottedCooldown = Mathf.Max(0f, spottedCooldown - 1f); } if (entranceDelay > 0) { entranceDelay--; } if (sourcecycle > 0) { sourcecycle--; } else { sourcecycle = 75; unreachableEnemies.Clear(); } if (stamina <= 0f) { recovering = true; } else if (stamina > 60f) { recovering = false; } if (sourcecycle % 5 == 0) { EntityWarp.entrancePack entrancePack = EntityWarp.findNearestEntrance((EnemyAI)(object)this); nearestEntrance = entrancePack.tele; nearestEntranceNavPosition = entrancePack.navPosition; if (stamina < 120f) { stamina += 8f; } mostRecentPlayer = getNearestPlayer(); } if ((Object)(object)base.targetPlayer != (Object)null) { mostRecentPlayer = base.targetPlayer; } AIInterval(); if (alertLevel > 0f) { alertLevel = Mathf.Max(0f, alertLevel - alertDecay); } alertLevel = Mathf.Min(100f, alertLevel); } public void AIInterval() { if (Object.op_Implicit((Object)(object)capturedPlayer) && !stabbedCapturedPlayer && timeTillStab < 0f && base.currentBehaviourStateIndex != 5) { ((EnemyAI)this).StopSearch(base.currentSearch, true); ((EnemyAI)this).SwitchToBehaviourClientRpc(5); isStabbing = false; doneStab = false; } switch (base.currentBehaviourStateIndex) { case 0: usingCustomGoal = false; baseSearchingForPlayer(); break; case 1: usingCustomGoal = false; baseHeadingToEntrance(); break; case 2: baseCrouching(); break; case 4: baseClosingDistance(); break; case 3: baseLeaping(); break; case 5: baseStabbingCapturedPlayer(); break; case 6: baseHeadingToNest(); break; case 7: basePlantingStake(); break; case 8: baseSneakyStab(); break; default: LogDebug("This Behavior State doesn't exist!"); break; } } public void baseSneakyStab() { //IL_004f: 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_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) base.agent.speed = 0f; stabTimeout -= 0.2f; base.agent.updateRotation = false; if (Object.op_Implicit((Object)(object)getNearestPlayer())) { facePosition(((Component)getNearestPlayer()).transform.position); } if (base.isEnemyDead) { base.agent.updateRotation = true; isStabbing = false; doneStab = false; ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); } if (!isStabbing) { ((MonoBehaviour)this).StartCoroutine(DoSneakyStab()); stabTimeout = 6f; isStabbing = true; } else if (doneStab) { base.agent.updateRotation = true; isStabbing = false; doneStab = false; if (!Object.op_Implicit((Object)(object)stabbedPlayer)) { stabbedPlayer = getNearestPlayer(); if ((Object)(object)stabbedPlayer != (Object)null) { SetStabbedPlayerClientRpc(((NetworkBehaviour)stabbedPlayer).NetworkObject.NetworkObjectId); } } ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); } else { if (!(stabTimeout < 0f)) { return; } base.agent.updateRotation = true; isStabbing = false; doneStab = false; if (!Object.op_Implicit((Object)(object)stabbedPlayer)) { stabbedPlayer = getNearestPlayer(); if ((Object)(object)stabbedPlayer != (Object)null) { SetStabbedPlayerClientRpc(((NetworkBehaviour)stabbedPlayer).NetworkObject.NetworkObjectId); } } ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); } } [ClientRpc] public void SetCapturedPlayerClientRpc(ulong playerid, bool reset = false) { //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(2925436343u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref reset, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2925436343u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (reset) { capturedPlayer = null; } RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { capturedPlayer = val3; } } } [ClientRpc] public void SetStabbedPlayerClientRpc(ulong playerid, bool reset = false) { //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(3110006365u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref reset, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3110006365u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (reset) { stabbedPlayer = null; } RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { stabbedPlayer = val3; } } } [ClientRpc] public void DmgPlayerClientRpc(ulong playerid, int amount) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) 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(3897930302u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); BytePacker.WriteValueBitPacked(val2, amount); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3897930302u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { val3.DamagePlayer(amount, true, true, (CauseOfDeath)6, 0, false, default(Vector3)); } } } public IEnumerator DoSneakyStab() { if (Object.op_Implicit((Object)(object)getNearestPlayer())) { Think("DoSneakyStab"); DoAnimationClientRpc(7); AnimPlayClientRpc("SneakyStab"); moaiSoundPlayClientRpc("creatureSneakyStab"); yield return (object)new WaitForSeconds(0.4f); stabbedPlayer = getNearestPlayer(); if ((Object)(object)stabbedPlayer != (Object)null) { SetStabbedPlayerClientRpc(((NetworkBehaviour)stabbedPlayer).NetworkObject.NetworkObjectId); } capturedPlayer = null; SetCapturedPlayerClientRpc(0uL, reset: true); stabbedCapturedPlayer = true; if ((Object)(object)stabbedPlayer != (Object)null) { DmgPlayerClientRpc(((NetworkBehaviour)stabbedPlayer).NetworkObject.NetworkObjectId, 20); } yield return (object)new WaitForSeconds(0.65f); doneStab = true; Think("Stab Done"); yield break; } base.agent.updateRotation = true; isStabbing = false; doneStab = false; if (!Object.op_Implicit((Object)(object)stabbedPlayer)) { stabbedPlayer = getNearestPlayer(); if ((Object)(object)stabbedPlayer != (Object)null) { SetStabbedPlayerClientRpc(((NetworkBehaviour)stabbedPlayer).NetworkObject.NetworkObjectId); } } ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); } public void baseStabbingCapturedPlayer() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) base.agent.speed = 0f; if (base.isEnemyDead) { base.agent.updateRotation = true; isStabbing = false; doneStab = false; ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); } if (!isStabbing) { ((MonoBehaviour)this).StartCoroutine(DoStab()); isStabbing = true; } else { if (!doneStab) { return; } base.agent.updateRotation = true; isStabbing = false; doneStab = false; capturedPlayer = null; SetCapturedPlayerClientRpc(0uL, reset: true); if (!Object.op_Implicit((Object)(object)stabbedPlayer)) { stabbedPlayer = getNearestPlayer(); if ((Object)(object)stabbedPlayer != (Object)null) { SetStabbedPlayerClientRpc(((NetworkBehaviour)stabbedPlayer).NetworkObject.NetworkObjectId); } } ((EnemyAI)this).SwitchToBehaviourClientRpc(0); DoAnimationClientRpc(0); AnimPlayClientRpc("Idle"); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); } } public IEnumerator DoStab() { Think("DoStab"); DoAnimationClientRpc(5); AnimPlayClientRpc("StabVictimHeld"); moaiSoundPlayClientRpc("creatureStab"); if (Object.op_Implicit((Object)(object)capturedPlayer)) { SetColliderClientRpc(((NetworkBehaviour)capturedPlayer).NetworkObject.NetworkObjectId, value: false); } yield return (object)new WaitForSeconds(1.1f); stabbedPlayer = capturedPlayer; if ((Object)(object)stabbedPlayer != (Object)null) { SetStabbedPlayerClientRpc(((NetworkBehaviour)stabbedPlayer).NetworkObject.NetworkObjectId); } capturedPlayer = null; SetCapturedPlayerClientRpc(0uL); stabbedCapturedPlayer = true; DmgPlayerClientRpc(((NetworkBehaviour)stabbedPlayer).NetworkObject.NetworkObjectId, 30); yield return (object)new WaitForSeconds(1.3f); if (Object.op_Implicit((Object)(object)stabbedPlayer)) { SetColliderClientRpc(((NetworkBehaviour)stabbedPlayer).NetworkObject.NetworkObjectId, value: false); } doneStab = true; Think("Stab Done"); } public void baseLeaping() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) base.agent.updateRotation = false; base.agent.speed = 0f; base.targetPlayer = getNearestPlayer(); leapTimer -= 0.2f; if ((Object)(object)base.targetPlayer == (Object)null) { base.agent.updateRotation = true; ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); } facePosition(((Component)base.targetPlayer).transform.position); if (!isLeaping && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) <= maxLeapDistance) { DoGroundHopClientRpc(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position); isLeaping = true; } else if (doneLeap) { base.agent.updateRotation = true; ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); } else if (leapTimer < 0f) { base.agent.updateRotation = true; ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); } } public IEnumerator DoGroundHop(Vector3 targetPos, Vector3 shamblerStartPos) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) Think("DoGroundHop"); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { AnimPlayClientRpc("Leap-Land"); moaiSoundPlayClientRpc("creatureLeapLand"); } ((Component)this).transform.position = shamblerStartPos; float duration = leapAnimationLength + Vector3.Distance(((Component)this).transform.position, targetPos) / maxLeapDistance * 0.5f; float elapsed = 0f; float arcPeak = leapPeakHeight; while (elapsed < duration) { float t = elapsed / duration; float height = Mathf.Sin(t * MathF.PI) * arcPeak; ((Component)this).transform.position = Vector3.Lerp(shamblerStartPos, targetPos, t) + Vector3.up * height; elapsed += Time.deltaTime; yield return null; } ((Component)this).transform.position = targetPos; Think("Landing..."); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { AnimPlayClientRpc("Land-Capture"); AttemptCapturePlayer(); DoAnimationClientRpc(4); yield return (object)new WaitForSeconds(1.2f); doneLeap = true; } Think("Leap Done"); } [ClientRpc] public void DoGroundHopClientRpc(Vector3 targetPos, Vector3 shamblerStartPos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) 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(2556090093u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref targetPos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref shamblerStartPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2556090093u, 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(DoGroundHop(targetPos, shamblerStartPos)); } } } public void ClaimHuman() { } public void StakeNotify(PlayerControllerB player) { if ((Object)(object)player != (Object)null) { EscapingEmployees.Add(((NetworkBehaviour)player).NetworkObject.NetworkObjectId); } } public void StakeUnNotify(PlayerControllerB player) { if ((Object)(object)player != (Object)null) { EscapingEmployees.Remove(((NetworkBehaviour)player).NetworkObject.NetworkObjectId); } else { EscapingEmployees.Clear(); } } public void AttemptCapturePlayer() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) Think("Shambler: Attempt Capture Player"); PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (Vector3.Distance(((Component)val).transform.position, ((Component)this).transform.position) < captureRange && (Object)(object)val != (Object)(object)capturedPlayer && (Object)(object)val != (Object)(object)stabbedPlayer) { Think("Shambler: I GOTCHA"); capturedPlayer = val; stabbedCapturedPlayer = false; val.CancelSpecialTriggerAnimations(); attachPlayerClientRpc(((NetworkBehaviour)capturedPlayer).NetworkObject.NetworkObjectId, lastHit: false, 50); timeTillStab = (float)(2.0 + 30.0 * enemyRandom.NextDouble() * enemyRandom.NextDouble() * enemyRandom.NextDouble()); DmgPlayerClientRpc(((NetworkBehaviour)val).NetworkObject.NetworkObjectId, 20); return; } } Think("Shambler: OHHHH I MISSED!"); } public void baseCrouching() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) base.agent.speed = 0f; DoAnimationClientRpc(2); AnimPlayClientRpc("Crouching"); Debug.Log((object)("Crouching... timer: " + crouchTimer)); crouchTimeout -= 0.2f; PlayerControllerB val = (((Object)(object)base.targetPlayer != (Object)null && ((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false, true)) ? base.targetPlayer : getNearestPlayer()); if (Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position) > maxLeapDistance) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); return; } if (Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position) <= maxStabDistance) { doneStab = false; isStabbing = false; ((EnemyAI)this).SwitchToBehaviourClientRpc(8); return; } crouchTimer -= 0.2f; if (crouchTimer <= 0f) { Think("Switched to leap mode"); doneLeap = false; isLeaping = false; leapTimer = 9f; ((EnemyAI)this).SwitchToBehaviourClientRpc(3); } else if (crouchTimeout <= 0f) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } } private LayerMask BuildWorldMask() { //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) string[] array = new string[7] { "Default", "Room", "Colliders", "MiscLevelGeometry", "Terrain", "Railing", "DecalStickableSurface" }; string[] array2 = new string[8] { "Player", "Enemy", "Enemies", "Players", "Ragdoll", "Trigger", "Ignore Raycast", "UI" }; int num = 0; string[] array3 = array; foreach (string text in array3) { int num2 = LayerMask.NameToLayer(text); if (num2 >= 0) { num |= 1 << num2; } else { Debug.LogWarning((object)("[WorldMask] Include layer \"" + text + "\" not found.")); } } string[] array4 = array2; foreach (string text2 in array4) { int num3 = LayerMask.NameToLayer(text2); if (num3 >= 0) { num &= ~(1 << num3); } } num &= ~(1 << ((Component)this).gameObject.layer); if (num == 0) { Debug.LogWarning((object)"[WorldMask] Mask resolved to 0; falling back to Physics.DefaultRaycastLayers."); num = -5 & ~(1 << ((Component)this).gameObject.layer); } Debug.Log((object)$"[WorldMask] Built mask={num} (self layer excluded: {LayerMask.LayerToName(((Component)this).gameObject.layer)})"); return LayerMask.op_Implicit(num); } private float CoverScoreAllPlayers(Vector3 pos) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008f: 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) PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; int num = 0; float num2 = 0f; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && val.isPlayerControlled && !val.isPlayerDead && !OccludedFromPlayer_Multi(pos, val)) { num++; Vector3 val2 = pos - ((Component)val).transform.position; Vector3 normalized = ((Vector3)(ref val2)).normalized; float num3 = Mathf.Max(0f, Vector3.Dot(((Component)val).transform.forward, normalized)); if (num3 > num2) { num2 = num3; } } } return (num == 0) ? 2f : (-0.9f * (float)num - 0.8f * num2); } private bool TryFindCoverAgainstPlayer(PlayerControllerB ply, Vector3 around, float searchRadius, float backoff, out Vector3 coverPos) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) coverPos = Vector3.zero; if ((Object)(object)ply == (Object)null) { return false; } Vector3 val = (((Object)(object)ply.playerEye != (Object)null) ? ((Component)ply.playerEye).transform.position : (((Component)ply).transform.position + Vector3.up * 1.6f)); Vector3 val2 = around - val; float num = Mathf.Max(searchRadius, ((Vector3)(ref val2)).magnitude + searchRadius); RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(val, ((Vector3)(ref val2)).normalized, ref val3, num, LayerMask.op_Implicit(WorldMask), (QueryTriggerInteraction)1)) { Vector3 pos = ((RaycastHit)(ref val3)).point + ((RaycastHit)(ref val3)).normal * backoff; if (TrySampleNavmesh(pos, 2.5f, out var hitPos) && OccludedFromPlayer_Multi(hitPos, ply)) { coverPos = hitPos; return true; } } return false; } private bool TryFindGroupCover(Vector3 center, float minR, float maxR, int rings, int samplesPerRing, out Vector3 best) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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) best = Vector3.zero; float num = float.NegativeInfinity; Vector3 val = default(Vector3); for (int i = 0; i < rings; i++) { float num2 = ((rings == 1) ? 1f : ((float)i / (float)(rings - 1))); float num3 = Mathf.Lerp(minR, maxR, num2); for (int j = 0; j < samplesPerRing; j++) { float num4 = (float)j / (float)samplesPerRing * MathF.PI * 2f; ((Vector3)(ref val))..ctor(Mathf.Cos(num4), 0f, Mathf.Sin(num4)); Vector3 pos = center + val * num3; if (!TrySampleNavmesh(pos, 2.5f, out var hitPos)) { continue; } float num5 = CoverScoreAllPlayers(hitPos); if (!(num5 <= 0.1f)) { float num6 = 9.5f; float num7 = Vector3.Distance(hitPos, center); float num8 = 1f - Mathf.Clamp01(Mathf.Abs(num7 - num6) / num6); float num9 = Vector3.Distance(((Component)this).transform.position, hitPos); float num10 = 1f - Mathf.Clamp01(num9 / 25f); float num11 = 1.4f * num5 + 0.8f * num8 + 0.3f * num10; if (num11 > num) { num = num11; best = hitPos; } } } } return num > float.NegativeInfinity; } private bool TryGetMostDangerousViewer(out PlayerControllerB danger, out float align) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_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) danger = null; align = 0f; PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && val.isPlayerControlled && !val.isPlayerDead && !OccludedFromPlayer_Multi(((Component)this).transform.position, val)) { Vector3 val2 = ((Component)this).transform.position - ((Component)val).transform.position; Vector3 normalized = ((Vector3)(ref val2)).normalized; float num = Mathf.Max(0f, Vector3.Dot(((Component)val).transform.forward, normalized)); if (num > align) { align = num; danger = val; } } } return (Object)(object)danger != (Object)null; } private bool ReachedGoal(Vector3 goal) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (goal == Vector3.zero) { return false; } return Vector3.Distance(((Component)this).transform.position, goal) <= goalArrivalTol; } private bool PathBadOrPartial() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 return (int)base.agent.pathStatus == 1 || (int)base.agent.pathStatus == 2; } private bool CooldownsAllowRepath() { if (Time.time - stickyPickedAt < goalMinLockSeconds) { return false; } if (Time.time - stickyPickedAt < goalRepathCooldown) { return false; } return true; } private void ApplyStickyDestination(Vector3 goal) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (!(goal == Vector3.zero)) { if (stickyGoal != goal) { base.agent.SetDestination(goal); } stickyGoal = goal; usingCustomGoal = true; base.movingTowardsTargetPlayer = false; } } public void DistanceBasedPace(PlayerControllerB ply) { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) if (ply.isSprinting) { base.agent.speed = 8.2f * Plugin.moaiGlobalSpeed.Value * Math.Max(1f, 16f / Vector3.Distance(((Component)this).transform.position, ((Component)ply).transform.position) * 0.5f + 1f); } else { base.agent.speed = 6f * Plugin.moaiGlobalSpeed.Value * Math.Max(1f, 16f / Vector3.Distance(((Component)this).transform.position, ((Component)ply).transform.position) * 0.5f + 1f); } } public Vector3 chooseTravelGoal(out float outScore) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0634: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_067f: Unknown result type (might be due to invalid IL or missing references) //IL_0684: Unknown result type (might be due to invalid IL or missing references) //IL_068b: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_0560: Unknown result type (might be due to invalid IL or missing references) //IL_0565: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06d5: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Unknown result type (might be due to invalid IL or missing references) outScore = float.NegativeInfinity; PlayerControllerB val = (((Object)(object)base.targetPlayer != (Object)null && ((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false, true)) ? base.targetPlayer : getNearestPlayer()); if ((Object)(object)val == (Object)null) { Think("chooseTravelGoal: no valid player — staying put."); return ((Component)this).transform.position; } DistanceBasedPace(val); if (alertLevel >= sneakyAlertLevel) { DistanceBasedPace(val); return ((Component)getNearestPlayer()).transform.position; } bool flag = alertLevel < sneakyAlertLevel; Vector3 position = ((Component)val).transform.position; Vector3 forward = ((Component)val).transform.forward; Vector3 right = ((Component)val).transform.right; if (flag && spottedCooldown <= 0f && TryGetMostDangerousViewer(out var danger, out var align)) { float num = Vector3.Distance(((Component)this).transform.position, ((Component)danger).transform.position); if (align >= 0.6f && num <= 20f) { Vector3 val2 = ((Component)this).transform.position - ((Component)danger).transform.position; val2.y = 0f; Vector3 val3 = ((Component)this).transform.position + ((Vector3)(ref val2)).normalized * 8f; if (TryFindCoverAgainstPlayer(danger, val3, 16f, 1.2f, out var coverPos)) { spottedCooldown = 3f; outScore = 5f; return coverPos; } if (TryFindGroupCover(val3, 8f, 16f, 3, 16, out var best)) { spottedCooldown = 3f; outScore = 4f; return best; } Vector3 pos = ((Component)this).transform.position + ((Vector3)(ref val2)).normalized * 6f; if (TrySampleNavmesh(pos, 3f, out var hitPos)) { spottedCooldown = 2f; outScore = 2f; return hitPos; } } } if (flag && TryFindCoverAgainstPlayer(val, position, 18f, 1.1f, out var coverPos2)) { outScore = 3.5f; DistanceBasedPace(val); return coverPos2; } if (flag && TryFindGroupCover(position, 1.1f, 14f, 3, 16, out var best2)) { outScore = 3f; DistanceBasedPace(val); return best2; } float num2 = 7.5f; float num3 = 11f; float num4 = 9f; float num5 = 0f; float maxDist = 6f; List list = new List(8) { position - forward * num2, position - forward * num3, position - forward * num4 + right * (num4 * 0.75f), position - forward * num4 - right * (num4 * 0.75f), position + Quaternion.AngleAxis(35f, Vector3.up) * -forward * num5, position + Quaternion.AngleAxis(-35f, Vector3.up) * -forward * num5, position - forward * (num5 * 0.6f), position - forward * (num5 * 1.3f) }; for (int i = 0; i < list.Count; i++) { List list2 = list; int index = i; list2[index] += new Vector3(Random.Range(-0.75f, 0.75f), 0f, Random.Range(-0.75f, 0.75f)); } float num6 = float.NegativeInfinity; Vector3 hitPos2 = ((Component)this).transform.position; foreach (Vector3 item in list) { if (TrySampleNavmesh(item, maxDist, out var hitPos3)) { Vector3 val4 = hitPos3 - position; Vector3 normalized = ((Vector3)(ref val4)).normalized; float num7 = Mathf.Clamp01(0f - Vector3.Dot(forward, normalized)); float num8 = (flag ? 9.5f : 6.5f); float num9 = Vector3.Distance(hitPos3, position); float num10 = 1f - Mathf.Clamp01(Mathf.Abs(num9 - num8) / num8); float num11 = CoverScoreAllPlayers(hitPos3); float num12 = (flag ? num11 : Mathf.Max(num11, -0.4f)); bool flag2 = num11 <= 0.1f; if (Time.time - lastSeenTime < seenGrace && flag2) { num12 -= 1.2f; } float num13 = Vector3.Distance(((Component)this).transform.position, hitPos3); float num14 = 1f - Mathf.Clamp01(num13 / 30f); float num15 = Mathf.Abs(Vector3.Dot(normalized, right)); float num16 = (flag ? (0.15f * num15) : (0.35f * num15)); float num17 = (flag ? 1f : 0.6f); float num18 = num17 * num7 + 1f * num10 + 1.2f * num12 + 0.3f * num14 + 0.4f * num16; if (num18 > num6) { num6 = num18; hitPos2 = hitPos3; } } } if (num6 == float.NegativeInfinity) { Vector3 val5 = position - ((Component)this).transform.position; val5.y = 0f; if (((Vector3)(ref val5)).sqrMagnitude > 0.01f) { val5 = Quaternion.AngleAxis(20f * ((Random.value > 0.5f) ? 1f : (-1f)), Vector3.up) * ((Vector3)(ref val5)).normalized * 4f; if (!TrySampleNavmesh(((Component)this).transform.position + val5, 6f, out hitPos2)) { hitPos2 = ((Component)this).transform.position; } } } DistanceBasedPace(val); outScore = num6; return hitPos2; } private bool TrySampleNavmesh(Vector3 pos, float maxDist, out Vector3 hitPos, int areaMask = -1) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(pos, ref val, maxDist, areaMask)) { hitPos = ((NavMeshHit)(ref val)).position; return true; } hitPos = Vector3.zero; return false; } private IEnumerable AllActivePlayers() { PlayerControllerB[] arr = RoundManager.Instance.playersManager.allPlayerScripts; foreach (PlayerControllerB p in arr) { if ((Object)(object)p != (Object)null && p.isPlayerControlled && !p.isPlayerDead) { yield return p; } } } private bool PlayerHasLOSTo(Vector3 candidatePos, PlayerControllerB ply, LayerMask mask, float raise = 1.4f) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) Vector3 val = (((Object)(object)ply.playerEye != (Object)null) ? ((Component)ply.playerEye).transform.position : (((Component)ply).transform.position + Vector3.up * 1.6f)); Vector3 val2 = candidatePos + Vector3.up * raise; RaycastHit val3 = default(RaycastHit); return !Physics.Linecast(val, val2, ref val3, LayerMask.op_Implicit(mask), (QueryTriggerInteraction)1); } private bool IsVisibleToAnyPlayers(Vector3 pos) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && val.isPlayerControlled && !val.isPlayerDead && !OccludedFromPlayer_Multi(pos, val)) { return true; } } return false; } private bool IsOccludedFromAllPlayers(Vector3 pos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return !IsVisibleToAnyPlayers(pos); } private Vector3[] BuildPointsForCandidate(Vector3 candidatePos, PlayerControllerB ply) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) Vector3 val = (((Object)(object)ply != (Object)null && (Object)(object)ply.playerEye != (Object)null) ? ((Component)ply.playerEye).transform.position : (((Object)(object)ply != (Object)null) ? (((Component)ply).transform.position + Vector3.up * 1.6f) : (candidatePos + Vector3.up * 1.6f))); Vector3 val2 = candidatePos - val; Vector3 fwd = ((Vector3)(ref val2)).normalized; if (((Vector3)(ref fwd)).sqrMagnitude < 0.0001f) { fwd = Vector3.forward; } val2 = Vector3.Cross(Vector3.up, fwd); Vector3 right = ((Vector3)(ref val2)).normalized; val2 = Vector3.Cross(fwd, right); Vector3 up = ((Vector3)(ref val2)).normalized; Vector3 lp2 = (Vector3)(Object.op_Implicit((Object)(object)footLCol) ? footLCol.localPosition : new Vector3(-0.25f, 0.1f, 0f)); Vector3 lp3 = (Vector3)(Object.op_Implicit((Object)(object)footRCol) ? footRCol.localPosition : new Vector3(0.25f, 0.1f, 0f)); Vector3 lp4 = (Vector3)(Object.op_Implicit((Object)(object)armLCol) ? armLCol.localPosition : new Vector3(-0.45f, 1.2f, 0f)); Vector3 lp5 = (Vector3)(Object.op_Implicit((Object)(object)armRCol) ? armRCol.localPosition : new Vector3(0.45f, 1.2f, 0f)); Vector3 lp6 = (Vector3)(Object.op_Implicit((Object)(object)headCol) ? headCol.localPosition : new Vector3(0f, 1.7f, 0f)); return (Vector3[])(object)new Vector3[5] { ToWorld(lp2), ToWorld(lp3), ToWorld(lp4), ToWorld(lp5), ToWorld(lp6) }; Vector3 ToWorld(Vector3 lp) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) return candidatePos + right * lp.x + up * lp.y + fwd * lp.z; } } private bool OccludedFromPlayer_Multi(Vector3 candidatePos, PlayerControllerB ply) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ply == (Object)null) { return true; } Vector3 val = (((Object)(object)ply.playerEye != (Object)null) ? ((Component)ply.playerEye).transform.position : (((Component)ply).transform.position + Vector3.up * 1.6f)); Vector3[] array = BuildPointsForCandidate(candidatePos, ply); int num = 0; for (int i = 0; i < array.Length; i++) { if (Physics.Linecast(val, array[i], LayerMask.op_Implicit(WorldMask), (QueryTriggerInteraction)1)) { num++; } } float num2 = (float)num / (float)array.Length; return num2 >= coverRequiredFraction; } public void baseClosingDistance() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: 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_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Unknown result type (might be due to invalid IL or missing references) lookStep(); base.agent.speed = 6f * Plugin.moaiGlobalSpeed.Value; Vector3 velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude > base.agent.speed / 4f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(1); } velocity = base.agent.velocity; SetParamClientRpc("WalkSpeed", ((Vector3)(ref velocity)).magnitude / walkAnimationCoefficient); } else { velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude <= base.agent.speed / 8f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(0); } SetParamClientRpc("WalkSpeed", 1f); } } PlayerControllerB val = (((Object)(object)base.targetPlayer != (Object)null && ((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false, true)) ? base.targetPlayer : getNearestPlayer()); if ((Object)(object)val == (Object)null || (Object)(object)getNearestPlayer() == (Object)null) { Think("No valid player; switching to Search."); usingCustomGoal = false; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); return; } bool flag = IsVisibleToAnyPlayers(((Component)this).transform.position); if (flag) { lastSeenTime = Time.time; } if (alertLevel >= 70f && !inLegIndependentCoroutine && (double)Vector3.Distance(((Component)getNearestPlayer()).transform.position, ((Component)this).transform.position) < (double)maxLeapDistance / 1.5) { ((EnemyAI)this).SwitchToBehaviourClientRpc(2); crouchTimer = (float)(0.5 + enemyRandom.NextDouble() * 1.5); crouchTimeout = 7f; return; } if (alertLevel <= 70f && Vector3.Distance(((Component)getNearestPlayer()).transform.position, ((Component)this).transform.position) < maxStabDistance) { doneStab = false; isStabbing = false; ((EnemyAI)this).SwitchToBehaviourClientRpc(8); return; } if (FitToAssertDominance() && !Object.op_Implicit((Object)(object)capturedPlayer) && !inLegIndependentCoroutine && Object.op_Implicit((Object)(object)base.targetPlayer) && Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position) < maxStabDistance) { doneStab = false; isStabbing = false; ((EnemyAI)this).SwitchToBehaviourClientRpc(8); return; } if (!flag && Time.time < coverLockUntil) { usingCustomGoal = true; base.movingTowardsTargetPlayer = false; if (stickyGoal != Vector3.zero && base.agent.destination != stickyGoal) { base.agent.SetDestination(stickyGoal); } return; } float num = ((stickyGoal == Vector3.zero) ? 9999f : Vector3.Distance(((Component)this).transform.position, stickyGoal)); velocity = base.agent.velocity; float magnitude = ((Vector3)(ref velocity)).magnitude; if (magnitude < stuckSpeedThresh && num > goalArrivalTol) { stuckTimer += Time.deltaTime; } else { stuckTimer = 0f; } bool flag2 = ReachedGoal(stickyGoal); bool flag3 = stuckTimer >= stuckSeconds; bool flag4 = flag2 || flag3 || PathBadOrPartial() || stickyGoal == Vector3.zero; if (flag4 || CooldownsAllowRepath()) { float outScore; Vector3 val2 = chooseTravelGoal(out outScore); bool flag5 = outScore > stickyScore + goalBetterBy; if (IsVisibleToAnyPlayers(val2) && Time.time - lastSeenTime < seenGrace) { flag5 = outScore > stickyScore + (goalBetterBy + 1f); } if (flag4 || flag5) { if (IsOccludedFromAllPlayers(val2)) { coverLockUntil = Time.time + coverDwellSeconds; } else { coverLockUntil = -999f; } stickyScore = outScore; stickyPickedAt = Time.time; ApplyStickyDestination(val2); } else { usingCustomGoal = true; base.movingTowardsTargetPlayer = false; } } else { usingCustomGoal = true; base.movingTowardsTargetPlayer = false; } if (stickyGoal != Vector3.zero && base.agent.destination != stickyGoal) { base.agent.SetDestination(stickyGoal); } lastGoalDist = num; if ((Object)(object)val == (Object)null || Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position) > 62f || stamina <= 0f) { Think("Exiting sneak (reason=" + (((Object)(object)val == (Object)null) ? "no target" : ((stamina <= 0f) ? "tired" : "too far")) + ")"); base.targetPlayer = null; usingCustomGoal = false; stickyGoal = Vector3.zero; stickyScore = float.NegativeInfinity; ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } } public void lookStep() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008f: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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) PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; float num = 0f; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (!((Object)(object)val == (Object)null) && !val.isPlayerDead && val.isPlayerControlled && PlayerQualifies(val)) { Vector3 val2 = ((Component)this).transform.position - ((Component)val).transform.position; Vector3 normalized = ((Vector3)(ref val2)).normalized; val2 = ((Component)val.playerEye).transform.forward; Vector3 normalized2 = ((Vector3)(ref val2)).normalized; float num2 = Vector3.Dot(normalized2, normalized) * Math.Max(25f - Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position), 0f); if (num2 > num) { num = num2; } } } if (num > 0f) { alertLevel += num * alertRate; } } public void baseSearchingForPlayer(float lineOfSightRange = 62f) { //IL_004c: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) base.agent.speed = 6f * Plugin.moaiGlobalSpeed.Value; base.agent.angularSpeed = 120f; if (sourcecycle % 5 == 0) { base.targetPlayer = null; } Vector3 velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude > base.agent.speed / 4f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(1); } velocity = base.agent.velocity; SetParamClientRpc("WalkSpeed", ((Vector3)(ref velocity)).magnitude / walkAnimationCoefficient); } else { velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude <= base.agent.speed / 8f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(0); } SetParamClientRpc("WalkSpeed", 1f); } } if (!base.creatureVoice.isPlaying) { moaiSoundPlayClientRpc("creatureVoice"); } updateEntranceChance(); if (enemyRandom.NextDouble() < (double)chanceToLocateEntrance && ((Component)this).gameObject.transform.localScale.x <= 2.2f && Plugin.canEnterIndoors.Value) { Think("Switching to HeadingToEntrance."); ((EnemyAI)this).StopSearch(base.currentSearch, true); ((EnemyAI)this).SwitchToBehaviourClientRpc(1); } if ((FoundClosestPlayerInRange(lineOfSightRange, needLineOfSight: true) && stamina >= 120f) || provokePoints > 0) { Think("Found player for ClosingDistance."); ((EnemyAI)this).StopSearch(base.currentSearch, true); ((EnemyAI)this).SwitchToBehaviourClientRpc(4); return; } if (stamina < 100f) { base.targetPlayer = null; } if (stabbedCapturedPlayer) { capturedPlayer = null; headingToNestDistance = 9999f; headingToNestTimeout = 6f; ((EnemyAI)this).SwitchToBehaviourClientRpc(6); ((EnemyAI)this).StopSearch(base.currentSearch, true); } } public void baseHeadingToNest() { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) base.agent.speed = 6f * Plugin.moaiGlobalSpeed.Value; base.agent.angularSpeed = 120f; headingToNestTimeout -= 0.2f; if (headingToNestTimeout < 0f) { if (headingToNestDistance > Vector3.Distance(((Component)this).transform.position, nestSpot)) { isPlanting = false; donePlant = false; ((EnemyAI)this).SwitchToBehaviourClientRpc(7); } else { headingToNestTimeout = 6f; headingToNestDistance = Vector3.Distance(((Component)this).transform.position, nestSpot); } } Vector3 velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude > base.agent.speed / 4f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(1); } velocity = base.agent.velocity; SetParamClientRpc("WalkSpeed", ((Vector3)(ref velocity)).magnitude / walkAnimationCoefficient); } else { velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude <= base.agent.speed / 8f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(0); } SetParamClientRpc("WalkSpeed", 1f); } } ((EnemyAI)this).SetDestinationToPosition(nestSpot, false); if (Vector3.Distance(((Component)this).transform.position, nestSpot) < 15f) { isPlanting = false; donePlant = false; ((EnemyAI)this).SwitchToBehaviourClientRpc(7); } if (!stabbedCapturedPlayer) { isStabbing = false; doneStab = false; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } if (!base.isOutside) { ((EnemyAI)this).SwitchToBehaviourClientRpc(1); } } public void basePlantingStake() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) base.agent.speed = 0f; if (base.isEnemyDead) { base.agent.updateRotation = true; isStabbing = false; doneStab = false; isPlanting = false; donePlant = false; ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); } if (!isPlanting) { ((MonoBehaviour)this).StartCoroutine(DoPlant()); isPlanting = true; } else if (donePlant) { base.agent.updateRotation = true; isPlanting = false; donePlant = false; AnimPlayClientRpc("Idle"); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); } } public IEnumerator DoPlant() { if (plantTime + plantCooldown > Time.time) { base.agent.updateRotation = true; isPlanting = false; donePlant = false; ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); Think("Switched to searching for player"); yield break; } DoAnimationClientRpc(6); AnimPlayClientRpc("PlantStake"); moaiSoundPlayClientRpc("creaturePlant"); plantTime = Time.time; if (Object.op_Implicit((Object)(object)stabbedPlayer)) { SetColliderClientRpc(((NetworkBehaviour)stabbedPlayer).NetworkObject.NetworkObjectId, value: false); } yield return (object)new WaitForSeconds(1.05f); PlayerControllerB victim = (((Object)(object)capturedPlayer != (Object)null) ? capturedPlayer : stabbedPlayer); try { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { GameObject stakePrefab = Plugin.ShamblerStakePrefab; GameObject stake = Object.Instantiate(stakePrefab, heldStakeRef.transform.position, heldStakeRef.transform.rotation); ShamblerStake obj = stake.GetComponent(); NetworkObject netObj = stake.GetComponent(); obj.owner = this; obj.victim = victim; obj.SetVictimClientRpc(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId); if (!netObj.IsSpawned) { netObj.Spawn(false); } stuckPlayerIds.Add(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId); } if ((Object)(object)victim != (Object)null) { letGoOfPlayerClientRpc(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId); } if ((Object)(object)stabbedPlayer != (Object)null) { SetStabbedPlayerClientRpc(0uL, reset: true); } if ((Object)(object)capturedPlayer != (Object)null) { SetCapturedPlayerClientRpc(0uL, reset: true); } stabbedPlayer = null; capturedPlayer = null; stabbedCapturedPlayer = false; base.targetPlayer = null; mostRecentPlayer = null; usingCustomGoal = false; stickyGoal = Vector3.zero; stickyScore = float.NegativeInfinity; } catch (Exception ex) { Debug.LogError((object)$"[Shambler] DoPlant exception: {ex}"); } yield return (object)new WaitForSeconds(0.5f); donePlant = true; isPlanting = false; Think("Plant Done"); yield return (object)new WaitForSeconds(1f); SetColliderClientRpc(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId, value: true); } public void baseHeadingToEntrance() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Invalid comparison between Unknown and I4 //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) base.targetPlayer = null; Vector3 velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude > base.agent.speed / 4f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(1); } velocity = base.agent.velocity; SetParamClientRpc("WalkSpeed", ((Vector3)(ref velocity)).magnitude / walkAnimationCoefficient); } else { velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude <= base.agent.speed / 8f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(0); } SetParamClientRpc("WalkSpeed", 1f); } } ((EnemyAI)this).SetDestinationToPosition(nearestEntranceNavPosition, false); if (base.isOutside != nearestEntrance.isEntranceToBuilding || (int)base.agent.pathStatus == 1) { entranceDelay = 150; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } if ((double)Vector3.Distance(((Component)this).transform.position, nearestEntranceNavPosition) < 2.0 + (double)((Component)this).gameObject.transform.localScale.x) { if (nearestEntrance.isEntranceToBuilding) { Debug.Log((object)"SHAMBLER: Warp in"); EntityWarp.SendEnemyInside((EnemyAI)(object)this); nearestEntrance.PlayAudioAtTeleportPositions(); } else { Debug.Log((object)"SHAMBLER: Warp out"); EntityWarp.SendEnemyOutside((EnemyAI)(object)this); nearestEntrance.PlayAudioAtTeleportPositions(); } entranceDelay = 150; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } if (provokePoints > 0) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } } public void updateEntranceChance() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)nearestEntrance)) { return; } float num = Vector3.Distance(((Component)this).transform.position, ((Component)nearestEntrance).transform.position); chanceToLocateEntrancePlayerBonus = 1f; if (Object.op_Implicit((Object)(object)mostRecentPlayer)) { if (Object.op_Implicit((Object)(object)mostRecentPlayer) == base.isOutside) { chanceToLocateEntrancePlayerBonus = 1f; } else { chanceToLocateEntrancePlayerBonus = 1.5f; } } int num2 = 1; if (num < 20f) { num2 = 4; } if (num < 15f) { num2 = 6; } if (num < 10f) { num2 = 7; } if (num < 5f) { num2 = 10; } if (Object.op_Implicit((Object)(object)nearestEntrance)) { chanceToLocateEntrance = (float)(1.0 / Math.Pow(num, 2.0)) * (float)num2 * chanceToLocateEntrancePlayerBonus - (float)entranceDelay; } } public bool FoundClosestPlayerInRange(float r, bool needLineOfSight) { if (recovering) { return false; } moaiTargetClosestPlayer(r, needLineOfSight); return PlayerQualifies(base.targetPlayer); } public bool moaiTargetClosestPlayer(float range, bool requireLineOfSight) { //IL_0061: 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_00aa: Unknown result type (might be due to invalid IL or missing references) if (recovering) { return false; } base.mostOptimalDistance = range; PlayerControllerB targetPlayer = base.targetPlayer; base.targetPlayer = null; for (int i = 0; i < StartOfRound.Instance.connectedPlayersAmount + 1; i++) { if (!((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true) || (requireLineOfSight && !((EnemyAI)this).CheckLineOfSightForPosition(((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, Plugin.LOSWidth.Value, 80, -1f, (Transform)null))) { continue; } base.tempDist = Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position); if (base.tempDist < base.mostOptimalDistance) { base.mostOptimalDistance = base.tempDist; if ((Object)(object)RageTarget != (Object)null && PlayerQualifies(StartOfRound.Instance.allPlayerScripts[i]) && (Object)(object)RageTarget == (Object)(object)StartOfRound.Instance.allPlayerScripts[i]) { base.targetPlayer = StartOfRound.Instance.allPlayerScripts[i]; return true; } if (PlayerQualifies(StartOfRound.Instance.allPlayerScripts[i])) { base.targetPlayer = StartOfRound.Instance.allPlayerScripts[i]; } } } if ((Object)(object)base.targetPlayer != (Object)null && (Object)(object)targetPlayer != (Object)null) { base.targetPlayer = targetPlayer; } return PlayerQualifies(base.targetPlayer); } public bool PlayerInsideSafeZone(PlayerControllerB ply) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("HangarShip"); if ((Object)(object)val != (Object)null && Vector3.Distance(((Component)ply).transform.position, val.transform.position) < Plugin.shipSafeZoneRadius.Value) { return true; } return false; } public bool PlayerQualifies(PlayerControllerB ply) { //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ply == (Object)null || (Object)(object)((NetworkBehaviour)ply).NetworkObject == (Object)null) { return false; } if (PlayerInsideSafeZone(ply)) { return false; } if (PlayerHeldByAnyShambler(ply)) { return false; } if ((Object)(object)ply == (Object)(object)capturedPlayer || (Object)(object)ply == (Object)(object)stabbedPlayer) { return false; } if ((Object)(object)ply == (Object)(object)capturedPlayer || (Object)(object)ply == (Object)(object)stabbedPlayer) { return false; } if (IsPlayerStaked(ply)) { return false; } if (ply.isPlayerDead || !ply.isPlayerControlled) { return false; } if (EscapingEmployees.Contains(((NetworkBehaviour)ply).NetworkObject.NetworkObjectId)) { Vector3 val = (Object.op_Implicit((Object)(object)headCol) ? headCol.position : (((Component)this).transform.position + Vector3.up * 1.6f)); Vector3 val2 = (Object.op_Implicit((Object)(object)ply.playerEye) ? ((Component)ply.playerEye).transform.position : (((Component)ply).transform.position + Vector3.up * 1.6f)); val.y += 0.6f; val2.y += 0.6f; Vector3 val3 = ((Component)ply).transform.position - ((Component)this).transform.position; val3.y = 0f; float magnitude = ((Vector3)(ref val3)).magnitude; bool flag = magnitude <= 8f || (((Vector3)(ref val3)).sqrMagnitude > 0.001f && Vector3.Dot(((Component)this).transform.forward, ((Vector3)(ref val3)).normalized) >= Mathf.Cos(1.2217305f)); bool flag2 = !Physics.Linecast(val, val2, LayerMask.op_Implicit(WorldMask), (QueryTriggerInteraction)1); if (flag && flag2) { alertLevel = 100f; RageTarget = ply; Think($"⚠ Rage: escaping {ply.playerUsername} dist={magnitude:F1}m FOV={flag} LOS={flag2}"); ClearRageTarget(); return true; } } if ((Object)(object)ply == (Object)(object)RageTarget) { return true; } return true; } public async void ClearRageTarget() { await Task.Delay(10000); RageTarget = null; EscapingEmployees.Clear(); } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, -1); if (base.isEnemyDead || (hitID == -1 && (Object)(object)playerWhoHit == (Object)null)) { return; } if ((Object)(object)playerWhoHit != (Object)null) { ulong networkObjectId = ((NetworkBehaviour)playerWhoHit).NetworkObject.NetworkObjectId; if (((Object)(object)stabbedPlayer != (Object)null && networkObjectId == ((NetworkBehaviour)stabbedPlayer).NetworkObject.NetworkObjectId) || ((Object)(object)capturedPlayer != (Object)null && networkObjectId == ((NetworkBehaviour)capturedPlayer).NetworkObject.NetworkObjectId)) { return; } } base.enemyHP -= force; if ((Object)(object)playerWhoHit != (Object)null) { provokePoints += 20 * force; base.targetPlayer = playerWhoHit; } stamina = 120f; recovering = false; if (((NetworkBehaviour)this).IsOwner) { if (base.enemyHP <= 0 && !markDead) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); stopAllSound(); base.isEnemyDead = true; moaiSoundPlayClientRpc("creatureDeath"); deadEventClientRpc(); markDead = true; } else { moaiSoundPlayClientRpc("creatureHit"); } } } [ClientRpc] public void deadEventClientRpc() { //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(2229496956u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2229496956u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; animator.Play("Death"); if (!creatureDeath.isPlaying) { creatureDeath.Play(); } base.isEnemyDead = true; } } [ServerRpc(RequireOwnership = false)] public void letGoOfPlayerServerRpc(ulong playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2192772121u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2192772121u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; letGoOfPlayerClientRpc(playerId); } } } [ClientRpc] public void letGoOfPlayerClientRpc(ulong playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) 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(160126077u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 160126077u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = null; RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val4 in allPlayerScripts) { if (((NetworkBehaviour)val4).NetworkObject.NetworkObjectId == playerId) { val3 = val4; } } NavMeshHit val5 = default(NavMeshHit); if (NavMesh.SamplePosition(((Component)val3).transform.position, ref val5, 15f, -1)) { ((Component)val3).transform.position = ((NavMeshHit)(ref val5)).position; } if ((Object)(object)stabbedPlayer != (Object)null) { SetStabbedPlayerClientRpc(0uL, reset: true); } if ((Object)(object)capturedPlayer != (Object)null) { SetCapturedPlayerClientRpc(0uL, reset: true); } capturedPlayer = null; stabbedPlayer = null; } public override void OnCollideWithEnemy(Collider other, EnemyAI collidedEnemy = null) { if (!(timeSinceHittingLocalPlayer < 0.5f) && !collidedEnemy.isEnemyDead && !base.isEnemyDead && !((Object)(object)collidedEnemy.enemyType == (Object)(object)base.enemyType)) { string text = ((Object)collidedEnemy.enemyType).name.ToLower(); if ((!text.Contains("mouth") || !text.Contains("dog")) && !collidedEnemy.enemyType.enemyName.ToLower().Contains("soul")) { timeSinceHittingLocalPlayer = 0f; collidedEnemy.HitEnemy(1, (PlayerControllerB)null, true, -1); } } } public override void OnCollideWithPlayer(Collider other) { if (!(timeSinceHittingLocalPlayer < 0.6f)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if (Object.op_Implicit((Object)(object)val)) { DmgPlayerClientRpc(((NetworkBehaviour)val).NetworkObject.NetworkObjectId, 60); } } } [ServerRpc(RequireOwnership = false)] public void attachPlayerServerRpc(ulong uid, bool lastHit, int staminaGrant) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(836769684u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref lastHit, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, staminaGrant); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 836769684u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; attachPlayerClientRpc(uid, lastHit, staminaGrant); } } } [ClientRpc] public void attachPlayerClientRpc(ulong uid, bool lastHit, int staminaGrant) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) 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(1109110496u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref lastHit, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, staminaGrant); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1109110496u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stamina += staminaGrant; RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val3 in allPlayerScripts) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == uid) { if (!lastHit) { ((Component)val3).transform.position = capturePoint.position; capturedPlayer = val3; } else { ((Component)val3.deadBody).transform.position = capturePoint.position; capturedPlayer = val3; } break; } } } [ClientRpc] public void attachPlayerSpikeClientRpc(ulong uid, bool lastHit, int staminaGrant) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) 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(2790292547u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref lastHit, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, staminaGrant); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2790292547u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stamina += staminaGrant; RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val3 in allPlayerScripts) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId != uid) { continue; } if (!lastHit) { ((Component)val3).transform.position = capturePoint.position; capturedPlayer = val3; if ((Object)(object)capturedPlayer != (Object)null) { SetCapturedPlayerClientRpc(((NetworkBehaviour)capturedPlayer).NetworkObject.NetworkObjectId); } } else { ((Component)val3.deadBody).transform.position = capturePoint.position; capturedPlayer = val3; if ((Object)(object)capturedPlayer != (Object)null) { SetCapturedPlayerClientRpc(((NetworkBehaviour)capturedPlayer).NetworkObject.NetworkObjectId); } } break; } } [ClientRpc] public void SetColliderClientRpc(ulong playerid, 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_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(1314365859u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1314365859u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { } } } public virtual void playSoundId(string id) { } public void stopAllSound() { base.creatureSFX.Stop(); base.creatureVoice.Stop(); creatureLaugh.Stop(); creatureLeapLand.Stop(); } [ClientRpc] public void moaiSoundPlayClientRpc(string soundName) { //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(1531827138u, val, (RpcDelivery)0); bool flag = soundName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(soundName, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1531827138u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; switch (soundName) { case "creatureSFX": stopAllSound(); base.creatureSFX.Play(); break; case "creatureVoice": { stopAllSound(); double[] array = new double[10] { 0.0, 0.8244, 11.564, 29.11, 34.491, 37.84, 48.689, 64.518, 89.535, 92.111 }; int num2 = Random.Range(0, array.Length); base.creatureVoice.Play(); base.creatureVoice.SetScheduledStartTime(array[num2]); base.creatureVoice.time = (float)array[num2]; break; } case "creatureLeapLand": stopAllSound(); creatureLeapLand.Play(); break; case "creatureLaugh": stopAllSound(); creatureLaugh.Play(); break; case "creatureAnger": stopAllSound(); creatureAnger.Play(); break; case "creaturePlant": creaturePlant.Play(); break; case "creatureSneakyStab": stopAllSound(); creatureSneakyStab.Play(); break; case "creatureStab": stopAllSound(); creatureStab.Play(); break; case "creatureDeath": if (!creatureDeath.isPlaying) { stopAllSound(); creatureDeath.Play(); } break; case "creatureHit": creatureTakeDmg.Play(); break; case "creatureFrustrated": creatureFrustrated.Play(); break; case "step": if (creatureSteps.Length != 0) { int num = enemyRandom.Next(0, creatureSteps.Length); creatureSteps[num].Play(); } break; } } public IEnumerator DoExpressFrustration() { try { if (!inLegIndependentCoroutine) { inLegIndependentCoroutine = true; Think("Doing Express Frustration Animation"); animator.SetLayerWeight(1, 0f); animator.Play("SmashGroundFrustrated", 1, 0f); yield return null; AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(1); float clipLength = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).length; yield return LerpLayerWeight(1, 1f, 0.2f); float holdTime = clipLength - 0.4f; if (holdTime > 0f) { yield return (object)new WaitForSeconds(holdTime); } yield return LerpLayerWeight(1, 0f, 0.2f); animator.SetLayerWeight(1, 0f); Think("Express Frustration done"); } } finally { inLegIndependentCoroutine = false; } } public IEnumerator DoAssertDominance() { try { if (!inLegIndependentCoroutine) { inLegIndependentCoroutine = true; Think("Doing Dominance Assertion Animation"); animator.SetLayerWeight(1, 0f); animator.Play("ANGRY", 1, 0f); yield return null; AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(1); float clipLength = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).length; yield return LerpLayerWeight(1, 1f, 0.2f); float holdTime = clipLength - 0.4f; if (holdTime > 0f) { yield return (object)new WaitForSeconds(holdTime); } yield return LerpLayerWeight(1, 0f, 0.2f); animator.SetLayerWeight(1, 0f); Think("Dominance Assertion done"); } } finally { inLegIndependentCoroutine = false; } } private IEnumerator LerpLayerWeight(int layer, float target, float duration) { float start = animator.GetLayerWeight(layer); float t = 0f; while (t < duration) { t += Time.deltaTime; animator.SetLayerWeight(layer, Mathf.Lerp(start, target, t / duration)); yield return null; } animator.SetLayerWeight(layer, target); } [ClientRpc] public void DoAssertDominanceClientRpc() { //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(838269480u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 838269480u, 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(DoAssertDominance()); } } } [ClientRpc] public void DoExpressFrustrationClientRpc() { //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(2710206066u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2710206066u, 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(DoExpressFrustration()); } } } public bool FitToAssertDominance() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)base.targetPlayer)) { return false; } Vector3 val = ((Component)base.targetPlayer).transform.position - ((Component)this).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Angle(((Component)this).transform.forward, normalized); if (num > 90f) { return false; } if (Vector3.Distance(base.agent.destination, ((Component)base.targetPlayer).transform.position) > maxLeapDistance) { return false; } return base.currentBehaviourStateIndex == 4; } public bool FitToExpressFrustration() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)base.targetPlayer)) { return false; } if (Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < maxLeapDistance) { return false; } return base.currentBehaviourStateIndex == 4; } [ClientRpc] public void SetParamClientRpc(string param, float speed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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(257338856u, val, (RpcDelivery)0); bool flag = param != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(param, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref speed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 257338856u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; animator.SetFloat(param, speed); } } [ClientRpc] public void DoAnimationClientRpc(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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1163343604u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1163343604u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (Object.op_Implicit((Object)(object)animator)) { animator.SetInteger("state", index); } } } [ClientRpc] public void AnimPlayClientRpc(string name) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1377638831u, val, (RpcDelivery)0); bool flag = name != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(name, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1377638831u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; animator.Play(name); } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2925436343u, new RpcReceiveHandler(__rpc_handler_2925436343), "SetCapturedPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3110006365u, new RpcReceiveHandler(__rpc_handler_3110006365), "SetStabbedPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3897930302u, new RpcReceiveHandler(__rpc_handler_3897930302), "DmgPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2556090093u, new RpcReceiveHandler(__rpc_handler_2556090093), "DoGroundHopClientRpc"); ((NetworkBehaviour)this).__registerRpc(2229496956u, new RpcReceiveHandler(__rpc_handler_2229496956), "deadEventClientRpc"); ((NetworkBehaviour)this).__registerRpc(2192772121u, new RpcReceiveHandler(__rpc_handler_2192772121), "letGoOfPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(160126077u, new RpcReceiveHandler(__rpc_handler_160126077), "letGoOfPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(836769684u, new RpcReceiveHandler(__rpc_handler_836769684), "attachPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(1109110496u, new RpcReceiveHandler(__rpc_handler_1109110496), "attachPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2790292547u, new RpcReceiveHandler(__rpc_handler_2790292547), "attachPlayerSpikeClientRpc"); ((NetworkBehaviour)this).__registerRpc(1314365859u, new RpcReceiveHandler(__rpc_handler_1314365859), "SetColliderClientRpc"); ((NetworkBehaviour)this).__registerRpc(1531827138u, new RpcReceiveHandler(__rpc_handler_1531827138), "moaiSoundPlayClientRpc"); ((NetworkBehaviour)this).__registerRpc(838269480u, new RpcReceiveHandler(__rpc_handler_838269480), "DoAssertDominanceClientRpc"); ((NetworkBehaviour)this).__registerRpc(2710206066u, new RpcReceiveHandler(__rpc_handler_2710206066), "DoExpressFrustrationClientRpc"); ((NetworkBehaviour)this).__registerRpc(257338856u, new RpcReceiveHandler(__rpc_handler_257338856), "SetParamClientRpc"); ((NetworkBehaviour)this).__registerRpc(1163343604u, new RpcReceiveHandler(__rpc_handler_1163343604), "DoAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(1377638831u, new RpcReceiveHandler(__rpc_handler_1377638831), "AnimPlayClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_2925436343(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 playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); bool reset = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref reset, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).SetCapturedPlayerClientRpc(playerid, reset); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3110006365(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 playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); bool reset = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref reset, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).SetStabbedPlayerClientRpc(playerid, reset); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3897930302(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) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); int amount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref amount); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).DmgPlayerClientRpc(playerid, amount); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2556090093(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 targetPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetPos); Vector3 shamblerStartPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shamblerStartPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).DoGroundHopClientRpc(targetPos, shamblerStartPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2229496956(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; ((ShamblerEnemy)(object)target).deadEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2192772121(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 playerId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).letGoOfPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_160126077(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 playerId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).letGoOfPlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_836769684(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); bool lastHit = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lastHit, default(ForPrimitives)); int staminaGrant = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref staminaGrant); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).attachPlayerServerRpc(uid, lastHit, staminaGrant); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1109110496(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); bool lastHit = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lastHit, default(ForPrimitives)); int staminaGrant = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref staminaGrant); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).attachPlayerClientRpc(uid, lastHit, staminaGrant); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2790292547(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); bool lastHit = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lastHit, default(ForPrimitives)); int staminaGrant = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref staminaGrant); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).attachPlayerSpikeClientRpc(uid, lastHit, staminaGrant); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1314365859(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 playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); bool value = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).SetColliderClientRpc(playerid, value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1531827138(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string soundName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref soundName, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).moaiSoundPlayClientRpc(soundName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_838269480(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; ((ShamblerEnemy)(object)target).DoAssertDominanceClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2710206066(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; ((ShamblerEnemy)(object)target).DoExpressFrustrationClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_257338856(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string param = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref param, false); } float speed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref speed, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).SetParamClientRpc(param, speed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1163343604(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; ((ShamblerEnemy)(object)target).DoAnimationClientRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1377638831(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string name = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref name, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerEnemy)(object)target).AnimPlayClientRpc(name); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ShamblerEnemy"; } } } namespace Shambler { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Shambler", "Shambler", "1.0.0")] public class Plugin : BaseUnityPlugin { 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, "bcs_shamblerstake")); if ((Object)(object)MainAssetBundle == (Object)null) { Logger.LogError((object)"Failed to load custom assets."); } } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_SpawnScrapInLevel <>9__6_0; internal void b__6_0(orig_SpawnScrapInLevel orig, RoundManager self) { orig.Invoke(self); try { ShamblerEnemy.stuckPlayerIds.Clear(); } catch (Exception ex) { Debug.LogError((object)("Shambler static value reset error: " + ex.ToString())); } } } public static Harmony _harmony; public static ManualLogSource Logger; public static float rawSpawnMultiplier; public static GameObject ShamblerStakePrefab; public static ConfigEntry moaiGlobalMusicVol; public static ConfigEntry moaiGlobalSpeed; public static ConfigEntry soulRarity; public static ConfigEntry devourerSpawnDist; public static ConfigEntry spawnsOutside; public static ConfigEntry LOSWidth; public static ConfigEntry maxCount; public static ConfigEntry health; public static ConfigEntry canEnterIndoors; public static ConfigEntry disableColliderOnDeath; public static ConfigEntry shipSafeZoneRadius; public static ConfigEntry stakeFreeChance; public static ConfigEntry stakeFailDmg; public static void LogDebug(string text) { Logger.LogInfo((object)text); } public static void LogProduction(string text) { Logger.LogInfo((object)text); } private void Awake() { //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Expected O, but got Unknown //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Expected O, but got Unknown //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Expected O, but got Unknown //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: 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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown Logger = ((BaseUnityPlugin)this).Logger; bindVars(); 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); } } } Random.InitState((int)DateTime.Now.Ticks); try { string assetName = "Shambler"; string text = ScaleAllIntegers(devourerSpawnDist.Value, soulRarity.Value); List list = new List(); list.Add(new EnemyConfig { Name = "Shambler Enemy", AssetName = assetName, TerminalKeywordAsset = "ShamblerTK", TerminalNodeAsset = "ShamblerTN", Enabled = true, MaxSpawnCount = maxCount.Value, PowerLevel = 2f, SpawnWeights = text }); EnemyInitializer.Initialize("bcs_shamblerenemybundle", list); Assets.PopulateAssets(); ShamblerStakePrefab = Assets.MainAssetBundle.LoadAsset("ShamblerStake"); NetworkPrefabs.RegisterNetworkPrefab(ShamblerStakePrefab); Debug.Log((object)("Shambler Enemy loaded with the following spawn weights: " + text)); } catch (Exception ex) { Debug.LogError((object)("Error initializing the Shambler Enemy, maybe the spawn distribution you entered is malformed? : error -> " + ex.ToString())); } object obj = <>c.<>9__6_0; if (obj == null) { hook_SpawnScrapInLevel val = delegate(orig_SpawnScrapInLevel orig, RoundManager self) { orig.Invoke(self); try { ShamblerEnemy.stuckPlayerIds.Clear(); } catch (Exception ex5) { Debug.LogError((object)("Shambler static value reset error: " + ex5.ToString())); } }; <>c.<>9__6_0 = val; obj = (object)val; } RoundManager.SpawnScrapInLevel += (hook_SpawnScrapInLevel)obj; RoundManager.DespawnPropsAtEndOfRound += (hook_DespawnPropsAtEndOfRound)delegate(orig_DespawnPropsAtEndOfRound orig, RoundManager self, bool despawnAllItems) { orig.Invoke(self, despawnAllItems); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { try { ShamblerStake[] array3 = Object.FindObjectsOfType(); foreach (ShamblerStake shamblerStake in array3) { if (Object.op_Implicit((Object)(object)((Component)shamblerStake).gameObject)) { Object.Destroy((Object)(object)((Component)shamblerStake).gameObject); } } return; } catch (Exception ex4) { Debug.LogError((object)("Shambler static value reset error: " + ex4.ToString())); return; } } LateCleanupClient(); }; PlayerControllerB.DamagePlayer += (hook_DamagePlayer)delegate(orig_DamagePlayer orig, PlayerControllerB self, int damageNumber, bool hasDamageSFX, bool callRPC, CauseOfDeath causeOfDeath, int deathAnimation, bool fallDamage, Vector3 force) { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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) try { if (fallDamage) { if (!PlayerAttachedToShamblerOrStake(self)) { orig.Invoke(self, damageNumber, hasDamageSFX, callRPC, causeOfDeath, deathAnimation, fallDamage, force); } else { Debug.Log((object)"Shambler FallDmg Cancel: = 0"); orig.Invoke(self, 0, hasDamageSFX, callRPC, causeOfDeath, deathAnimation, fallDamage, force); } } else { orig.Invoke(self, damageNumber, hasDamageSFX, callRPC, causeOfDeath, deathAnimation, fallDamage, force); } return; } catch (Exception ex3) { Debug.LogException(ex3); } orig.Invoke(self, damageNumber, hasDamageSFX, callRPC, causeOfDeath, deathAnimation, fallDamage, force); }; PlayerControllerB.KillPlayer += (hook_KillPlayer)delegate(orig_KillPlayer orig, PlayerControllerB self, Vector3 bodyVelocity, bool spawnBody, CauseOfDeath causeOfDeath, int deathAnimation, Vector3 positionOffset) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Invalid comparison between Unknown and I4 //IL_0062: 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_0069: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) try { if ((int)causeOfDeath == 2) { if (!PlayerAttachedToShamblerOrStake(self)) { orig.Invoke(self, bodyVelocity, spawnBody, causeOfDeath, deathAnimation, positionOffset); } else { Debug.Log((object)"Shambler FallDmgKill Cancel: = 0"); } } else { orig.Invoke(self, bodyVelocity, spawnBody, causeOfDeath, deathAnimation, positionOffset); } return; } catch (Exception ex2) { Debug.LogException(ex2); } orig.Invoke(self, bodyVelocity, spawnBody, causeOfDeath, deathAnimation, positionOffset); }; Logger.LogInfo((object)"Plugin Shambler is loaded!"); } public bool PlayerAttachedToShamblerOrStake(PlayerControllerB ply) { ShamblerEnemy[] array = Object.FindObjectsOfType(); ShamblerEnemy[] array2 = array; foreach (ShamblerEnemy shamblerEnemy in array2) { if (Object.op_Implicit((Object)(object)shamblerEnemy.capturedPlayer) && ((NetworkBehaviour)shamblerEnemy.capturedPlayer).NetworkObject.NetworkObjectId == ((NetworkBehaviour)ply).NetworkObject.NetworkObjectId) { return true; } if (Object.op_Implicit((Object)(object)shamblerEnemy.stabbedPlayer) && ((NetworkBehaviour)shamblerEnemy.stabbedPlayer).NetworkObject.NetworkObjectId == ((NetworkBehaviour)ply).NetworkObject.NetworkObjectId) { return true; } } ShamblerStake[] array3 = Object.FindObjectsOfType(); ShamblerStake[] array4 = array3; foreach (ShamblerStake shamblerStake in array4) { if (Object.op_Implicit((Object)(object)shamblerStake.victim) && ((NetworkBehaviour)shamblerStake.victim).NetworkObject.NetworkObjectId == ((NetworkBehaviour)ply).NetworkObject.NetworkObjectId) { return true; } } return false; } public async void LateCleanupClient() { await Task.Delay(5000); ShamblerStake[] array = Object.FindObjectsOfType(); foreach (ShamblerStake stake in array) { if (Object.op_Implicit((Object)(object)((Component)stake).gameObject)) { Object.Destroy((Object)(object)((Component)stake).gameObject); } } } public static string ScaleAllIntegers(string input, float multiplier) { return Regex.Replace(input, "\\d+", delegate(Match match) { int num = int.Parse(match.Value); return ((int)Math.Round((float)num * multiplier)).ToString(); }); } public void bindVars() { //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Expected O, but got Unknown //IL_01ca: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_01fa: Expected O, but got Unknown //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Expected O, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown //IL_022a: Expected O, but got Unknown //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Expected O, but got Unknown //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Expected O, but got Unknown //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Expected O, but got Unknown //IL_025a: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected O, but got Unknown //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Expected O, but got Unknown //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Expected O, but got Unknown //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Expected O, but got Unknown //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Expected O, but got Unknown //IL_029f: Expected O, but got Unknown //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Expected O, but got Unknown //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Expected O, but got Unknown //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Expected O, but got Unknown //IL_02cc: Expected O, but got Unknown //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Expected O, but got Unknown //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Expected O, but got Unknown //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Expected O, but got Unknown //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Expected O, but got Unknown //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Expected O, but got Unknown //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Expected O, but got Unknown //IL_032f: Expected O, but got Unknown //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Expected O, but got Unknown //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Expected O, but got Unknown //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Expected O, but got Unknown //IL_0359: Expected O, but got Unknown //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Expected O, but got Unknown //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Expected O, but got Unknown //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_0386: Expected O, but got Unknown //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Expected O, but got Unknown soulRarity = ((BaseUnityPlugin)this).Config.Bind("Spawning", "Enemy Spawnrate Multiplier", 1f, "Changes the spawnrate of the Shambler across ALL planets. Decimals are accepted, 2.0 = approximately double the spawnrate. 0.5 is half the spawnrate."); devourerSpawnDist = ((BaseUnityPlugin)this).Config.Bind("Spawning", "Enemy Spawn Weights", "ExperimentationLevel:12,AssuranceLevel:24,OffenseLevel:24,MarchLevel:58,AdamanceLevel:58,DineLevel:17,RendLevel:17,TitanLevel:17,ArtificeLevel:32,Modded:32", "The spawn weight of the Shambler (multiplied by enemy spawnrate value) and the moons that the enemy can spawn on, in the form of a comma separated list of selectable level names and a weight value (e.g. \"ExperimentationLevel:300,DineLevel:20,RendLevel:10,Modded:10\")\r\nThe following strings: \"All\", \"Vanilla\", \"Modded\" are also valid."); maxCount = ((BaseUnityPlugin)this).Config.Bind("Spawning", "Enemy Max Count", 3, "The maximum amount of Shamblers that can spawn in one day (hard cap)."); moaiGlobalMusicVol = ((BaseUnityPlugin)this).Config.Bind("Modifiers", "Enemy Sound Volume", 0.6f, "Changes the volume of all Shambler sounds. May make them more sneaky as well."); moaiGlobalSpeed = ((BaseUnityPlugin)this).Config.Bind("Modifiers", "Enemy Speed Multiplier", 1f, "Changes the speed of all Shamblers. 4x would mean they are 4 times faster, 0.5x would be 2 times slower."); health = ((BaseUnityPlugin)this).Config.Bind("Modifiers", "Enemy Health", 6, "Changes the health of all shamblers."); LOSWidth = ((BaseUnityPlugin)this).Config.Bind("Advanced", "Line Of Sight Width", 100f, "Line of sight width for the enemy (by degrees)."); canEnterIndoors = ((BaseUnityPlugin)this).Config.Bind("Modifiers", "Can enter the factory", true, "If shamblers can enter the factory at their own whim. Entry is chance based. The closer a shambler is to an entrance the more likely it will decide to enter."); disableColliderOnDeath = ((BaseUnityPlugin)this).Config.Bind("Advanced", "Enemy Corpse Collision", false, "If a shambler's corpse should have its own collision box. You may want to keep this disabled if you have problems with the corpse getting in the way too often."); shipSafeZoneRadius = ((BaseUnityPlugin)this).Config.Bind("Behavior", "Ship safe zone radius", 20f, "The radius of the protective sphere around the ship that the shambler can't pursue or attack in. Set to zero if you want some chaos, otherwise use as you please. The default value should protect you for about 5-ish steps from the edges of the ship."); stakeFreeChance = ((BaseUnityPlugin)this).Config.Bind("Modifiers", "Stake Free Chance", 100, "Chance of a player to free themselves from a stake the shambler impaled them with. If you want the shambler to be extra punishing, take away some of the percentage chance here. Failures make the player take damage, and friends always have a 100% chance to free others. "); stakeFailDmg = ((BaseUnityPlugin)this).Config.Bind("Modifiers", "Stake Fail Dmg", 20, "Amount of damage a player takes when they fail to free themselves from a stake. Irrelevant unless stake free chance is below 100%."); ConfigEntry obj = soulRarity; FloatInputFieldOptions val = new FloatInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions)val).Min = 0.01f; ((BaseRangeOptions)val).Max = 100f; FloatInputFieldConfigItem val2 = new FloatInputFieldConfigItem(obj, val); ConfigEntry obj2 = moaiGlobalMusicVol; FloatSliderOptions val3 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val3).Min = 0f; ((BaseRangeOptions)val3).Max = 1f; FloatSliderConfigItem val4 = new FloatSliderConfigItem(obj2, val3); ConfigEntry obj3 = moaiGlobalSpeed; FloatSliderOptions val5 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val5).Min = 0f; ((BaseRangeOptions)val5).Max = 5f; FloatSliderConfigItem val6 = new FloatSliderConfigItem(obj3, val5); ConfigEntry lOSWidth = LOSWidth; FloatSliderOptions val7 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions)val7).Min = 0f; ((BaseRangeOptions)val7).Max = 360f; FloatSliderConfigItem val8 = new FloatSliderConfigItem(lOSWidth, val7); TextInputFieldConfigItem val9 = new TextInputFieldConfigItem(devourerSpawnDist, new TextInputFieldOptions { RequiresRestart = true }); ConfigEntry obj4 = maxCount; IntInputFieldOptions val10 = new IntInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions)val10).Min = 0; ((BaseRangeOptions)val10).Max = 99999; IntInputFieldConfigItem val11 = new IntInputFieldConfigItem(obj4, val10); ConfigEntry obj5 = health; IntInputFieldOptions val12 = new IntInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions)val12).Min = 1; ((BaseRangeOptions)val12).Max = 99999; IntInputFieldConfigItem val13 = new IntInputFieldConfigItem(obj5, val12); BoolCheckBoxConfigItem val14 = new BoolCheckBoxConfigItem(canEnterIndoors, new BoolCheckBoxOptions { RequiresRestart = false }); BoolCheckBoxConfigItem val15 = new BoolCheckBoxConfigItem(disableColliderOnDeath, new BoolCheckBoxOptions { RequiresRestart = false }); ConfigEntry obj6 = shipSafeZoneRadius; FloatInputFieldOptions val16 = new FloatInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions)val16).Min = 0.01f; ((BaseRangeOptions)val16).Max = 100f; FloatInputFieldConfigItem val17 = new FloatInputFieldConfigItem(obj6, val16); ConfigEntry obj7 = stakeFreeChance; IntInputFieldOptions val18 = new IntInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions)val18).Min = 0; ((BaseRangeOptions)val18).Max = 100; IntInputFieldConfigItem val19 = new IntInputFieldConfigItem(obj7, val18); ConfigEntry obj8 = stakeFailDmg; IntInputFieldOptions val20 = new IntInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions)val20).Min = 0; ((BaseRangeOptions)val20).Max = 1000; IntInputFieldConfigItem val21 = new IntInputFieldConfigItem(obj8, val20); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val2); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val9); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val4); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val6); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val8); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val11); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val13); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val14); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val15); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val17); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val19); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val21); } } public static class PluginInfo { public const string PLUGIN_GUID = "Shambler"; public const string PLUGIN_NAME = "Shambler"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace Shambler.src.Soul_Devourer { internal class ShamblerStake : NetworkBehaviour { public ShamblerEnemy owner; public PlayerControllerB victim; public Transform stabPoint; private InteractTrigger envTrigger; public AudioSource failEscapeSource; public AudioSource successSource; public static List capturedPlayers = new List(); public float damageTimer = 20f; private int freeChance = -1; private int dmgPunishment = 10; private int failBoost = 20; private bool IsFreeing = false; public static float commonOffset = 1.15f; private float checkCooldown = 0.25f; public void Start() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB localPlayerController = RoundManager.Instance.playersManager.localPlayerController; envTrigger = ((Component)this).GetComponent(); freeChance = Plugin.stakeFreeChance.Value; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { StartSetupClientRpc(); NavMeshHit val = default(NavMeshHit); NavMesh.SamplePosition(((Component)this).transform.position, ref val, 10f, -1); ((Component)this).transform.position = new Vector3(((NavMeshHit)(ref val)).position.x, ((NavMeshHit)(ref val)).position.y + commonOffset, ((NavMeshHit)(ref val)).position.z); SetPositionClientRpc(((Component)this).transform.position); } } [ClientRpc] public void SetPositionClientRpc(Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(172827685u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 172827685u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((Component)this).transform.position = pos; } } } public PlayerControllerB NearestPlayer() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) RoundManager instance = RoundManager.Instance; float num = 999999f; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; if (allPlayerScripts == null || allPlayerScripts.Length == 0) { return null; } PlayerControllerB result = allPlayerScripts[0]; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val in array) { if (Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position) < num) { result = val; num = Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position); } } return result; } [ClientRpc] public void StartSetupClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2061572526u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2061572526u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)victim == (Object)null) { victim = NearestPlayer(); } if (freeChance == -1) { freeChance = Plugin.stakeFreeChance.Value; } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { try { ShamblerStake[] array = Object.FindObjectsOfType(); ShamblerStake[] array2 = array; foreach (ShamblerStake shamblerStake in array2) { if (((NetworkBehaviour)shamblerStake.victim).NetworkObjectId == ((NetworkBehaviour)victim).NetworkObjectId && ((NetworkBehaviour)shamblerStake).NetworkObjectId != ((NetworkBehaviour)this).NetworkObjectId) { shamblerStake.freeChance = 100; shamblerStake.AttemptFree(victim); } } capturedPlayers.Add(victim); } catch (Exception ex) { Debug.LogError((object)ex); } } PlayerControllerB localPlayerController = RoundManager.Instance.playersManager.localPlayerController; envTrigger = ((Component)this).GetComponent(); if ((Object)(object)victim != (Object)null && ((NetworkBehaviour)victim).NetworkObject.NetworkObjectId == ((NetworkBehaviour)localPlayerController).NetworkObject.NetworkObjectId) { envTrigger.hoverTip = "Attempt to Escape (" + freeChance + " % chance) Don't let the shambler notice!"; } else { envTrigger.hoverTip = "Free Player (100 % chance) Don't let the shambler notice!"; } } public static void MoveByCenter(GameObject obj, Vector3 targetPosition) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(); if (componentsInChildren.Length != 0) { Bounds bounds = componentsInChildren[0].bounds; Renderer[] array = componentsInChildren; foreach (Renderer val in array) { ((Bounds)(ref bounds)).Encapsulate(val.bounds); } Vector3 val2 = obj.transform.position - ((Bounds)(ref bounds)).center; obj.transform.position = targetPosition + val2; } } [ClientRpc] public void SetVictimClientRpc(ulong playerid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4254107206u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4254107206u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; RoundManager instance = RoundManager.Instance; PlayerControllerB localPlayerController = RoundManager.Instance.playersManager.localPlayerController; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { victim = val3; if (((NetworkBehaviour)victim).NetworkObject.NetworkObjectId == ((NetworkBehaviour)localPlayerController).NetworkObject.NetworkObjectId) { envTrigger.hoverTip = "Attempt to Escape (" + freeChance + " % chance) Don't let the shambler notice!"; } else { envTrigger.hoverTip = "Free Player (100 % chance) Don't let the shambler notice!"; } } } } public void Update() { //IL_00fd: Unknown result type (might be due to invalid IL or missing references) checkCooldown -= Time.deltaTime; if (Object.op_Implicit((Object)(object)victim)) { victim.fallValue = 0f; victim.fallValueUncapped = 0f; } if (((NetworkBehaviour)RoundManager.Instance).IsHost && checkCooldown <= 0f && (Object)(object)victim == (Object)null && IsFreeing) { checkCooldown = 0f; if ((Object)(object)owner != (Object)null) { owner.PlayerQualifies(victim); } } if (Object.op_Implicit((Object)(object)victim)) { victim.fallValue = 0f; victim.fallValueUncapped = 0f; } if (Object.op_Implicit((Object)(object)victim)) { ((Component)victim).transform.position = stabPoint.position; if (!victim.playerCollider.enabled) { } } if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } if ((Object)(object)victim != (Object)null && !envTrigger.isBeingHeldByPlayer && (Object)(object)owner != (Object)null && owner.EscapingEmployees.Contains(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId)) { IsFreeing = false; owner.StakeUnNotify(victim); } if ((Object)(object)victim != (Object)null && (((Object)(object)owner != (Object)null && (Object)(object)owner.capturedPlayer == (Object)(object)victim) || victim.isPlayerDead) && ((NetworkBehaviour)RoundManager.Instance).IsHost) { DelayedUnNotifLong(victim); SetColliderClientRpc(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId, value: true); ShamblerEnemy.stuckPlayerIds.Remove(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId); ResetFallValuesClientRpc(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId); DetachClientRpc(); PlaySuccessClientRpc(); try { DisableInteractClientRpc(); } catch (Exception ex) { Debug.Log((object)("Shambler Stake Error: " + ex.ToString())); } } } [ClientRpc] public void DetachClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(423408505u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 423408505u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)victim != (Object)null && ShamblerEnemy.stuckPlayerIds != null) { ShamblerEnemy.stuckPlayerIds.Remove(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId); } victim = null; } } public void AttemptFree(PlayerControllerB caller) { Debug.Log((object)"stake attempt free:"); if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { AttemptFreeServerRpc(((NetworkBehaviour)caller).NetworkObject.NetworkObjectId); } else { if ((Object)(object)victim == (Object)null) { return; } if (victim.isPlayerDead) { DetachClientRpc(); } if ((Object)(object)owner != (Object)null) { owner.StakeNotify(victim); } IsFreeing = false; if (Random.RandomRangeInt(0, 100) < freeChance || ((NetworkBehaviour)caller).NetworkObject.NetworkObjectId != ((NetworkBehaviour)victim).NetworkObject.NetworkObjectId) { if (Object.op_Implicit((Object)(object)victim)) { SnapToNavmesh(victim); DelayedUnNotifLong(victim); ShamblerEnemy.stuckPlayerIds.Remove(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId); ResetFallValuesClientRpc(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId); DetachClientRpc(); PlaySuccessClientRpc(); try { DisableInteractClientRpc(); } catch (Exception ex) { Debug.Log((object)("Shambler Stake Error: " + ex.ToString())); } } } else if (Object.op_Implicit((Object)(object)victim)) { DmgPlayerClientRpc(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId, dmgPunishment); PlayFailEscapeClientRpc(); updateStatsClientRpc(5, failBoost); if ((Object)(object)owner != (Object)null) { owner.StakeUnNotify(victim); } } } } public void SnapToNavmesh(PlayerControllerB ply) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(((Component)ply).transform.position, ref val, 10f, -1)) { NavSnapClientRpc(((NetworkBehaviour)ply).NetworkObject.NetworkObjectId, ((NavMeshHit)(ref val)).position); Vector3 position = ((NavMeshHit)(ref val)).position; Debug.Log((object)("Snapped to position: " + ((object)(Vector3)(ref position)).ToString())); } } [ClientRpc] public void NavSnapClientRpc(ulong playerid, Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(772911773u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 772911773u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; RoundManager instance = RoundManager.Instance; PlayerControllerB localPlayerController = RoundManager.Instance.playersManager.localPlayerController; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { ((Component)val3).transform.position = pos; } } } [ClientRpc] public void updateStatsClientRpc(int dmgPunishmentChange, int freeChanceChange) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4142245935u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, dmgPunishmentChange); BytePacker.WriteValueBitPacked(val2, freeChanceChange); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4142245935u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB localPlayerController = RoundManager.Instance.playersManager.localPlayerController; dmgPunishment += dmgPunishmentChange; freeChance += freeChanceChange; if ((Object)(object)victim != (Object)null && ((NetworkBehaviour)victim).NetworkObject.NetworkObjectId == ((NetworkBehaviour)localPlayerController).NetworkObject.NetworkObjectId) { envTrigger.hoverTip = "Attempt to Escape (" + freeChance + " % chance) Don't let the shambler notice!"; } else { envTrigger.hoverTip = "Free Player (100 % chance) Don't let the shambler notice!"; } } } [ClientRpc] public void DmgPlayerClientRpc(ulong playerid, int amount) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(515288598u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); BytePacker.WriteValueBitPacked(val2, amount); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 515288598u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { val3.DamagePlayer(Plugin.stakeFailDmg.Value, true, true, (CauseOfDeath)14, 0, false, default(Vector3)); } } } [ClientRpc] public void SetHoverTipClientRpc(string tip) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(320229780u, val, (RpcDelivery)0); bool flag = tip != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(tip, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 320229780u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((Component)this).GetComponent().hoverTip = tip; } } [ClientRpc] public void DisableInteractClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3261615666u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3261615666u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((Behaviour)((Component)this).GetComponent()).enabled = false; } } } [ClientRpc] public void ResetFallValuesClientRpc(ulong playerid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1210762366u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1210762366u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { val3.fallValue = 0f; val3.fallValueUncapped = 0f; val3.playerRigidbody.velocity = Vector3.zero; } } } [ClientRpc] public void SetColliderClientRpc(ulong playerid, 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3271024941u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3271024941u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { } } } [ServerRpc(RequireOwnership = false)] public void AttemptFreeServerRpc(ulong playerid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3534838218u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerid); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3534838218u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"stake attempt free (SERVERRPC):"); RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; PlayerControllerB[] array = allPlayerScripts; foreach (PlayerControllerB val3 in array) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerid) { AttemptFree(val3); } } } [ClientRpc] public void PlaySuccessClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(353136177u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 353136177u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; successSource.Play(); } } } [ClientRpc] public void PlayFailEscapeClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2512017138u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2512017138u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; failEscapeSource.Play(); } } } public async void DelayedUnNotifLong(PlayerControllerB ply) { await Task.Delay(9000); if ((Object)(object)owner != (Object)null) { owner.StakeUnNotify(ply); } } public void StartInteract() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { IsFreeing = true; if ((Object)(object)owner != (Object)null) { owner.StakeNotify(victim); } } } public void StopInteract() { if (((NetworkBehaviour)RoundManager.Instance).IsHost) { IsFreeing = false; if ((Object)(object)owner != (Object)null) { owner.StakeUnNotify(victim); } } } public void OnDestroy() { if (!Object.op_Implicit((Object)(object)victim)) { return; } if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if (Object.op_Implicit((Object)(object)victim)) { SetColliderClientRpc(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId, value: true); } ShamblerEnemy.stuckPlayerIds.Remove(((NetworkBehaviour)victim).NetworkObject.NetworkObjectId); } else if (!Object.op_Implicit((Object)(object)victim)) { } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(172827685u, new RpcReceiveHandler(__rpc_handler_172827685), "SetPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(2061572526u, new RpcReceiveHandler(__rpc_handler_2061572526), "StartSetupClientRpc"); ((NetworkBehaviour)this).__registerRpc(4254107206u, new RpcReceiveHandler(__rpc_handler_4254107206), "SetVictimClientRpc"); ((NetworkBehaviour)this).__registerRpc(423408505u, new RpcReceiveHandler(__rpc_handler_423408505), "DetachClientRpc"); ((NetworkBehaviour)this).__registerRpc(772911773u, new RpcReceiveHandler(__rpc_handler_772911773), "NavSnapClientRpc"); ((NetworkBehaviour)this).__registerRpc(4142245935u, new RpcReceiveHandler(__rpc_handler_4142245935), "updateStatsClientRpc"); ((NetworkBehaviour)this).__registerRpc(515288598u, new RpcReceiveHandler(__rpc_handler_515288598), "DmgPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(320229780u, new RpcReceiveHandler(__rpc_handler_320229780), "SetHoverTipClientRpc"); ((NetworkBehaviour)this).__registerRpc(3261615666u, new RpcReceiveHandler(__rpc_handler_3261615666), "DisableInteractClientRpc"); ((NetworkBehaviour)this).__registerRpc(1210762366u, new RpcReceiveHandler(__rpc_handler_1210762366), "ResetFallValuesClientRpc"); ((NetworkBehaviour)this).__registerRpc(3271024941u, new RpcReceiveHandler(__rpc_handler_3271024941), "SetColliderClientRpc"); ((NetworkBehaviour)this).__registerRpc(3534838218u, new RpcReceiveHandler(__rpc_handler_3534838218), "AttemptFreeServerRpc"); ((NetworkBehaviour)this).__registerRpc(353136177u, new RpcReceiveHandler(__rpc_handler_353136177), "PlaySuccessClientRpc"); ((NetworkBehaviour)this).__registerRpc(2512017138u, new RpcReceiveHandler(__rpc_handler_2512017138), "PlayFailEscapeClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_172827685(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 positionClientRpc = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref positionClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerStake)(object)target).SetPositionClientRpc(positionClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2061572526(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; ((ShamblerStake)(object)target).StartSetupClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4254107206(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 victimClientRpc = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref victimClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerStake)(object)target).SetVictimClientRpc(victimClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_423408505(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; ((ShamblerStake)(object)target).DetachClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_772911773(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerStake)(object)target).NavSnapClientRpc(playerid, pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4142245935(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 dmgPunishmentChange = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref dmgPunishmentChange); int freeChanceChange = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref freeChanceChange); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerStake)(object)target).updateStatsClientRpc(dmgPunishmentChange, freeChanceChange); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_515288598(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) { ulong playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); int amount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref amount); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerStake)(object)target).DmgPlayerClientRpc(playerid, amount); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_320229780(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string hoverTipClientRpc = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref hoverTipClientRpc, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerStake)(object)target).SetHoverTipClientRpc(hoverTipClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3261615666(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; ((ShamblerStake)(object)target).DisableInteractClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1210762366(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 playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerStake)(object)target).ResetFallValuesClientRpc(playerid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3271024941(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 playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); bool value = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerStake)(object)target).SetColliderClientRpc(playerid, value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3534838218(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 playerid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerid); target.__rpc_exec_stage = (__RpcExecStage)1; ((ShamblerStake)(object)target).AttemptFreeServerRpc(playerid); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_353136177(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; ((ShamblerStake)(object)target).PlaySuccessClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2512017138(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; ((ShamblerStake)(object)target).PlayFailEscapeClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ShamblerStake"; } } } namespace MoaiEnemy { internal class ConfigModel { public static ConfigEntry moaiGlobalSize; public static ConfigEntry moaiGlobalMusicVol; public static ConfigEntry moaiGlobalRarity; public static ConfigEntry moaiGlobalSpeed; public static void setupConfig() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0028: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0050: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0078: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00a0: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown ConfigEntry obj = moaiGlobalSize; FloatSliderOptions val = new FloatSliderOptions(); ((BaseRangeOptions)val).Min = 0.05f; ((BaseRangeOptions)val).Max = 5f; FloatSliderConfigItem val2 = new FloatSliderConfigItem(obj, val); ConfigEntry obj2 = moaiGlobalMusicVol; FloatSliderOptions val3 = new FloatSliderOptions(); ((BaseRangeOptions)val3).Min = 0f; ((BaseRangeOptions)val3).Max = 2f; FloatSliderConfigItem val4 = new FloatSliderConfigItem(obj2, val3); ConfigEntry obj3 = moaiGlobalRarity; FloatSliderOptions val5 = new FloatSliderOptions(); ((BaseRangeOptions)val5).Min = 0f; ((BaseRangeOptions)val5).Max = 10f; FloatSliderConfigItem val6 = new FloatSliderConfigItem(obj3, val5); ConfigEntry obj4 = moaiGlobalSpeed; FloatSliderOptions val7 = new FloatSliderOptions(); ((BaseRangeOptions)val7).Min = 0f; ((BaseRangeOptions)val7).Max = 5f; FloatSliderConfigItem val8 = new FloatSliderConfigItem(obj4, val7); } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace Shambler.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }