Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of DehyaCustomEnemy v1.0.4
DehyaEnemyAi.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using DehyaEnemyAi.NetcodePatcher; using GameNetcodeStuff; using HarmonyLib; using LethalLib.Modules; using Unity.Netcode; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("DehyaEnemyAi")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("DehyaEnemyAi")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("6bb45560-547b-4326-a7dc-c9807dc7233a")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] [module: NetcodePatchedAssembly] namespace DehyaEnemyAI { public class DehyaEnemyAI : EnemyAI { private enum State { SearchingForPlayers, HiredByPlayer, FightingEnemy, AttackingPlayers } private bool wasDancingLastFrame = false; private Vector3 previousPosition; private float timeSinceHitting = 0f; private float timeSinceBeingHit = 0f; private float regenerationTime = 0f; public float nonAggroTime = 0f; public float danceSheathTime = 1f; private Transform targetEnemy; private EnemyAI targetEnemyAI; public bool isHired; public bool isWithinHireRange; public float employerDetectionRange = 3f; public float displayRange = 3f; public LayerMask playerLayer; public LayerMask enemyLayer; public LayerMask obstacleLayer; public bool isDancing; private float angeredTimer = 0f; public float detectionRadius = 15f; public float BaseAcceleration = 55f; public float damageInterval = 3f; private float timeSinceLastDamage = 0f; private Vector3 spawnLoc; public PlayerControllerB playerWhoHired; public PlayerControllerB playerWhoHit; public AudioClip[] soundDehyaAttack; public AudioClip[] soundDehyaHit; public AudioClip[] soundDehyaNoise; public AudioClip soundDehyaKill; public AudioClip soundStartDance; public AudioClip[] soundDehyaJoinParty; private bool hasPlayedDanceSound = false; private bool hasPlayedBattleSound = false; public InteractTrigger hireTrigger; public Texture2D healthyBody; public Texture2D hurtBody; public override void Start() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); spawnLoc = ((Component)this).transform.position; base.isOutside = ((Component)this).transform.position.y > -80f; if (base.isOutside) { if (base.allAINodes == null || base.allAINodes.Length == 0) { base.allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode"); } if ((Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)null) { ((EnemyAI)this).EnableEnemyMesh(!StartOfRound.Instance.hangarDoorsClosed || !GameNetworkManager.Instance.localPlayerController.isInHangarShipRoom, false); } } else if (base.allAINodes == null || base.allAINodes.Length == 0) { base.allAINodes = GameObject.FindGameObjectsWithTag("AINode"); } base.enemyHP = Plugin.DehyaHealth.Value; ((EnemyAI)this).StartSearch(((Component)this).transform.position, base.currentSearch); base.currentSearch.searchWidth = 180f; base.currentSearch.searchPrecision = 10f; base.moveTowardsDestination = true; ((Behaviour)base.agent).enabled = true; } public override void DoAIInterval() { //IL_00b1: 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_0240: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } switch (base.currentBehaviourStateIndex) { case 0: { if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = 5f; } PlayerControllerB targetPlayer = base.targetPlayer; if (((EnemyAI)this).TargetClosestPlayer(3f, false, 0f)) { base.agent.SetDestination(base.destination); base.moveTowardsDestination = true; } else { base.targetPlayer = targetPlayer; } if (!((Object)(object)base.targetPlayer != (Object)null) && (Object)(object)base.targetPlayer == (Object)null && !base.currentSearch.inProgress) { ((EnemyAI)this).StartSearch(spawnLoc, base.currentSearch); base.currentSearch.searchWidth = 180f; base.currentSearch.searchPrecision = 10f; } break; } case 1: if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = 5f; } base.agent.stoppingDistance = 4f; base.addPlayerVelocityToDestination = 0f; if ((Object)(object)playerWhoHired == (Object)null) { if (((EnemyAI)this).TargetClosestPlayer(3f, true, 140f)) { if (base.currentSearch.inProgress) { ((EnemyAI)this).StopSearch(base.currentSearch, true); } ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); base.agent.stoppingDistance = 4f; } } else { FollowEmployer(); } if (!((Object)(object)base.targetPlayer != (Object)null) && (Object)(object)base.targetPlayer == (Object)null && !base.currentSearch.inProgress) { ((EnemyAI)this).StartSearch(spawnLoc, base.currentSearch); } break; case 2: PlayStartCombatServerRpc(); if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = 7f; } break; case 3: if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = 7f; } if (angeredTimer > 0f) { AttackPlayerServerRpc(); } break; } } [ServerRpc(RequireOwnership = false)] public void SprintingServerRpc(bool running) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2910680899u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref running, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2910680899u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (running) { base.agent.speed = 9f; base.creatureAnimator.SetBool("Sprinting", true); } else { base.agent.speed = 5f; base.creatureAnimator.SetBool("Sprinting", false); } SprintingClientRpc(running); } } [ClientRpc] public void SprintingClientRpc(bool running) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1110503656u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref running, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1110503656u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (running) { base.agent.speed = 9f; base.creatureAnimator.SetBool("Sprinting", true); } else { base.agent.speed = 5f; base.creatureAnimator.SetBool("Sprinting", false); } } } public override void OnCollideWithEnemy(Collider other, EnemyAI collidedEnemy = null) { //IL_00ce: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithEnemy(other, collidedEnemy); if (!((Object)(object)collidedEnemy.enemyType == (Object)(object)base.enemyType) && isHired && !collidedEnemy.isEnemyDead && !base.isEnemyDead) { int currentBehaviourStateIndex = base.currentBehaviourStateIndex; if (currentBehaviourStateIndex == 2 && !(timeSinceHitting < 1f) && !(base.stunNormalizedTimer > 0f) && collidedEnemy.enemyType.canDie && ((NetworkBehaviour)this).IsOwner) { timeSinceHitting = 0f; NetworkObject component = ((Component)collidedEnemy).gameObject.GetComponent<NetworkObject>(); AttackServerRpc(NetworkObjectReference.op_Implicit(component)); } } } public override void OnCollideWithPlayer(Collider other) { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (!(timeSinceHitting < 1f) && !(angeredTimer <= 0f) && !base.isEnemyDead) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, base.inSpecialAnimation, false); if (angeredTimer > 0f) { timeSinceHitting = 0f; AttackPlayerEnemyClientRpc(); val.DamagePlayer(40, true, true, (CauseOfDeath)13, 0, false, default(Vector3)); } } } [ServerRpc(RequireOwnership = false)] public void AttackServerRpc(NetworkObjectReference networkObject) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(658431256u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref networkObject, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 658431256u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); EnemyAI val4 = default(EnemyAI); if (((NetworkObjectReference)(ref networkObject)).TryGet(ref val3, (NetworkManager)null) && ((Component)((Component)val3).transform).TryGetComponent<EnemyAI>(ref val4)) { val4.HitEnemyOnLocalClient(1, default(Vector3), playerWhoHired, true, -1); if (val4.enemyHP < -1 && !val4.isEnemyDead) { val4.KillEnemy(false); } AttackClientRpc(networkObject); } } [ClientRpc] public void AttackClientRpc(NetworkObjectReference networkObject) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(633428897u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref networkObject, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 633428897u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); EnemyAI val4 = default(EnemyAI); if (((NetworkObjectReference)(ref networkObject)).TryGet(ref val3, (NetworkManager)null) && ((Component)((Component)val3).transform).TryGetComponent<EnemyAI>(ref val4)) { val4.HitEnemy(0, playerWhoHired, true, -1); base.creatureAnimator.SetTrigger("Attack"); int num = RoundManager.PlayRandomClip(base.creatureVoice, soundDehyaAttack, true, 1f, 0, 1000); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, soundDehyaAttack[num], 1f); } } } [ClientRpc] public void AttackPlayerEnemyClientRpc() { //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(1201830463u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1201830463u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetTrigger("Attack"); int num = RoundManager.PlayRandomClip(base.creatureVoice, soundDehyaAttack, true, 1f, 0, 1000); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, soundDehyaAttack[num], 1f); } } } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (!base.isEnemyDead && (!isHired || !((Object)(object)playerWhoHit != (Object)null))) { if (!base.inSpecialAnimation && (Object)(object)playerWhoHit != (Object)null) { base.creatureAnimator.SetTrigger("HurtEnemy"); } if ((Object)(object)playerWhoHit != (Object)null) { ((EnemyAI)this).SwitchToBehaviourState(3); this.playerWhoHit = playerWhoHit; angeredTimer += 15f; } base.enemyHP -= force; if (base.enemyHP != 0) { int num = RoundManager.PlayRandomClip(base.creatureVoice, soundDehyaHit, true, 1f, 0, 1000); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, soundDehyaHit[num], 1f); } if (base.enemyHP <= 0 && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } } public override void Update() { //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead) { return; } if (NetworkObjectManager.Enable && (base.currentBehaviourStateIndex == 1 || base.currentBehaviourStateIndex == 2)) { base.enemyType.enemyName = "Manticoil"; } else { base.enemyType.enemyName = "Dehya"; } CheckIfCooledOff(); if ((Object)(object)playerWhoHired != (Object)null && playerWhoHired.isPlayerDead) { EmployerDeadServerRpc(); } CalculateAnimationSpeedServerRpc(); timeSinceHitting += Time.deltaTime; timeSinceBeingHit += Time.deltaTime; regenerationTime += Time.deltaTime; if (nonAggroTime > 0f) { nonAggroTime -= Time.deltaTime; } HandleHealthServerRpc(); if ((Object)(object)playerWhoHired != (Object)null && isHired) { Vector3 position = ((Component)playerWhoHired).transform.position; float num = Vector3.Distance(position, ((Component)this).transform.position); if (base.currentBehaviourStateIndex == 2 && num > 25f) { hasPlayedBattleSound = false; ((EnemyAI)this).SwitchToBehaviourServerRpc(1); nonAggroTime = 3f; targetEnemy = null; targetEnemyAI = null; } if (num > 60f && !playerWhoHired.isPlayerDead) { base.serverPosition = position; ((Component)this).transform.position = position; base.agent.Warp(position); ((EnemyAI)this).SyncPositionToClients(); } } if (!isHired && angeredTimer <= 0f) { ((Component)hireTrigger).gameObject.SetActive(true); base.creatureAnimator.SetBool("Angry", false); } if (isHired || base.isEnemyDead || angeredTimer > 0f) { ((Component)hireTrigger).gameObject.SetActive(false); } if (angeredTimer > 0f) { angeredTimer -= Time.deltaTime; angeredTimer = Mathf.Max(angeredTimer, 0f); } if (timeSinceBeingHit > 30f && isHired && regenerationTime > Plugin.DehyaRegenTime.Value && base.enemyHP <= Plugin.DehyaHealth.Value) { base.enemyHP++; regenerationTime = 0f; } if (!isHired) { if (base.currentBehaviourStateIndex != 0) { return; } CheckForEmployers(); } if (isHired && (Object)(object)targetEnemy == (Object)null) { FollowEmployer(); } if (base.currentBehaviourStateIndex == 1 && nonAggroTime <= 0f) { LookForEnemiesNearbyServerRpc(); } if (base.currentBehaviourStateIndex == 1) { float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)playerWhoHired).transform.position); if (isHired) { if ((Object)(object)playerWhoHired != (Object)null && playerWhoHired.performingEmote) { int integer = playerWhoHired.playerBodyAnimator.GetInteger("emoteNumber"); if (integer == 1 && !isDancing) { DancingStartServerRpc(); } } else if (wasDancingLastFrame) { DancingStopServerRpc(); } } if (num2 > 8f) { SprintingServerRpc(running: true); } else { SprintingServerRpc(running: false); } } if (base.currentBehaviourStateIndex == 2) { MoveToTargetEnemy(); base.agent.speed = 9f; base.agent.stoppingDistance = 0f; if (isDancing) { DancingStopServerRpc(); } } if (base.currentBehaviourStateIndex == 2 && ((Object)(object)targetEnemy != (Object)null || (Object)(object)targetEnemyAI != (Object)null) && Vector3.Distance(((Component)targetEnemy).transform.position, ((Component)this).transform.position) <= 3f) { timeSinceLastDamage += Time.deltaTime; if (timeSinceLastDamage >= damageInterval) { ((EnemyAI)this).HitEnemy(1, (PlayerControllerB)null, false, -1); timeSinceLastDamage = 0f; timeSinceBeingHit = 0f; } } } private IEnumerator ToggleDancing() { base.creatureAnimator.SetBool("Dancing", true); isDancing = true; wasDancingLastFrame = true; yield return (object)new WaitForSeconds(0.3f); } private IEnumerator ToggleDancingNoNoise() { base.creatureAnimator.SetBool("Dancing", false); isDancing = false; wasDancingLastFrame = false; yield return (object)new WaitForSeconds(0.3f); } [ClientRpc] public void DancingStartClientRpc() { //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(1611076247u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1611076247u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!hasPlayedDanceSound) { base.creatureVoice.PlayOneShot(soundStartDance); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, soundStartDance, 1f); hasPlayedDanceSound = true; } ((MonoBehaviour)this).StartCoroutine(ToggleDancing()); } } [ServerRpc(RequireOwnership = false)] public void DancingStartServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2643196835u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2643196835u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DancingStartClientRpc(); } } } [ServerRpc(RequireOwnership = false)] public void DancingStopServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(590959896u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 590959896u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DancingStopClientRpc(); } } } [ClientRpc] public void DancingStopClientRpc() { //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(953641871u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 953641871u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; hasPlayedDanceSound = false; ((MonoBehaviour)this).StartCoroutine(ToggleDancingNoNoise()); } } } public void PlayNoise(int soundClip) { base.creatureVoice.PlayOneShot(soundDehyaNoise[soundClip]); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, soundDehyaNoise[soundClip], 1f); } [ServerRpc(RequireOwnership = false)] public void LookForEnemiesNearbyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3135527411u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3135527411u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Collider[] array = Physics.OverlapSphere(((Component)this).transform.position, detectionRadius, LayerMask.op_Implicit(enemyLayer)); Collider[] array2 = array; foreach (Collider val3 in array2) { Transform root = ((Component)val3).transform.root; EnemyAI component = ((Component)root).GetComponent<EnemyAI>(); if (!((Object)(object)component != (Object)null) || !IsVisible(root) || component is DehyaEnemyAI || !component.enemyType.canDie || component.isEnemyDead || !(component.enemyType.enemyName != "Blob") || !(component.enemyType.enemyName != "Docile Locust Bees") || !(component.enemyType.enemyName != "Manticoil")) { continue; } if (component.enemyType.enemyName == "Maneater") { CaveDwellerAI val4 = (CaveDwellerAI)(object)((component is CaveDwellerAI) ? component : null); if (val4 != null && ((Behaviour)val4.propScript).enabled) { continue; } } targetEnemy = root; targetEnemyAI = component; NetworkObject component2 = ((Component)targetEnemyAI).gameObject.GetComponent<NetworkObject>(); LookForEnemiesNearbyClientRpc(targetEnemy.position, NetworkObjectReference.op_Implicit(component2)); ((EnemyAI)this).SwitchToBehaviourServerRpc(2); break; } } [ClientRpc] public void LookForEnemiesNearbyClientRpc(Vector3 targetPosition, NetworkObjectReference meow) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(686919563u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref targetPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref meow, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 686919563u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; try { targetEnemy.position = targetPosition; NetworkObject val3 = default(NetworkObject); EnemyAI val4 = default(EnemyAI); if (((NetworkObjectReference)(ref meow)).TryGet(ref val3, (NetworkManager)null) && ((Component)((Component)val3).transform).TryGetComponent<EnemyAI>(ref val4)) { targetEnemyAI = val4; } } catch (NullReferenceException) { } } [ServerRpc(RequireOwnership = false)] public void PlayStartCombatServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4018386844u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4018386844u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!hasPlayedBattleSound) { PlayStartCombatClientRpc(); hasPlayedBattleSound = true; } } } [ClientRpc] public void PlayStartCombatClientRpc() { //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(1750625558u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1750625558u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureVoice.PlayOneShot(soundDehyaNoise[0]); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, soundDehyaNoise[0], 1f); } } } [ServerRpc(RequireOwnership = false)] public void PlayKillNoiseServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1234330584u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1234330584u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayKillNoiseClientRpc(); } } } [ClientRpc] public void PlayKillNoiseClientRpc() { //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(629406205u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 629406205u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayNoise(1); } } } private bool IsVisible(Transform target) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) Vector3 val = target.position - ((Component)this).transform.position; float magnitude = ((Vector3)(ref val)).magnitude; if (!Physics.Raycast(((Component)this).transform.position, val, magnitude, LayerMask.op_Implicit(obstacleLayer))) { return true; } return false; } private void CheckIfCooledOff() { if (base.currentBehaviourStateIndex == 3 && angeredTimer <= 0f) { ((EnemyAI)this).SwitchToBehaviourState(0); } } private void MoveToTargetEnemy() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)targetEnemy != (Object)null) { base.agent.SetDestination(targetEnemy.position); base.agent.speed = 9f; } if (targetEnemyAI.isEnemyDead) { hasPlayedBattleSound = false; targetEnemy = null; targetEnemyAI = null; ((EnemyAI)this).SwitchToBehaviourState(1); PlayKillNoiseClientRpc(); } } catch (NullReferenceException) { } } [ServerRpc(RequireOwnership = false)] public void HandleHealthServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(104498576u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 104498576u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; HandleHealthClientRpc(); } } } [ClientRpc] public void HandleHealthClientRpc() { //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(16918071u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 16918071u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.enemyHP <= 2) { ((Renderer)((Component)((Component)this).transform.Find("DehyaSK").Find("Body")).GetComponent<SkinnedMeshRenderer>()).materials[1].mainTexture = (Texture)(object)hurtBody; } else { ((Renderer)((Component)((Component)this).transform.Find("DehyaSK").Find("Body")).GetComponent<SkinnedMeshRenderer>()).materials[1].mainTexture = (Texture)(object)healthyBody; } } } private void CheckForEmployers() { //IL_0015: 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) if (base.currentBehaviourStateIndex == 0) { Collider[] array = Physics.OverlapSphere(((Component)this).transform.position, employerDetectionRange, LayerMask.op_Implicit(playerLayer)); if (array.Length != 0) { OfferBlade(((Component)array[0]).transform); return; } base.creatureAnimator.SetBool("HandOut", false); isWithinHireRange = false; } } private void OfferBlade(Transform playerTransform) { //IL_0013: 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_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_002b: 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_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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_006a: Unknown result type (might be due to invalid IL or missing references) base.agent.speed = 0f; Vector3 val = playerTransform.position - ((Component)this).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; Quaternion val2 = Quaternion.LookRotation(new Vector3(normalized.x, 0f, normalized.z)); ((Component)this).transform.rotation = Quaternion.Slerp(((Component)this).transform.rotation, val2, Time.deltaTime * 5f); base.creatureAnimator.SetBool("HandOut", true); } public void AttemptHireCreature(PlayerControllerB player) { int playerId = (int)player.playerClientId; HireCreatureServerRpc(playerId); } [ServerRpc(RequireOwnership = false)] public void HireCreatureServerRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3762414434u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3762414434u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val3.currentlyHeldObjectServer == (Object)null) { ((MonoBehaviour)this).StartCoroutine(TemporarilyModifyComponent()); return; } if (val3.currentlyHeldObjectServer.scrapValue < Plugin.HiringPrice.Value && val3.currentlyHeldObjectServer.itemProperties.itemName != "Dehya's Makeup") { ((MonoBehaviour)this).StartCoroutine(TemporarilyModifyComponent()); return; } ((Component)hireTrigger).gameObject.SetActive(false); isHired = true; playerWhoHired = val3; HireCreatureClientRpc(playerId); } } private IEnumerator TemporarilyModifyComponent() { hireTrigger.hoverTip = "Requires worthwhile scrap as payment"; TemporarilyDisableComponentClientRpc(); yield return (object)new WaitForSeconds(5f); hireTrigger.hoverTip = "Hire Dehya [LMB]:"; RestoreComponentClientRpc(); } [ClientRpc] private void TemporarilyDisableComponentClientRpc() { //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(2563650984u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2563650984u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; hireTrigger.hoverTip = "Requires worthwhile scrap as payment"; } } } [ClientRpc] private void RestoreComponentClientRpc() { //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(3594629067u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3594629067u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; hireTrigger.hoverTip = "Hire Dehya [LMB]:"; } } } [ClientRpc] public void HireCreatureClientRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) 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(2493665608u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2493665608u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(((Component)this).transform.position.x, ((Component)this).transform.position.y - 1000f, ((Component)this).transform.position.z); ((Component)val3.currentlyHeldObjectServer).gameObject.SetActive(false); val3.DiscardHeldObject(true, (NetworkObject)null, val4, true); ((Component)((Component)this).transform.Find("ScanNode")).GetComponent<ScanNodeProperties>().subText = "Hired by: " + val3.playerUsername; ((Behaviour)HUDManager.Instance.itemSlotIcons[val3.currentItemSlot]).enabled = false; base.creatureAnimator.SetBool("HandOut", false); base.creatureAnimator.SetBool("Hired", true); base.agent.speed = 5f; isHired = true; playerWhoHired = val3; ((Component)hireTrigger).gameObject.SetActive(false); int num = RoundManager.PlayRandomClip(base.creatureVoice, soundDehyaJoinParty, true, 1f, 0, 1000); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, soundDehyaJoinParty[num], 1f); ((EnemyAI)this).SwitchToBehaviourServerRpc(1); } } } [ServerRpc(RequireOwnership = false)] public void EmployerDeadServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(707678155u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 707678155u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; isHired = false; playerWhoHired = null; ((EnemyAI)this).StartSearch(((Component)this).transform.position, base.currentSearch); base.currentSearch.searchWidth = 180f; base.currentSearch.searchPrecision = 10f; base.moveTowardsDestination = true; base.agent.speed = 5f; ((Behaviour)base.agent).enabled = true; EmployerDeadClientRpc(); } } } [ClientRpc] public void EmployerDeadClientRpc() { //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(2145476862u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2145476862u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; isHired = false; playerWhoHired = null; ((Behaviour)base.agent).enabled = true; base.creatureAnimator.SetBool("Hired", false); ((Component)((Component)this).transform.Find("ScanNode")).GetComponent<ScanNodeProperties>().subText = ""; ((Behaviour)hireTrigger).enabled = true; base.agent.speed = 5f; ((EnemyAI)this).SwitchToBehaviourServerRpc(0); } } } private void FollowEmployer() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)playerWhoHired != (Object)null && ((Behaviour)base.agent).isActiveAndEnabled) { FollowEmployerServerRpc(((Component)playerWhoHired).transform.position); } } [ServerRpc(RequireOwnership = false)] private void FollowEmployerServerRpc(Vector3 destination) { //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_00eb: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3006074704u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref destination); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3006074704u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((Behaviour)base.agent).isActiveAndEnabled) { return; } try { base.agent.SetDestination(destination); base.agent.stoppingDistance = 4f; } catch (Exception) { } } [ServerRpc(RequireOwnership = false)] private void AttackPlayerServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_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.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1311575384u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1311575384u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)playerWhoHit != (Object)null) { base.agent.SetDestination(((Component)playerWhoHit).transform.position); base.agent.stoppingDistance = 0f; } AttackPlayerClientRpc(); } } [ClientRpc] private void AttackPlayerClientRpc() { //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(4004154220u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4004154220u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetBool("Angry", true); } } } [ServerRpc(RequireOwnership = false)] private void CalculateAnimationSpeedServerRpc(float maxSpeed = 1f) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) 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(3234949226u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref maxSpeed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3234949226u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Vector3 val3 = Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, maxSpeed); float maxSpeed2 = ((Vector3)(ref val3)).magnitude / (Time.deltaTime * 3f); previousPosition = ((Component)this).transform.position; CalculateAnimationSpeedClientRpc(maxSpeed2); } } } [ClientRpc] private void CalculateAnimationSpeedClientRpc(float maxSpeed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1252448632u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref maxSpeed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1252448632u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetBool("Walking", maxSpeed > 0.05f); } } } public override void KillEnemy(bool destroy = false) { ((Component)hireTrigger).gameObject.SetActive(false); ((EnemyAI)this).KillEnemy(destroy); base.agent.speed = 0f; } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Expected O, but got Unknown //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2910680899u, new RpcReceiveHandler(__rpc_handler_2910680899), "SprintingServerRpc"); ((NetworkBehaviour)this).__registerRpc(1110503656u, new RpcReceiveHandler(__rpc_handler_1110503656), "SprintingClientRpc"); ((NetworkBehaviour)this).__registerRpc(658431256u, new RpcReceiveHandler(__rpc_handler_658431256), "AttackServerRpc"); ((NetworkBehaviour)this).__registerRpc(633428897u, new RpcReceiveHandler(__rpc_handler_633428897), "AttackClientRpc"); ((NetworkBehaviour)this).__registerRpc(1201830463u, new RpcReceiveHandler(__rpc_handler_1201830463), "AttackPlayerEnemyClientRpc"); ((NetworkBehaviour)this).__registerRpc(1611076247u, new RpcReceiveHandler(__rpc_handler_1611076247), "DancingStartClientRpc"); ((NetworkBehaviour)this).__registerRpc(2643196835u, new RpcReceiveHandler(__rpc_handler_2643196835), "DancingStartServerRpc"); ((NetworkBehaviour)this).__registerRpc(590959896u, new RpcReceiveHandler(__rpc_handler_590959896), "DancingStopServerRpc"); ((NetworkBehaviour)this).__registerRpc(953641871u, new RpcReceiveHandler(__rpc_handler_953641871), "DancingStopClientRpc"); ((NetworkBehaviour)this).__registerRpc(3135527411u, new RpcReceiveHandler(__rpc_handler_3135527411), "LookForEnemiesNearbyServerRpc"); ((NetworkBehaviour)this).__registerRpc(686919563u, new RpcReceiveHandler(__rpc_handler_686919563), "LookForEnemiesNearbyClientRpc"); ((NetworkBehaviour)this).__registerRpc(4018386844u, new RpcReceiveHandler(__rpc_handler_4018386844), "PlayStartCombatServerRpc"); ((NetworkBehaviour)this).__registerRpc(1750625558u, new RpcReceiveHandler(__rpc_handler_1750625558), "PlayStartCombatClientRpc"); ((NetworkBehaviour)this).__registerRpc(1234330584u, new RpcReceiveHandler(__rpc_handler_1234330584), "PlayKillNoiseServerRpc"); ((NetworkBehaviour)this).__registerRpc(629406205u, new RpcReceiveHandler(__rpc_handler_629406205), "PlayKillNoiseClientRpc"); ((NetworkBehaviour)this).__registerRpc(104498576u, new RpcReceiveHandler(__rpc_handler_104498576), "HandleHealthServerRpc"); ((NetworkBehaviour)this).__registerRpc(16918071u, new RpcReceiveHandler(__rpc_handler_16918071), "HandleHealthClientRpc"); ((NetworkBehaviour)this).__registerRpc(3762414434u, new RpcReceiveHandler(__rpc_handler_3762414434), "HireCreatureServerRpc"); ((NetworkBehaviour)this).__registerRpc(2563650984u, new RpcReceiveHandler(__rpc_handler_2563650984), "TemporarilyDisableComponentClientRpc"); ((NetworkBehaviour)this).__registerRpc(3594629067u, new RpcReceiveHandler(__rpc_handler_3594629067), "RestoreComponentClientRpc"); ((NetworkBehaviour)this).__registerRpc(2493665608u, new RpcReceiveHandler(__rpc_handler_2493665608), "HireCreatureClientRpc"); ((NetworkBehaviour)this).__registerRpc(707678155u, new RpcReceiveHandler(__rpc_handler_707678155), "EmployerDeadServerRpc"); ((NetworkBehaviour)this).__registerRpc(2145476862u, new RpcReceiveHandler(__rpc_handler_2145476862), "EmployerDeadClientRpc"); ((NetworkBehaviour)this).__registerRpc(3006074704u, new RpcReceiveHandler(__rpc_handler_3006074704), "FollowEmployerServerRpc"); ((NetworkBehaviour)this).__registerRpc(1311575384u, new RpcReceiveHandler(__rpc_handler_1311575384), "AttackPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(4004154220u, new RpcReceiveHandler(__rpc_handler_4004154220), "AttackPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3234949226u, new RpcReceiveHandler(__rpc_handler_3234949226), "CalculateAnimationSpeedServerRpc"); ((NetworkBehaviour)this).__registerRpc(1252448632u, new RpcReceiveHandler(__rpc_handler_1252448632), "CalculateAnimationSpeedClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_2910680899(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool running = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref running, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DehyaEnemyAI)(object)target).SprintingServerRpc(running); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1110503656(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool running = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref running, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DehyaEnemyAI)(object)target).SprintingClientRpc(running); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_658431256(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference networkObject = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref networkObject, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DehyaEnemyAI)(object)target).AttackServerRpc(networkObject); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_633428897(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference networkObject = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref networkObject, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DehyaEnemyAI)(object)target).AttackClientRpc(networkObject); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1201830463(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; ((DehyaEnemyAI)(object)target).AttackPlayerEnemyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1611076247(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; ((DehyaEnemyAI)(object)target).DancingStartClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2643196835(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; ((DehyaEnemyAI)(object)target).DancingStartServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_590959896(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; ((DehyaEnemyAI)(object)target).DancingStopServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_953641871(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; ((DehyaEnemyAI)(object)target).DancingStopClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3135527411(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; ((DehyaEnemyAI)(object)target).LookForEnemiesNearbyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_686919563(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 targetPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetPosition); NetworkObjectReference meow = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref meow, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DehyaEnemyAI)(object)target).LookForEnemiesNearbyClientRpc(targetPosition, meow); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4018386844(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; ((DehyaEnemyAI)(object)target).PlayStartCombatServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1750625558(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; ((DehyaEnemyAI)(object)target).PlayStartCombatClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1234330584(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; ((DehyaEnemyAI)(object)target).PlayKillNoiseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_629406205(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; ((DehyaEnemyAI)(object)target).PlayKillNoiseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_104498576(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; ((DehyaEnemyAI)(object)target).HandleHealthServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_16918071(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; ((DehyaEnemyAI)(object)target).HandleHealthClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3762414434(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((DehyaEnemyAI)(object)target).HireCreatureServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2563650984(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; ((DehyaEnemyAI)(object)target).TemporarilyDisableComponentClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3594629067(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; ((DehyaEnemyAI)(object)target).RestoreComponentClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2493665608(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((DehyaEnemyAI)(object)target).HireCreatureClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_707678155(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; ((DehyaEnemyAI)(object)target).EmployerDeadServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2145476862(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; ((DehyaEnemyAI)(object)target).EmployerDeadClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3006074704(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 destination = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destination); target.__rpc_exec_stage = (__RpcExecStage)1; ((DehyaEnemyAI)(object)target).FollowEmployerServerRpc(destination); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1311575384(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; ((DehyaEnemyAI)(object)target).AttackPlayerServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4004154220(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; ((DehyaEnemyAI)(object)target).AttackPlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3234949226(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float maxSpeed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref maxSpeed, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DehyaEnemyAI)(object)target).CalculateAnimationSpeedServerRpc(maxSpeed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1252448632(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float maxSpeed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref maxSpeed, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DehyaEnemyAI)(object)target).CalculateAnimationSpeedClientRpc(maxSpeed); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DehyaEnemyAI"; } } public static class Assets { public static AssetBundle DehyaAssetBundle; public static void PopulateAssets() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); DehyaAssetBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "dehya")); if ((Object)(object)DehyaAssetBundle == (Object)null) { Plugin.Logger.LogError((object)"Failed to load custom assets."); } } } [BepInPlugin("DehyaEnemy", "DehyaEnemy", "1.0.0")] [BepInDependency(/*Could not decode attribute a