Decompiled source of Soul Devourer Enemy v1.2.0
SoulDev.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalConfig; using LethalConfig.ConfigItems; using LethalConfig.ConfigItems.Options; using Microsoft.CodeAnalysis; using SolidLib.Registry; using SoulDev.NetcodePatcher; using Soul_Devourer_Enemy; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("bcs4313")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Soul Devourer Enemy for Lethal Company.")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+de30a7b4fd06f505c14721da353043ab3517b186")] [assembly: AssemblyProduct("Soul Devourer Enemy")] [assembly: AssemblyTitle("SoulDev")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SoulDev { internal class EntityWarp { public struct entrancePack { public EntranceTeleport tele; public Vector3 navPosition; } public static EntranceTeleport[] mapEntrances; public static entrancePack findNearestEntrance(EnemyAI __instance) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) float num = 100000000f; EntranceTeleport val = null; EntranceTeleport[] array = mapEntrances; for (int i = 0; i < array.Length; i++) { if (__instance.isOutside == array[i].isEntranceToBuilding && Vector3.Distance(((Component)__instance).transform.position, ((Component)array[i]).transform.position) < num) { num = Vector3.Distance(((Component)__instance).transform.position, ((Component)array[i]).transform.position); val = array[i]; } } entrancePack result = default(entrancePack); NavMeshHit val2 = default(NavMeshHit); if ((Object)(object)val != (Object)null && NavMesh.SamplePosition(((Component)val).transform.position, ref val2, 10f, -1)) { result.navPosition = ((NavMeshHit)(ref val2)).position; } result.tele = val; return result; } public static void SendEnemyInside(EnemyAI __instance) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) __instance.isOutside = false; __instance.allAINodes = GameObject.FindGameObjectsWithTag("AINode"); EntranceTeleport tele = findNearestEntrance(__instance).tele; if (!Object.op_Implicit((Object)(object)tele)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find entrance teleport."); } Transform entrancePoint = tele.entrancePoint; if (!Object.op_Implicit((Object)(object)entrancePoint)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find best exit position."); } NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(((Component)entrancePoint).transform.position, ref val, 10f, -1)) { __instance.serverPosition = ((NavMeshHit)(ref val)).position; ((Component)__instance).transform.position = ((NavMeshHit)(ref val)).position; __instance.agent.Warp(__instance.serverPosition); __instance.SyncPositionToClients(); } else { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find exit NavmeshHit position"); } } public static Transform findExitPoint(EntranceTeleport referenceDoor) { return referenceDoor.exitPoint; } public static void SendEnemyOutside(EnemyAI __instance, bool SpawnOnDoor = true) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) __instance.isOutside = true; __instance.allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode"); EntranceTeleport tele = findNearestEntrance(__instance).tele; if (!Object.op_Implicit((Object)(object)tele)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find entrance teleport."); } Transform entrancePoint = tele.entrancePoint; if (!Object.op_Implicit((Object)(object)entrancePoint)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find best exit position."); } NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(((Component)entrancePoint).transform.position, ref val, 10f, -1)) { __instance.serverPosition = ((NavMeshHit)(ref val)).position; ((Component)__instance).transform.position = ((NavMeshHit)(ref val)).position; __instance.agent.Warp(__instance.serverPosition); __instance.SyncPositionToClients(); } else { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find exit NavmeshHit position"); } } } internal class SoulDevourerAI : EnemyAI { public enum State { SearchingForPlayer, Staring, HeadingToEntrance, Attacking, Shredding, Leaping, Fleeing } protected Animator animator; protected float starePoints = 0f; protected float angerRate = 110f; protected int attackState = 0; private bool proccedRoar = false; private bool proccedCrouch = false; private bool proccedRun = false; private bool proceedShred = false; private bool proceedLeap = false; private PlayerControllerB shreddedPlayer = null; public Collider uprightCollider; public Collider foursCollider; public Transform mouth; protected bool thrashingCorpse = false; protected PlayerControllerB attachedPlayer = null; private float attachTime = 0f; private bool isOutSwitch = false; protected float baseLeapChance = 100f; protected float leaptime = 0f; protected Vector3 leapPos; protected EntranceTeleport nearestEntrance = null; public Vector3 nearestEntranceNavPosition = Vector3.zero; protected PlayerControllerB mostRecentPlayer = null; protected int entranceDelay = 0; protected float chanceToLocateEntrancePlayerBonus = 0f; protected float chanceToLocateEntrance = 0f; public List<EnemyAI> unreachableEnemies = new List<EnemyAI>(); public Vector3 itemNavmeshPosition = Vector3.zero; protected int sourcecycle = 75; protected float stamina = 0f; protected bool recovering = false; public int provokePoints = 0; public Transform turnCompass; protected float timeSinceHittingLocalPlayer; protected float timeSinceNewRandPos; protected Vector3 positionRandomness; protected Vector3 StalkPos; protected Random enemyRandom; protected bool isDeadAnimationDone; private float timeSinceFleeStart = 0f; private Vector3 fleeDestination = Vector3.zero; public ParticleSystem shadowParticles; private bool awaitingShadowMode = false; private bool shadowEnable = false; private bool isVisible = true; public GameObject meshRenderRoot; private float timeControl = 1f; public AudioSource creatureRoar; public AudioSource creatureHit1; public AudioSource creatureHit2; private int hitRotation = 1; public AudioSource creatureStare; public AudioSource creatureExtract; public AudioSource creatureLeap; public AudioSource creatureDeath; public AudioSource creatureFlee; private bool markDead = false; public Volume postProcessVolume; protected float processScalar = 0.2f; protected float runAnimationCoefficient = 14f; protected float walkAnimationCoefficient = 3f; public void LogDebug(string text) { Plugin.Logger.LogInfo((object)text); } public void facePosition(Vector3 pos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) Vector3 val = pos - ((Component)this).transform.position; val.y = 0f; if (val != Vector3.zero) { Quaternion val2 = Quaternion.LookRotation(val); ((Component)this).transform.rotation = Quaternion.Euler(0f, ((Quaternion)(ref val2)).eulerAngles.y, 0f); } } public override void OnDestroy() { ((EnemyAI)this).OnDestroy(); } public PlayerControllerB getNearestPlayer() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts; PlayerControllerB result = null; float num = 1E+09f; foreach (PlayerControllerB val in allPlayerScripts) { if (Object.op_Implicit((Object)(object)val) && !val.isPlayerDead && val.isPlayerControlled && Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position) < num) { num = Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position); result = val; } } return result; } public override void Start() { //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); EntityWarp.mapEntrances = Object.FindObjectsOfType<EntranceTeleport>(false); mostRecentPlayer = getNearestPlayer(); animator = ((Component)this).gameObject.GetComponent<Animator>(); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { DoAnimationClientRpc(0); } stamina += 60f; base.creatureVoice.volume = Plugin.moaiGlobalMusicVol.Value; base.creatureSFX.volume = Plugin.moaiGlobalMusicVol.Value; creatureRoar.volume = Plugin.moaiGlobalMusicVol.Value; creatureDeath.volume = Plugin.moaiGlobalMusicVol.Value; creatureExtract.volume = Plugin.moaiGlobalMusicVol.Value; creatureFlee.volume = Plugin.moaiGlobalMusicVol.Value; creatureHit1.volume = Plugin.moaiGlobalMusicVol.Value; creatureHit2.volume = Plugin.moaiGlobalMusicVol.Value; creatureStare.volume = Plugin.moaiGlobalMusicVol.Value; timeSinceHittingLocalPlayer = 0f; timeSinceNewRandPos = 0f; positionRandomness = new Vector3(0f, 0f, 0f); enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex); isDeadAnimationDone = false; base.currentBehaviourStateIndex = 0; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); moaiSoundPlayClientRpc("creatureVoice"); base.enemyHP = Plugin.health.Value; float num = Plugin.moaiGlobalSize.Value; if (enemyRandom.NextDouble() <= (double)Plugin.moaiGlobalSizeVar.Value) { num = ((!(Random.Range(0f, 1f) < 0.5f)) ? ((1f + Random.Range(0f, 2f)) * num) : ((1f - Random.Range(0f, 0.95f)) * num)); } modifySizeClientRpc(num); } [ClientRpc] public void modifySizeClientRpc(float size) { //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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(107833227u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref size, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 107833227u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { float num = (float)Math.Pow(size, 0.3); Transform transform = ((Component)this).gameObject.transform; transform.localScale *= size * Plugin.moaiGlobalSize.Value; NavMeshAgent component = ((Component)this).gameObject.GetComponent<NavMeshAgent>(); component.height *= size; AudioSource creatureVoice = base.creatureVoice; creatureVoice.pitch /= num; AudioSource creatureSFX = base.creatureSFX; creatureSFX.pitch /= num; AudioSource obj = creatureRoar; obj.pitch /= num; AudioSource obj2 = creatureHit1; obj2.pitch /= num; AudioSource obj3 = creatureHit2; obj3.pitch /= num; AudioSource obj4 = creatureStare; obj4.pitch /= num; AudioSource obj5 = creatureExtract; obj5.pitch /= num; AudioSource obj6 = creatureLeap; obj6.pitch /= num; AudioSource obj7 = creatureDeath; obj7.pitch /= num; AudioSource obj8 = creatureFlee; obj8.pitch /= num; timeControl /= num; } } } public void LateUpdate() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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) PlayerControllerB localPlayerController = RoundManager.Instance.playersManager.localPlayerController; float num = Vector3.Distance(((Component)this).transform.position, ((Component)localPlayerController).transform.position); if (num > 40f || !Plugin.pulseFX.Value) { postProcessVolume.weight = 0f; } else { Volume obj = postProcessVolume; obj.weight /= 1f + 0.2f * num * processScalar; } if (Object.op_Implicit((Object)(object)attachedPlayer) && Math.Abs(Time.time - attachTime) > 1.2f && ((NetworkBehaviour)RoundManager.Instance).IsHost) { letGoOfPlayerClientRpc(((NetworkBehaviour)attachedPlayer).NetworkObject.NetworkObjectId); } if (Object.op_Implicit((Object)(object)attachedPlayer) && !thrashingCorpse) { ((Component)attachedPlayer).transform.position = mouth.position; if ((float)enemyRandom.Next() < 0.25f) { attachedPlayer.DropBlood(default(Vector3), true, false); attachedPlayer.AddBloodToBody(); attachedPlayer.bloodParticle.Play(); attachedPlayer.deadBody.bloodSplashParticle.Play(); } } if (Object.op_Implicit((Object)(object)attachedPlayer) && thrashingCorpse) { ((Component)attachedPlayer.deadBody).transform.position = mouth.position; if ((float)enemyRandom.Next() < 0.25f) { attachedPlayer.deadBody.bloodSplashParticle.Play(); attachedPlayer.deadBody.MakeCorpseBloody(); } } } public override void Update() { //IL_0054: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (!base.isEnemyDead && base.enemyHP <= 0 && !markDead) { animator.speed = 1f; ((EnemyAI)this).KillEnemyOnOwnerClient(false); stopAllSound(); AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Death")) { currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Exit")) { animator.Play("Death"); } } base.isEnemyDead = true; base.enemyHP = 0; moaiSoundPlayClientRpc("creatureDeath"); deadEventClientRpc(); markDead = true; } if (base.isEnemyDead) { if (!isDeadAnimationDone) { animator.speed = 1f; isDeadAnimationDone = true; stopAllSound(); base.creatureVoice.PlayOneShot(base.dieSFX); } return; } if ((Object)(object)base.targetPlayer != (Object)null && base.targetPlayer.isPlayerDead) { base.targetPlayer = null; } base.movingTowardsTargetPlayer = (Object)(object)base.targetPlayer != (Object)null; timeSinceHittingLocalPlayer += Time.deltaTime; timeSinceNewRandPos += Time.deltaTime; if ((Object)(object)base.targetPlayer != (Object)null && ((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false)) { turnCompass.LookAt(((Component)base.targetPlayer.gameplayCamera).transform.position); } if (base.stunNormalizedTimer > 0f && ((NetworkBehaviour)RoundManager.Instance).IsHost) { base.stunNormalizedTimer = 0f; moaiSoundPlayClientRpc("creatureFlee"); base.agent.speed = 0f; timeSinceFleeStart = Time.time; shadowEnable = false; awaitingShadowMode = true; fleeDestination = Vector3.zero; ((EnemyAI)this).StopSearch(base.currentSearch, true); setAnimationSpeedClientRpc(1f * timeControl); animPlayClientRpc("StandingStun"); ((EnemyAI)this).SwitchToBehaviourClientRpc(6); } if (awaitingShadowMode && !shadowEnable && ((NetworkBehaviour)RoundManager.Instance).IsHost) { base.agent.speed = 0f; setAnimationSpeedClientRpc(1f * timeControl); if (creatureFlee.time > 2.41f) { SetVisibleClientRpc(visible: false); shadowEnable = true; } } else if (base.currentBehaviourStateIndex != 6) { shadowEnable = false; awaitingShadowMode = false; } if (base.currentBehaviourStateIndex == 2 && base.isOutside && !isOutSwitch) { ((Component)this).transform.localScale = new Vector3(1f, 1f, 1f); isOutSwitch = true; } if (!base.isOutside && isOutSwitch) { ((Component)this).transform.localScale = new Vector3(0.4f, 0.4f, 0.4f); isOutSwitch = false; } if (base.currentBehaviourStateIndex == 5) { if (((Component)foursCollider).gameObject.activeInHierarchy) { ((Component)foursCollider).gameObject.SetActive(false); } if (((Component)uprightCollider).gameObject.activeInHierarchy) { ((Component)uprightCollider).gameObject.SetActive(false); } } else if (base.currentBehaviourStateIndex == 4) { if (((Component)foursCollider).gameObject.activeInHierarchy) { ((Component)foursCollider).gameObject.SetActive(false); } if (((Component)uprightCollider).gameObject.activeInHierarchy) { ((Component)uprightCollider).gameObject.SetActive(false); } } else if (base.currentBehaviourStateIndex == 3) { if (!((Component)foursCollider).gameObject.activeInHierarchy) { ((Component)foursCollider).gameObject.SetActive(true); } if (((Component)uprightCollider).gameObject.activeInHierarchy) { ((Component)uprightCollider).gameObject.SetActive(false); } } else { if (((Component)foursCollider).gameObject.activeInHierarchy) { ((Component)foursCollider).gameObject.SetActive(false); } if (!((Component)uprightCollider).gameObject.activeInHierarchy) { ((Component)uprightCollider).gameObject.SetActive(true); } } } public override void DoAIInterval() { //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (provokePoints > 0) { provokePoints--; } if (entranceDelay > 0) { entranceDelay--; } if (sourcecycle > 0) { sourcecycle--; } else { sourcecycle = 75; unreachableEnemies.Clear(); } if (stamina <= 0f) { recovering = true; } else if (stamina > 60f) { recovering = false; } if (sourcecycle % 5 == 0) { EntityWarp.entrancePack entrancePack = EntityWarp.findNearestEntrance((EnemyAI)(object)this); nearestEntrance = entrancePack.tele; nearestEntranceNavPosition = entrancePack.navPosition; if (stamina < 120f) { stamina += 8f; } mostRecentPlayer = getNearestPlayer(); } if ((Object)(object)base.targetPlayer != (Object)null) { mostRecentPlayer = base.targetPlayer; } if (!isVisible && base.currentBehaviourStateIndex != 6) { SetVisibleClientRpc(visible: true); } AIInterval(); } public void AIInterval() { switch (base.currentBehaviourStateIndex) { case 0: baseSearchingForPlayer(); break; case 2: baseHeadingToEntrance(); break; case 1: baseStaring(); break; case 3: baseAttacking(32f); break; case 4: baseShredding(); break; case 6: baseFleeing(); break; default: LogDebug("This Behavior State doesn't exist!"); break; } } public void baseFleeing() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) if (!shadowEnable) { base.agent.speed = 0f; return; } base.agent.speed = 15f * Plugin.moaiGlobalSpeed.Value; if (fleeDestination == Vector3.zero) { fleeDestination = pickFleeDestination(); return; } base.targetPlayer = null; ((EnemyAI)this).SetDestinationToPosition(fleeDestination, false); if ((double)Vector3.Distance(fleeDestination, ((Component)this).transform.position) < 2.0 + (double)((Component)this).gameObject.transform.localScale.x || Time.time - timeSinceFleeStart > 9f) { stamina = 120f; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); shadowParticles.Stop(); shadowEnable = false; awaitingShadowMode = false; base.targetPlayer = null; SetVisibleClientRpc(visible: true); animPlayClientRpc("Walk"); DoAnimationClientRpc(1); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } } [ClientRpc] private void SetVisibleClientRpc(bool visible) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(12838872u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref visible, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 12838872u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { Renderer[] componentsInChildren = meshRenderRoot.GetComponentsInChildren<Renderer>(true); foreach (Renderer val3 in componentsInChildren) { val3.enabled = visible; } isVisible = visible; if (!visible) { shadowParticles.Play(); } else { shadowParticles.Stop(); } } } public Vector3 pickFleeDestination() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) GameObject[] array = GameObject.FindGameObjectsWithTag("OutsideAINode"); if (!base.isOutside) { array = GameObject.FindGameObjectsWithTag("AINode"); } List<GameObject> list = new List<GameObject>(); GameObject[] array2 = array; foreach (GameObject val in array2) { if (Vector3.Distance(val.transform.position, ((Component)this).transform.position) > 60f) { list.Add(val); } } if (list.Count > 0) { return list[enemyRandom.Next(0, list.Count)].transform.position; } return array[enemyRandom.Next(0, array.Length)].transform.position; } public void baseShredding() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) if (!creatureHit1.isPlaying && !creatureHit2.isPlaying) { if (hitRotation == 1) { moaiSoundPlayClientRpc("creatureHit1"); hitRotation = 2; } else { moaiSoundPlayClientRpc("creatureHit2"); hitRotation = 1; } } AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Thrash") && !proceedShred) { animPlayClientRpc("Thrash"); DoAnimationClientRpc(6); proceedShred = true; } setAnimationSpeedClientRpc(1f); currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if ((double)((AnimatorStateInfo)(ref currentAnimatorStateInfo)).normalizedTime >= 0.8) { currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Thrash")) { attackState = 2; DoAnimationClientRpc(5); animPlayClientRpc("Run"); ((EnemyAI)this).SwitchToBehaviourClientRpc(3); } } } public void baseStaring() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) base.agent.speed = 0f; setAnimationSpeedClientRpc(1f); if (animator.GetInteger("state") != 2) { starePoints = 0f; DoAnimationClientRpc(2); animPlayClientRpc("Stare"); if (!creatureStare.isPlaying) { moaiSoundPlayClientRpc("creatureStare"); } } if (FoundClosestPlayerInRange(stamina, needLineOfSight: true)) { starePoints += angerRate / Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position); facePosition(((Component)base.targetPlayer).transform.position); } else { starePoints -= 2f; } AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Stare")) { return; } currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).normalizedTime >= 1f) { if ((double)starePoints > enemyRandom.NextDouble() * 100.0) { attackState = 0; ((EnemyAI)this).StopSearch(base.currentSearch, true); proccedRoar = false; proccedCrouch = false; proccedRun = false; ((EnemyAI)this).SwitchToBehaviourClientRpc(3); } else { stamina -= 80f; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } } } public void baseSearchingForPlayer(float lineOfSightRange = 28f) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) base.agent.speed = 6f * Plugin.moaiGlobalSpeed.Value; base.agent.angularSpeed = 120f; Vector3 velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude > base.agent.speed / 4f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(1); } velocity = base.agent.velocity; setAnimationSpeedClientRpc(((Vector3)(ref velocity)).magnitude / walkAnimationCoefficient); } else { velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude <= base.agent.speed / 8f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(0); } setAnimationSpeedClientRpc(1f); } } if (!base.creatureVoice.isPlaying) { moaiSoundPlayClientRpc("creatureVoice"); } updateEntranceChance(); if (enemyRandom.NextDouble() < (double)chanceToLocateEntrance && ((Component)this).gameObject.transform.localScale.x <= 2.2f && Plugin.canEnterIndoors.Value) { Debug.Log((object)"Soul Devourer: entrance state switch"); ((EnemyAI)this).StopSearch(base.currentSearch, true); ((EnemyAI)this).SwitchToBehaviourClientRpc(2); } if ((FoundClosestPlayerInRange(lineOfSightRange, needLineOfSight: true) && stamina >= 120f) || provokePoints > 0) { ((EnemyAI)this).StopSearch(base.currentSearch, true); ((EnemyAI)this).SwitchToBehaviourClientRpc(1); } else if (stamina < 100f) { base.targetPlayer = null; } } public void baseHeadingToEntrance() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Invalid comparison between Unknown and I4 //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_014f: 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_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) base.targetPlayer = null; Vector3 velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude > base.agent.speed / 4f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(1); } velocity = base.agent.velocity; setAnimationSpeedClientRpc(((Vector3)(ref velocity)).magnitude / walkAnimationCoefficient); } else { velocity = base.agent.velocity; if (((Vector3)(ref velocity)).magnitude <= base.agent.speed / 8f) { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { DoAnimationClientRpc(0); } setAnimationSpeedClientRpc(1f); } } ((EnemyAI)this).SetDestinationToPosition(nearestEntranceNavPosition, false); if (base.isOutside != nearestEntrance.isEntranceToBuilding || (int)base.agent.pathStatus == 1) { entranceDelay = 150; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } if ((double)Vector3.Distance(((Component)this).transform.position, nearestEntranceNavPosition) < 2.0 + (double)((Component)this).gameObject.transform.localScale.x) { if (nearestEntrance.isEntranceToBuilding) { Debug.Log((object)"SoulDev: Warp in"); EntityWarp.SendEnemyInside((EnemyAI)(object)this); nearestEntrance.PlayAudioAtTeleportPositions(); } else { Debug.Log((object)"SoulDev: Warp out"); EntityWarp.SendEnemyOutside((EnemyAI)(object)this); nearestEntrance.PlayAudioAtTeleportPositions(); } entranceDelay = 150; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } if (provokePoints > 0) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } } public void baseLeaping() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).SetDestinationToPosition(leapPos, false); if (!creatureLeap.isPlaying && !proceedLeap) { moaiSoundPlayClientRpc("creatureLeap"); } setAnimationSpeedClientRpc(1f); if (Time.time - leaptime >= 1f) { attackState = 2; proccedRun = false; if (stamina < 10f) { stamina = 10f; } DoAnimationClientRpc(5); animPlayClientRpc("Run"); attackState = 2; proccedRun = false; base.agent.acceleration = 14.5f * Plugin.moaiGlobalSpeed.Value; base.agent.speed = 14f * Plugin.moaiGlobalSpeed.Value; base.agent.angularSpeed = 145f; ((EnemyAI)this).SwitchToBehaviourClientRpc(3); } } public Vector3 getLeapPos() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)base.targetPlayer).transform.position; Vector3 val = default(Vector3); NavMeshHit val2 = default(NavMeshHit); for (int i = 0; i < 10; i++) { int num = enemyRandom.Next(-10, 10); int num2 = enemyRandom.Next(-35, 35); int num3 = enemyRandom.Next(-35, 35); ((Vector3)(ref val))..ctor(position.x + (float)num2, position.y + (float)num, position.z + (float)num3); bool flag = NavMesh.SamplePosition(val, ref val2, 60f, -1); float num4 = Vector3.Distance(position, ((NavMeshHit)(ref val2)).position); if (flag && num4 > 13f) { return ((NavMeshHit)(ref val2)).position; } } return ((Component)base.targetPlayer).transform.position; } public void baseAttacking(float range = 22f, float noLOSDivisor = 1.8f) { //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) AnimatorStateInfo currentAnimatorStateInfo; if (attackState == 0) { if (!creatureRoar.isPlaying) { moaiSoundPlayClientRpc("creatureRoar"); } currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Roar") && !proccedRoar) { animPlayClientRpc("Roar"); DoAnimationClientRpc(3); proccedRoar = true; } setAnimationSpeedClientRpc(1f); currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if ((double)((AnimatorStateInfo)(ref currentAnimatorStateInfo)).normalizedTime >= 0.8) { currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Roar")) { attackState = 1; } } } if (attackState == 1) { DoAnimationClientRpc(4); setAnimationSpeedClientRpc(2.5f); currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Prepare") && !proccedCrouch) { animPlayClientRpc("Prepare"); DoAnimationClientRpc(3); proccedCrouch = true; } currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if ((double)((AnimatorStateInfo)(ref currentAnimatorStateInfo)).normalizedTime >= 0.8) { currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Prepare")) { attackState = 2; } } } if (attackState == 2) { if (!base.creatureSFX.isPlaying) { moaiSoundPlayClientRpc("creatureSFX"); } base.agent.speed = 20f * Plugin.moaiGlobalSpeed.Value; base.agent.acceleration = 14.5f * Plugin.moaiGlobalSpeed.Value; base.agent.angularSpeed = 140f; Vector3 velocity = base.agent.velocity; setAnimationSpeedClientRpc(((Vector3)(ref velocity)).magnitude / runAnimationCoefficient); DoAnimationClientRpc(5); currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Run") && !proccedRun) { animPlayClientRpc("Run"); DoAnimationClientRpc(5); proccedRun = true; } } else { base.agent.speed = 0f * Plugin.moaiGlobalSpeed.Value; } updateEntranceChance(); stamina -= 2.8f; if (!FoundClosestPlayerInRange(stamina / noLOSDivisor, needLineOfSight: false) && !FoundClosestPlayerInRange(stamina, needLineOfSight: true)) { base.targetPlayer = null; starePoints = 0f; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); base.agent.acceleration = 14.5f * Plugin.moaiGlobalSpeed.Value; } else { StickingInFrontOfPlayer(); } } public void updateEntranceChance() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)nearestEntrance)) { return; } float num = Vector3.Distance(((Component)this).transform.position, ((Component)nearestEntrance).transform.position); chanceToLocateEntrancePlayerBonus = 1f; if (Object.op_Implicit((Object)(object)mostRecentPlayer)) { if (Object.op_Implicit((Object)(object)mostRecentPlayer) == base.isOutside) { chanceToLocateEntrancePlayerBonus = 1f; } else { chanceToLocateEntrancePlayerBonus = 1.5f; } } int num2 = 1; if (num < 20f) { num2 = 4; } if (num < 15f) { num2 = 6; } if (num < 10f) { num2 = 7; } if (num < 5f) { num2 = 10; } if (Object.op_Implicit((Object)(object)nearestEntrance)) { chanceToLocateEntrance = (float)(1.0 / Math.Pow(num, 2.0)) * (float)num2 * chanceToLocateEntrancePlayerBonus - (float)entranceDelay; } } public bool FoundClosestPlayerInRange(float r, bool needLineOfSight) { if (recovering) { return false; } moaiTargetClosestPlayer(r, needLineOfSight); if ((Object)(object)base.targetPlayer == (Object)null) { return false; } return (Object)(object)base.targetPlayer != (Object)null; } public bool moaiTargetClosestPlayer(float range, bool requireLineOfSight) { //IL_0060: 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_00a6: Unknown result type (might be due to invalid IL or missing references) if (recovering) { return false; } base.mostOptimalDistance = range; PlayerControllerB targetPlayer = base.targetPlayer; base.targetPlayer = null; for (int i = 0; i < StartOfRound.Instance.connectedPlayersAmount + 1; i++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false) && (!requireLineOfSight || ((EnemyAI)this).CheckLineOfSightForPosition(((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, Plugin.LOSWidth.Value, 80, -1f, (Transform)null))) { base.tempDist = Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position); if (base.tempDist < base.mostOptimalDistance) { base.mostOptimalDistance = base.tempDist; base.targetPlayer = StartOfRound.Instance.allPlayerScripts[i]; } } } if ((Object)(object)base.targetPlayer != (Object)null && (Object)(object)targetPlayer != (Object)null) { base.targetPlayer = targetPlayer; } return (Object)(object)base.targetPlayer != (Object)null; } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, -1); if (base.isEnemyDead || (hitID == -1 && (Object)(object)playerWhoHit == (Object)null)) { return; } base.enemyHP -= force; if ((Object)(object)playerWhoHit != (Object)null) { provokePoints += 20 * force; base.targetPlayer = playerWhoHit; } stamina = 60f; recovering = false; ((EnemyAI)this).SwitchToBehaviourClientRpc(3); if (((NetworkBehaviour)this).IsOwner) { if (base.enemyHP <= 0 && !markDead) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); stopAllSound(); base.isEnemyDead = true; moaiSoundPlayClientRpc("creatureDeath"); deadEventClientRpc(); markDead = true; } else { moaiSoundPlayClientRpc("creatureHit"); } } } [ClientRpc] public void deadEventClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(815579584u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 815579584u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { animator.Play("Death"); base.isEnemyDead = true; } } } [ServerRpc(RequireOwnership = false)] public void letGoOfPlayerServerRpc(ulong playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) 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(3542143556u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3542143556u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { letGoOfPlayerClientRpc(playerId); } } } [ClientRpc] public void letGoOfPlayerClientRpc(ulong playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1919010792u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1919010792u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } PlayerControllerB val3 = null; RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val4 in allPlayerScripts) { if (((NetworkBehaviour)val4).NetworkObject.NetworkObjectId == playerId) { val3 = val4; } } val3.playerCollider.enabled = true; NavMeshHit val5 = default(NavMeshHit); if (NavMesh.SamplePosition(((Component)val3).transform.position, ref val5, 15f, -1)) { ((Component)val3).transform.position = ((NavMeshHit)(ref val5)).position; } attachedPlayer = null; } private void StickingInFrontOfPlayer() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)base.targetPlayer == (Object)null) && ((NetworkBehaviour)this).IsOwner) { StalkPos = ((Component)base.targetPlayer).transform.position; ((EnemyAI)this).SetDestinationToPosition(StalkPos, false); } } public override void OnCollideWithEnemy(Collider other, EnemyAI collidedEnemy = null) { if (!(timeSinceHittingLocalPlayer < 0.5f) && !collidedEnemy.isEnemyDead && !base.isEnemyDead && !((Object)(object)collidedEnemy.enemyType == (Object)(object)base.enemyType)) { string text = ((Object)collidedEnemy.enemyType).name.ToLower(); if ((!text.Contains("mouth") || !text.Contains("dog")) && !collidedEnemy.enemyType.enemyName.ToLower().Contains("soul")) { timeSinceHittingLocalPlayer = 0f; collidedEnemy.HitEnemy(1, (PlayerControllerB)null, true, -1); } } } public override void OnCollideWithPlayer(Collider other) { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) if (timeSinceHittingLocalPlayer < 1.7f) { return; } PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if (!((Object)(object)val != (Object)null)) { return; } timeSinceHittingLocalPlayer = 0f; if (val.health <= 45) { val.KillPlayer(val.velocityLastFrame, true, (CauseOfDeath)6, 0, default(Vector3)); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { attachPlayerClientRpc(((NetworkBehaviour)val).NetworkObject.NetworkObjectId, lastHit: true, 20); } else { attachPlayerServerRpc(((NetworkBehaviour)val).NetworkObject.NetworkObjectId, lastHit: true, 20); } } else { val.DamagePlayer(45, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); if (((NetworkBehaviour)RoundManager.Instance).IsHost) { attachPlayerClientRpc(((NetworkBehaviour)val).NetworkObject.NetworkObjectId, lastHit: false, 10); } else { attachPlayerServerRpc(((NetworkBehaviour)val).NetworkObject.NetworkObjectId, lastHit: false, 10); } } } [ServerRpc(RequireOwnership = false)] public void attachPlayerServerRpc(ulong uid, bool lastHit, int staminaGrant) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) 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(3820758844u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref lastHit, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, staminaGrant); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3820758844u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { attachPlayerClientRpc(uid, lastHit, staminaGrant); } } } [ClientRpc] public void attachPlayerClientRpc(ulong uid, bool lastHit, int staminaGrant) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(158514313u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, uid); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref lastHit, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, staminaGrant); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 158514313u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } stamina += staminaGrant; proceedShred = false; attachTime = Time.time; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { ((EnemyAI)this).SwitchToBehaviourClientRpc(4); } RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val3 in allPlayerScripts) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == uid) { shreddedPlayer = val3; if (!lastHit) { ((Component)val3).transform.position = mouth.position; val3.playerCollider.enabled = false; attachedPlayer = val3; thrashingCorpse = false; } else { ((Component)val3.deadBody).transform.position = mouth.position; attachedPlayer = val3; thrashingCorpse = true; } break; } } } public virtual void playSoundId(string id) { } public void stopAllSound() { base.creatureSFX.Stop(); base.creatureVoice.Stop(); creatureRoar.Stop(); creatureStare.Stop(); creatureFlee.Stop(); } [ClientRpc] public void moaiSoundPlayClientRpc(string soundName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2548432240u, val, (RpcDelivery)0); bool flag = soundName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(soundName, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2548432240u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { switch (soundName) { case "creatureSFX": stopAllSound(); base.creatureSFX.Play(); break; case "creatureVoice": { stopAllSound(); double[] array = new double[10] { 0.0, 0.8244, 11.564, 29.11, 34.491, 37.84, 48.689, 64.518, 89.535, 92.111 }; int num = Random.Range(0, array.Length); base.creatureVoice.Play(); base.creatureVoice.SetScheduledStartTime(array[num]); base.creatureVoice.time = (float)array[num]; break; } case "creatureRoar": stopAllSound(); creatureRoar.Play(); break; case "creatureHit1": creatureHit1.Play(); break; case "creatureHit2": creatureHit2.Play(); break; case "creatureStare": creatureStare.Play(); break; case "creatureLeap": creatureLeap.Play(); break; case "creatureDeath": creatureDeath.Play(); break; case "creatureFlee": stopAllSound(); creatureFlee.Play(); break; } } } [ClientRpc] public void setAnimationSpeedClientRpc(float speed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2069716591u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref speed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2069716591u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { animator.speed = speed; } } } [ClientRpc] public void DoAnimationClientRpc(int index) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(571941155u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 571941155u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && Object.op_Implicit((Object)(object)animator)) { animator.SetInteger("state", index); } } } [ClientRpc] public void animPlayClientRpc(string name) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2747754932u, val, (RpcDelivery)0); bool flag = name != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(name, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2747754932u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { animator.Play(name); } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_SoulDevourerAI() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(107833227u, new RpcReceiveHandler(__rpc_handler_107833227)); NetworkManager.__rpc_func_table.Add(12838872u, new RpcReceiveHandler(__rpc_handler_12838872)); NetworkManager.__rpc_func_table.Add(815579584u, new RpcReceiveHandler(__rpc_handler_815579584)); NetworkManager.__rpc_func_table.Add(3542143556u, new RpcReceiveHandler(__rpc_handler_3542143556)); NetworkManager.__rpc_func_table.Add(1919010792u, new RpcReceiveHandler(__rpc_handler_1919010792)); NetworkManager.__rpc_func_table.Add(3820758844u, new RpcReceiveHandler(__rpc_handler_3820758844)); NetworkManager.__rpc_func_table.Add(158514313u, new RpcReceiveHandler(__rpc_handler_158514313)); NetworkManager.__rpc_func_table.Add(2548432240u, new RpcReceiveHandler(__rpc_handler_2548432240)); NetworkManager.__rpc_func_table.Add(2069716591u, new RpcReceiveHandler(__rpc_handler_2069716591)); NetworkManager.__rpc_func_table.Add(571941155u, new RpcReceiveHandler(__rpc_handler_571941155)); NetworkManager.__rpc_func_table.Add(2747754932u, new RpcReceiveHandler(__rpc_handler_2747754932)); } private static void __rpc_handler_107833227(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 size = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref size, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((SoulDevourerAI)(object)target).modifySizeClientRpc(size); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_12838872(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 visibleClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref visibleClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((SoulDevourerAI)(object)target).SetVisibleClientRpc(visibleClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_815579584(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)2; ((SoulDevourerAI)(object)target).deadEventClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3542143556(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((SoulDevourerAI)(object)target).letGoOfPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1919010792(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)2; ((SoulDevourerAI)(object)target).letGoOfPlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3820758844(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); bool lastHit = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref lastHit, default(ForPrimitives)); int staminaGrant = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref staminaGrant); target.__rpc_exec_stage = (__RpcExecStage)1; ((SoulDevourerAI)(object)target).attachPlayerServerRpc(uid, lastHit, staminaGrant); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_158514313(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong uid = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref uid); bool lastHit = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref lastHit, default(ForPrimitives)); int staminaGrant = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref staminaGrant); target.__rpc_exec_stage = (__RpcExecStage)2; ((SoulDevourerAI)(object)target).attachPlayerClientRpc(uid, lastHit, staminaGrant); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2548432240(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string soundName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref soundName, false); } target.__rpc_exec_stage = (__RpcExecStage)2; ((SoulDevourerAI)(object)target).moaiSoundPlayClientRpc(soundName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2069716591(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 animationSpeedClientRpc = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref animationSpeedClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((SoulDevourerAI)(object)target).setAnimationSpeedClientRpc(animationSpeedClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_571941155(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); target.__rpc_exec_stage = (__RpcExecStage)2; ((SoulDevourerAI)(object)target).DoAnimationClientRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2747754932(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string name = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref name, false); } target.__rpc_exec_stage = (__RpcExecStage)2; ((SoulDevourerAI)(object)target).animPlayClientRpc(name); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SoulDevourerAI"; } } } namespace Soul_Devourer_Enemy { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("SoulDev", "Soul Devourer Enemy", "1.0.0")] public class Plugin : BaseUnityPlugin { public static Harmony _harmony; public static ManualLogSource Logger; public static float rawSpawnMultiplier; public static ConfigEntry<float> moaiGlobalSize; public static ConfigEntry<float> moaiGlobalSizeVar; public static ConfigEntry<float> moaiSizeCap; public static ConfigEntry<float> moaiGlobalMusicVol; public static ConfigEntry<float> moaiGlobalSpeed; public static ConfigEntry<float> soulRarity; public static ConfigEntry<string> devourerSpawnDist; public static ConfigEntry<bool> spawnsOutside; public static ConfigEntry<bool> daytimeSpawn; public static ConfigEntry<float> LOSWidth; public static ConfigEntry<bool> pulseFX; public static ConfigEntry<int> maxCount; public static ConfigEntry<int> health; public static ConfigEntry<bool> canEnterIndoors; public static void LogDebug(string text) { Logger.LogInfo((object)text); } public static void LogProduction(string text) { Logger.LogInfo((object)text); } private void Awake() { //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown Logger = ((BaseUnityPlugin)this).Logger; bindVars(); Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } Random.InitState((int)DateTime.Now.Ticks); try { string assetName = "SoulDev"; if (daytimeSpawn.Value) { assetName = "SoulDevDaytime"; } string text = ScaleAllIntegers(devourerSpawnDist.Value, soulRarity.Value); List<EnemyConfig> list = new List<EnemyConfig>(); list.Add(new EnemyConfig { Name = "Soul Devourer", AssetName = assetName, TerminalKeywordAsset = "SoulDevTN", TerminalNodeAsset = "SoulDevTK", Enabled = true, MaxSpawnCount = maxCount.Value, PowerLevel = 3f, SpawnWeights = text }); EnemyInitializer.Initialize("souldevbundle", list); Debug.Log((object)("Soul Devourer Enemy loaded with the following spawn weights: " + text)); } catch (Exception ex) { Debug.LogError((object)("Error initializing the Soul Devourer Enemy, maybe the spawn distribution you entered is malformed? : error -> " + ex.ToString())); } Logger.LogInfo((object)"Plugin SoulDev is loaded!"); } public static string ScaleAllIntegers(string input, float multiplier) { return Regex.Replace(input, "\\d+", delegate(Match match) { int num = int.Parse(match.Value); return ((int)Math.Round((float)num * multiplier)).ToString(); }); } public void bindVars() { //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Expected O, but got Unknown //IL_01f0: Expected O, but got Unknown //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Expected O, but got Unknown //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Expected O, but got Unknown //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Expected O, but got Unknown //IL_0220: Expected O, but got Unknown //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Expected O, but got Unknown //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Expected O, but got Unknown //IL_0250: Expected O, but got Unknown //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Expected O, but got Unknown //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Expected O, but got Unknown //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Expected O, but got Unknown //IL_0280: Expected O, but got Unknown //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Expected O, but got Unknown //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Expected O, but got Unknown //IL_02b0: Expected O, but got Unknown //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Expected O, but got Unknown //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Expected O, but got Unknown //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Expected O, but got Unknown //IL_02e1: Expected O, but got Unknown //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Expected O, but got Unknown //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Expected O, but got Unknown //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Expected O, but got Unknown //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Expected O, but got Unknown //IL_032b: Expected O, but got Unknown //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Expected O, but got Unknown //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Expected O, but got Unknown //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Expected O, but got Unknown //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Expected O, but got Unknown //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Expected O, but got Unknown //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Expected O, but got Unknown //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Expected O, but got Unknown //IL_038a: Expected O, but got Unknown //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Expected O, but got Unknown //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Expected O, but got Unknown //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Expected O, but got Unknown //IL_03b7: Expected O, but got Unknown //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Expected O, but got Unknown //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Expected O, but got Unknown //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Expected O, but got Unknown soulRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Spawning", "Enemy Spawnrate Multiplier", 1f, "Changes the spawnrate of the soul devourer across ALL planets. Decimals are accepted, 2.0 = approximately double the spawnrate. 0.5 is half the spawnrate."); devourerSpawnDist = ((BaseUnityPlugin)this).Config.Bind<string>("Spawning", "Enemy Spawn Weights", "All:33", "The spawn weight of the Soul Devourer (multiplied by enemy spawnrate value) and the moons that the enemy can spawn on, in the form of a comma separated list of selectable level names and a weight value (e.g. \"ExperimentationLevel:300,DineLevel:20,RendLevel:10,Modded:10\")\r\nThe following strings: \"All\", \"Vanilla\", \"Modded\" are also valid."); maxCount = ((BaseUnityPlugin)this).Config.Bind<int>("Spawning", "Enemy Max Count", 3, "The maximum amount of Soul Devourers that can spawn in one day (hard cap)."); moaiGlobalMusicVol = ((BaseUnityPlugin)this).Config.Bind<float>("Modifiers", "Enemy Sound Volume", 0.6f, "Changes the volume of all soul devourer sounds. May make them more sneaky as well."); moaiGlobalSizeVar = ((BaseUnityPlugin)this).Config.Bind<float>("Modifiers", "Size Variant Chance", 0.2f, "The chance of a soul devourer to spawn in a randomly scaled size. Affects their pitch too."); moaiGlobalSize = ((BaseUnityPlugin)this).Config.Bind<float>("Modifiers", "Size Multiplier", 1f, "Changes the size of all soul devourer models. Scales pretty violently. Affects SFX pitch."); moaiSizeCap = ((BaseUnityPlugin)this).Config.Bind<float>("Modifiers", "Size Variant Cap", 100f, "Caps the max size of a soul devourer with the size variant. Normal size is 1. 1.5 is slightly taller than the ship. 2 is very large. 3.5+ is giant tier (with 5 being the largest usually)"); moaiGlobalSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Modifiers", "Enemy Speed Multiplier", 1f, "Changes the speed of all soul devourers. 4x would mean they are 4 times faster, 0.5x would be 2 times slower."); health = ((BaseUnityPlugin)this).Config.Bind<int>("Modifiers", "Enemy Health", 6, "Changes the health of all soul devourers."); daytimeSpawn = ((BaseUnityPlugin)this).Config.Bind<bool>("Spawning", "Can spawn at daytime", false, "Can the enemy spawn in the daytime? Good luck if this is on."); LOSWidth = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced", "Line Of Sight Range", 100f, "Line of sight width for the enemy (by degrees)."); canEnterIndoors = ((BaseUnityPlugin)this).Config.Bind<bool>("Modifiers", "Can enter the factory", true, "If soul devourers can enter the factory at their own whim. Entry is chance based. The closer a devourer is to an entrance the more likely it will decide to enter."); pulseFX = ((BaseUnityPlugin)this).Config.Bind<bool>("Modifiers", "Pulse Effect", true, "If the Soul Devourer should use its screen pulse effect"); ConfigEntry<float> obj = soulRarity; FloatInputFieldOptions val = new FloatInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions<float>)val).Min = 0.01f; ((BaseRangeOptions<float>)val).Max = 100f; FloatInputFieldConfigItem val2 = new FloatInputFieldConfigItem(obj, val); ConfigEntry<float> obj2 = moaiGlobalSize; FloatSliderOptions val3 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val3).Min = 0.05f; ((BaseRangeOptions<float>)val3).Max = 5f; FloatSliderConfigItem val4 = new FloatSliderConfigItem(obj2, val3); ConfigEntry<float> obj3 = moaiGlobalSizeVar; FloatSliderOptions val5 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val5).Min = 0f; ((BaseRangeOptions<float>)val5).Max = 1f; FloatSliderConfigItem val6 = new FloatSliderConfigItem(obj3, val5); ConfigEntry<float> obj4 = moaiSizeCap; FloatInputFieldOptions val7 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val7).Min = 0.01f; ((BaseRangeOptions<float>)val7).Max = 100f; FloatInputFieldConfigItem val8 = new FloatInputFieldConfigItem(obj4, val7); ConfigEntry<float> obj5 = moaiGlobalMusicVol; FloatSliderOptions val9 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val9).Min = 0f; ((BaseRangeOptions<float>)val9).Max = 1f; FloatSliderConfigItem val10 = new FloatSliderConfigItem(obj5, val9); ConfigEntry<float> obj6 = moaiGlobalSpeed; FloatSliderOptions val11 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val11).Min = 0f; ((BaseRangeOptions<float>)val11).Max = 5f; FloatSliderConfigItem val12 = new FloatSliderConfigItem(obj6, val11); BoolCheckBoxConfigItem val13 = new BoolCheckBoxConfigItem(daytimeSpawn, new BoolCheckBoxOptions { RequiresRestart = true }); ConfigEntry<float> lOSWidth = LOSWidth; FloatSliderOptions val14 = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val14).Min = 0f; ((BaseRangeOptions<float>)val14).Max = 360f; FloatSliderConfigItem val15 = new FloatSliderConfigItem(lOSWidth, val14); BoolCheckBoxConfigItem val16 = new BoolCheckBoxConfigItem(pulseFX, new BoolCheckBoxOptions { RequiresRestart = false }); TextInputFieldConfigItem val17 = new TextInputFieldConfigItem(devourerSpawnDist, new TextInputFieldOptions { RequiresRestart = true }); ConfigEntry<int> obj7 = maxCount; IntInputFieldOptions val18 = new IntInputFieldOptions { RequiresRestart = true }; ((BaseRangeOptions<int>)val18).Min = 0; ((BaseRangeOptions<int>)val18).Max = 99999; IntInputFieldConfigItem val19 = new IntInputFieldConfigItem(obj7, val18); ConfigEntry<int> obj8 = health; IntInputFieldOptions val20 = new IntInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions<int>)val20).Min = 1; ((BaseRangeOptions<int>)val20).Max = 99999; IntInputFieldConfigItem val21 = new IntInputFieldConfigItem(obj8, val20); BoolCheckBoxConfigItem val22 = new BoolCheckBoxConfigItem(canEnterIndoors, new BoolCheckBoxOptions { RequiresRestart = false }); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val2); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val17); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val10); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val4); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val6); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val12); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val8); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val13); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val15); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val19); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val21); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val16); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val22); } } public static class PluginInfo { public const string PLUGIN_GUID = "SoulDev"; public const string PLUGIN_NAME = "Soul Devourer Enemy"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace MoaiEnemy { internal class ConfigModel { public static ConfigEntry<float> moaiGlobalSize; public static ConfigEntry<float> moaiGlobalMusicVol; public static ConfigEntry<float> moaiGlobalRarity; public static ConfigEntry<float> moaiGlobalSpeed; public static void setupConfig() { //IL_0006: Unknown result type (might be due to invalid IL or missing r