Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Moai Enemy v2.6.5
MoaiEnemy.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; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Threading.Tasks; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalConfig; using LethalConfig.ConfigItems; using LethalConfig.ConfigItems.Options; using LethalLib.Modules; using Microsoft.CodeAnalysis; using MoaiEnemy.NetcodePatcher; using MoaiEnemy.src.MoaiGold; using MoaiEnemy.src.MoaiGreen; using MoaiEnemy.src.MoaiNormal; using MoaiEnemy.src.Utilities; using On; 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("Moai Enemy for Lethal Company.")] [assembly: AssemblyFileVersion("1.6.6")] [assembly: AssemblyInformationalVersion("2.2.5+6252840b4918de21e7e9ee3df4d3b7f76bcd6e62")] [assembly: AssemblyProduct("MoaiEnemy")] [assembly: AssemblyTitle("MoaiEnemy")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.6.6.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace 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 references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0028: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0050: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0078: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00a0: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown ConfigEntry<float> obj = moaiGlobalSize; FloatSliderOptions val = new FloatSliderOptions(); ((BaseRangeOptions<float>)val).Min = 0.05f; ((BaseRangeOptions<float>)val).Max = 5f; FloatSliderConfigItem val2 = new FloatSliderConfigItem(obj, val); ConfigEntry<float> obj2 = moaiGlobalMusicVol; FloatSliderOptions val3 = new FloatSliderOptions(); ((BaseRangeOptions<float>)val3).Min = 0f; ((BaseRangeOptions<float>)val3).Max = 2f; FloatSliderConfigItem val4 = new FloatSliderConfigItem(obj2, val3); ConfigEntry<float> obj3 = moaiGlobalRarity; FloatSliderOptions val5 = new FloatSliderOptions(); ((BaseRangeOptions<float>)val5).Min = 0f; ((BaseRangeOptions<float>)val5).Max = 10f; FloatSliderConfigItem val6 = new FloatSliderConfigItem(obj3, val5); ConfigEntry<float> obj4 = moaiGlobalSpeed; FloatSliderOptions val7 = new FloatSliderOptions(); ((BaseRangeOptions<float>)val7).Min = 0f; ((BaseRangeOptions<float>)val7).Max = 5f; FloatSliderConfigItem val8 = new FloatSliderConfigItem(obj4, val7); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("MoaiEnemy", "MoaiEnemy", "2.2.5")] public class Plugin : BaseUnityPlugin { public static class Assets { public static AssetBundle MainAssetBundle; public static void PopulateAssets() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); MainAssetBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "moaibundle")); if ((Object)(object)MainAssetBundle == (Object)null) { Logger.LogError((object)"Failed to load custom assets."); } } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_LoadNewLevel <>9__34_0; internal void <Awake>b__34_0(orig_LoadNewLevel orig, RoundManager self, int randomSeed, SelectableLevel newLevel) { if (newLevel.PlanetName.Contains("Easter")) { rawSpawnMultiplier = RawspawnHandler.getSpawnMultiplier(pickMax: true); } else { rawSpawnMultiplier = RawspawnHandler.getSpawnMultiplier(); } RawspawnHandler.enemyRarityPkg enemyRarityPkg = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg.name = ((Object)MoaiEnemy).name; enemyRarityPkg.rarity = (int)(58f * baseRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg2 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg2.name = ((Object)MoaiGreen).name; enemyRarityPkg2.rarity = (int)(30f * greenRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg3 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg3.name = ((Object)MoaiPurple).name; enemyRarityPkg3.rarity = (int)(35f * purpleRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg4 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg4.name = ((Object)MoaiBlue).name; enemyRarityPkg4.rarity = (int)(20f * blueRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg5 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg5.name = ((Object)MoaiRed).name; enemyRarityPkg5.rarity = (int)(40f * redRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg6 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg6.name = ((Object)MoaiOrange).name; enemyRarityPkg6.rarity = (int)(22f * orangeRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg7 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg7.name = ((Object)MoaiGold).name; enemyRarityPkg7.rarity = (int)(4f * goldRarity.Value * rawSpawnMultiplier); RawspawnHandler.setLevelSpawnWeights(new RawspawnHandler.enemyRarityPkg[7] { enemyRarityPkg, enemyRarityPkg7, enemyRarityPkg4, enemyRarityPkg5, enemyRarityPkg2, enemyRarityPkg3, enemyRarityPkg6 }, Array.Empty<RawspawnHandler.enemyRarityPkg>()); orig.Invoke(self, randomSeed, newLevel); try { GreenEnemyAI.getMapObjects(); GreenEnemyAI.findTraps(); EntityWarp.mapEntrances = Object.FindObjectsOfType<EntranceTeleport>(false); } catch (Exception ex) { Debug.LogWarning((object)("Moai Enemy: Error during map initialization process. " + ex.ToString())); } } } public static Harmony _harmony; public static EnemyType ExampleEnemy; public static ManualLogSource Logger; public static MoaiNormalNet networkHandler = new MoaiNormalNet(); public static EnemyType MoaiEnemy; public static TerminalNode tlTerminalNode; public static TerminalKeyword tlTerminalKeyword; public static EnemyType MoaiBlue; public static TerminalNode MoaiBlueTerminalNode; public static TerminalKeyword MoaiBlueTerminalKeyword; public static EnemyType MoaiRed; public static TerminalNode MoaiRedTerminalNode; public static TerminalKeyword MoaiRedTerminalKeyword; public static EnemyType MoaiGreen; public static TerminalNode MoaiGreenTerminalNode; public static TerminalKeyword MoaiGreenTerminalKeyword; public static GameObject plasmaProjectile; public static GameObject consumptionCircle; public static EnemyType MoaiGold; public static TerminalNode MoaiGoldTerminalNode; public static TerminalKeyword MoaiGoldTerminalKeyword; public static EnemyType MoaiPurple; public static TerminalNode MoaiPurpleTerminalNode; public static TerminalKeyword MoaiPurpleTerminalKeyword; public static GameObject PlasmaPad; public static EnemyType MoaiOrange; public static TerminalNode MoaiOrangeTerminalNode; public static TerminalKeyword MoaiOrangeTerminalKeyword; public static EnemyType SoulDevourer; public static TerminalNode SoulDevourerTerminalNode; public static TerminalKeyword SoulDevourerTerminalKeyword; public static float rawSpawnMultiplier = 0f; public static ConfigEntry<float> moaiGlobalSize; public static ConfigEntry<float> moaiGlobalSizeVar; public static ConfigEntry<float> moaiAngelChance; public static ConfigEntry<float> moaiSizeCap; public static ConfigEntry<float> moaiGlobalMusicVol; public static ConfigEntry<float> moaiGlobalSpeed; public static ConfigEntry<bool> moaiConsumeScrap; public static ConfigEntry<string> moaiSpawnDistribution; public static ConfigEntry<float> baseRarity; public static ConfigEntry<float> blueRarity; public static ConfigEntry<float> redRarity; public static ConfigEntry<float> greenRarity; public static ConfigEntry<float> purpleRarity; public static ConfigEntry<float> goldRarity; public static ConfigEntry<float> orangeRarity; public static ConfigEntry<float> soulRarity; public static ConfigEntry<float> simpleSpawnMultiplier; public static ConfigEntry<string> moaiTargetBlacklist; public static void LogDebug(string text) { Logger.LogInfo((object)text); } public static void LogProduction(string text) { Logger.LogInfo((object)text); } private void Awake() { //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Expected O, but got Unknown Logger = ((BaseUnityPlugin)this).Logger; Assets.PopulateAssets(); 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); } } } MoaiEnemy = Assets.MainAssetBundle.LoadAsset<EnemyType>("MoaiEnemy"); tlTerminalNode = Assets.MainAssetBundle.LoadAsset<TerminalNode>("MoaiEnemyTN"); tlTerminalKeyword = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("MoaiEnemyTK"); MoaiBlue = Assets.MainAssetBundle.LoadAsset<EnemyType>("MoaiBlue"); MoaiBlueTerminalNode = Assets.MainAssetBundle.LoadAsset<TerminalNode>("MoaiBlueTN"); MoaiBlueTerminalKeyword = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("MoaiBlueTK"); MoaiRed = Assets.MainAssetBundle.LoadAsset<EnemyType>("MoaiRed"); MoaiRedTerminalNode = Assets.MainAssetBundle.LoadAsset<TerminalNode>("MoaiRedTN"); MoaiRedTerminalKeyword = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("MoaiRedTK"); MoaiGreen = Assets.MainAssetBundle.LoadAsset<EnemyType>("MoaiGreen"); MoaiGreenTerminalNode = Assets.MainAssetBundle.LoadAsset<TerminalNode>("MoaiGreenTN"); MoaiGreenTerminalKeyword = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("MoaiGreenTK"); MoaiPurple = Assets.MainAssetBundle.LoadAsset<EnemyType>("MoaiPurple"); MoaiPurpleTerminalNode = Assets.MainAssetBundle.LoadAsset<TerminalNode>("MoaiGoldTN"); MoaiPurpleTerminalKeyword = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("MoaiGoldTK"); PlasmaPad = Assets.MainAssetBundle.LoadAsset<GameObject>("PlasmaPadPrefab"); MoaiGold = Assets.MainAssetBundle.LoadAsset<EnemyType>("MoaiGold"); MoaiGoldTerminalNode = Assets.MainAssetBundle.LoadAsset<TerminalNode>("MoaiGoldTN"); MoaiGoldTerminalKeyword = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("MoaiGoldTK"); MoaiOrange = Assets.MainAssetBundle.LoadAsset<EnemyType>("MoaiOrange"); MoaiOrangeTerminalNode = Assets.MainAssetBundle.LoadAsset<TerminalNode>("MoaiOrangeTN"); MoaiOrangeTerminalKeyword = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("MoaiOrangeTK"); SoulDevourer = Assets.MainAssetBundle.LoadAsset<EnemyType>("SoulDev"); SoulDevourerTerminalNode = Assets.MainAssetBundle.LoadAsset<TerminalNode>("SoulDevTN"); SoulDevourerTerminalKeyword = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("SoulDevTK"); plasmaProjectile = Assets.MainAssetBundle.LoadAsset<GameObject>("PlasmaBall01"); consumptionCircle = Assets.MainAssetBundle.LoadAsset<GameObject>("ConsumptionCircle"); Debug.Log((object)("MOAI ENEMY BUNDLE: " + ((object)Assets.MainAssetBundle).ToString())); Debug.Log((object)("Orange E: " + (object)MoaiOrange)); Debug.Log((object)("SD TN: " + (object)MoaiOrangeTerminalNode)); Debug.Log((object)("SD TK: " + (object)MoaiOrangeTerminalKeyword)); Random.InitState((int)DateTime.Now.Ticks); NetworkPrefabs.RegisterNetworkPrefab(MoaiEnemy.enemyPrefab); NetworkPrefabs.RegisterNetworkPrefab(MoaiBlue.enemyPrefab); NetworkPrefabs.RegisterNetworkPrefab(MoaiRed.enemyPrefab); NetworkPrefabs.RegisterNetworkPrefab(MoaiGreen.enemyPrefab); NetworkPrefabs.RegisterNetworkPrefab(MoaiGold.enemyPrefab); NetworkPrefabs.RegisterNetworkPrefab(MoaiPurple.enemyPrefab); NetworkPrefabs.RegisterNetworkPrefab(MoaiOrange.enemyPrefab); NetworkPrefabs.RegisterNetworkPrefab(SoulDevourer.enemyPrefab); NetworkPrefabs.RegisterNetworkPrefab(plasmaProjectile); NetworkPrefabs.RegisterNetworkPrefab(consumptionCircle); NetworkPrefabs.RegisterNetworkPrefab(PlasmaPad); rawSpawnMultiplier = RawspawnHandler.getSpawnMultiplier(); Enemies.RegisterEnemy(MoaiEnemy, 0, (LevelTypes)(-1), (SpawnType)1, tlTerminalNode, tlTerminalKeyword); Enemies.RegisterEnemy(MoaiBlue, 0, (LevelTypes)(-1), (SpawnType)1, MoaiBlueTerminalNode, MoaiBlueTerminalKeyword); Enemies.RegisterEnemy(MoaiRed, 0, (LevelTypes)(-1), (SpawnType)1, MoaiRedTerminalNode, MoaiRedTerminalKeyword); Enemies.RegisterEnemy(MoaiGreen, 0, (LevelTypes)(-1), (SpawnType)1, MoaiGreenTerminalNode, MoaiGreenTerminalKeyword); Enemies.RegisterEnemy(MoaiGold, 0, (LevelTypes)(-1), (SpawnType)1, MoaiGreenTerminalNode, MoaiGreenTerminalKeyword); Enemies.RegisterEnemy(MoaiPurple, 0, (LevelTypes)(-1), (SpawnType)1, MoaiGreenTerminalNode, MoaiGreenTerminalKeyword); Enemies.RegisterEnemy(MoaiOrange, 0, (LevelTypes)(-1), (SpawnType)1, MoaiOrangeTerminalNode, MoaiOrangeTerminalKeyword); Enemies.RegisterEnemy(SoulDevourer, 0, (LevelTypes)(-1), (SpawnType)2, MoaiGreenTerminalNode, MoaiGreenTerminalKeyword); Debug.Log((object)"MOAI: Registering Moai Net Messages"); object obj = <>c.<>9__34_0; if (obj == null) { hook_LoadNewLevel val = delegate(orig_LoadNewLevel orig, RoundManager self, int randomSeed, SelectableLevel newLevel) { if (newLevel.PlanetName.Contains("Easter")) { rawSpawnMultiplier = RawspawnHandler.getSpawnMultiplier(pickMax: true); } else { rawSpawnMultiplier = RawspawnHandler.getSpawnMultiplier(); } RawspawnHandler.enemyRarityPkg enemyRarityPkg = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg.name = ((Object)MoaiEnemy).name; enemyRarityPkg.rarity = (int)(58f * baseRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg2 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg2.name = ((Object)MoaiGreen).name; enemyRarityPkg2.rarity = (int)(30f * greenRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg3 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg3.name = ((Object)MoaiPurple).name; enemyRarityPkg3.rarity = (int)(35f * purpleRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg4 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg4.name = ((Object)MoaiBlue).name; enemyRarityPkg4.rarity = (int)(20f * blueRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg5 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg5.name = ((Object)MoaiRed).name; enemyRarityPkg5.rarity = (int)(40f * redRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg6 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg6.name = ((Object)MoaiOrange).name; enemyRarityPkg6.rarity = (int)(22f * orangeRarity.Value * rawSpawnMultiplier); RawspawnHandler.enemyRarityPkg enemyRarityPkg7 = default(RawspawnHandler.enemyRarityPkg); enemyRarityPkg7.name = ((Object)MoaiGold).name; enemyRarityPkg7.rarity = (int)(4f * goldRarity.Value * rawSpawnMultiplier); RawspawnHandler.setLevelSpawnWeights(new RawspawnHandler.enemyRarityPkg[7] { enemyRarityPkg, enemyRarityPkg7, enemyRarityPkg4, enemyRarityPkg5, enemyRarityPkg2, enemyRarityPkg3, enemyRarityPkg6 }, Array.Empty<RawspawnHandler.enemyRarityPkg>()); orig.Invoke(self, randomSeed, newLevel); try { GreenEnemyAI.getMapObjects(); GreenEnemyAI.findTraps(); EntityWarp.mapEntrances = Object.FindObjectsOfType<EntranceTeleport>(false); } catch (Exception ex) { Debug.LogWarning((object)("Moai Enemy: Error during map initialization process. " + ex.ToString())); } }; <>c.<>9__34_0 = val; obj = (object)val; } RoundManager.LoadNewLevel += (hook_LoadNewLevel)obj; Logger.LogInfo((object)"Plugin MoaiEnemy is loaded!"); } public void bindVars() { //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Expected O, but got Unknown //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Expected O, but got Unknown //IL_02b4: Expected O, but got Unknown //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Expected O, but got Unknown //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Expected O, but got Unknown //IL_02e4: Expected O, but got Unknown //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Expected O, but got Unknown //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Expected O, but got Unknown //IL_0314: Expected O, but got Unknown //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Expected O, but got Unknown //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Expected O, but got Unknown //IL_0344: Expected O, but got Unknown //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Expected O, but got Unknown //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Expected O, but got Unknown //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Expected O, but got Unknown //IL_0374: Expected O, but got Unknown //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Expected O, but got Unknown //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Expected O, but got Unknown //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Expected O, but got Unknown //IL_03a5: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Expected O, but got Unknown //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Expected O, but got Unknown //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Expected O, but got Unknown //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Expected O, but got Unknown //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Expected O, but got Unknown //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Expected O, but got Unknown //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Expected O, but got Unknown //IL_0408: Expected O, but got Unknown //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Expected O, but got Unknown //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Expected O, but got Unknown //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Expected O, but got Unknown //IL_0439: Expected O, but got Unknown //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Expected O, but got Unknown //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Expected O, but got Unknown //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Expected O, but got Unknown //IL_046a: Expected O, but got Unknown //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Expected O, but got Unknown //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Expected O, but got Unknown //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Expected O, but got Unknown //IL_049b: Expected O, but got Unknown //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Expected O, but got Unknown //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Expected O, but got Unknown //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Expected O, but got Unknown //IL_04cc: Expected O, but got Unknown //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Expected O, but got Unknown //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Expected O, but got Unknown //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Expected O, but got Unknown //IL_04fd: Expected O, but got Unknown //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Expected O, but got Unknown //IL_0504: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Expected O, but got Unknown //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Expected O, but got Unknown //IL_052e: Expected O, but got Unknown //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Expected O, but got Unknown //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Expected O, but got Unknown //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Expected O, but got Unknown //IL_055f: Expected O, but got Unknown //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Expected O, but got Unknown //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_057e: Expected O, but got Unknown //IL_057f: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Expected O, but got Unknown //IL_0590: Expected O, but got Unknown //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Expected O, but got Unknown //IL_0597: Unknown result type (might be due to invalid IL or missing references) //IL_059c: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Expected O, but got Unknown //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Expected O, but got Unknown simpleSpawnMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("Global", "Simple Spawn Multiplier", 1f, "(Recommended) Simplest way to affect spawnrates for all moais. Multiplier to spawnrate and chance for moais to be spawnable on a day"); moaiGlobalMusicVol = ((BaseUnityPlugin)this).Config.Bind<float>("Global", "Enemy Sound Volume", 0.6f, "Changes the volume of all moai sounds. May make moai more sneaky as well."); moaiGlobalSizeVar = ((BaseUnityPlugin)this).Config.Bind<float>("Global", "Size Variant Chance", 0.2f, "The chance of a moai to spawn in a randomly scaled size. Affects their pitch too."); moaiAngelChance = ((BaseUnityPlugin)this).Config.Bind<float>("Global", "Angel Spawn Chance", 0.1f, "Chance for the moai to spawn as an angel (good guy). They guard players and kill enemies, but they certainly aren't friendly forever."); moaiGlobalSize = ((BaseUnityPlugin)this).Config.Bind<float>("Global", "Size Multiplier", 1f, "Changes the size of all moai models. Scales pretty violently. Affects SFX pitch."); moaiSizeCap = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced", "Size Variant Cap", 100f, "Caps the max size of a moai 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>("Global", "Enemy Speed Multiplier", 1f, "Changes the speed of all moai. 4x would mean they are 4 times faster, 0.5x would be 2 times slower."); moaiConsumeScrap = ((BaseUnityPlugin)this).Config.Bind<bool>("Global", "Allow Scrap Eating Behavior", true, "If enabled, moai can seek out scrap and consume it. Moai that consume scrap become angel variants for a time. Does not apply to dead bodies."); moaiSpawnDistribution = ((BaseUnityPlugin)this).Config.Bind<string>("Advanced", "Enemy Spawn Distribution", "8%150%, 12%75%, 25%50%", "For fine tuning spawn multipliers day to day. Value is a comma separated list. Each value follows the format C%M%, with C being the chance for the spawnrate multiplier to activate on a day (0-100%) and M being the multiplier (0-inf%). If a multiplier isn't activated, the spawnrate will be 0%.\n\n I recommend not using SimpleSpawnMultiplier if you are editing this"); baseRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Variants", "Basic Moai Spawnrate", 1f, "Changes the spawnrate of the variant."); blueRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Variants", "Blue Moai Spawnrate", 1f, "Changes the spawnrate of the variant."); redRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Variants", "Red Moai Spawnrate", 1f, "Changes the spawnrate of the variant."); greenRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Variants", "Green Moai Spawnrate", 1f, "Changes the spawnrate of the variant."); purpleRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Variants", "Purple Moai Spawnrate", 1f, "Changes the spawnrate of the variant."); goldRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Variants", "Gold Moai Spawnrate", 1f, "Changes the spawnrate of the variant."); orangeRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Variants", "Orange Moai Spawnrate", 1f, "Changes the spawnrate of the variant."); soulRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Variants", "Devourer Spawnrate", 0.4f, "Changes the spawnrate of this... thing. Note that devourers don't spawn naturally, they have a chance to spawn when any moai consumes a corpse."); moaiTargetBlacklist = ((BaseUnityPlugin)this).Config.Bind<string>("Advanced", "Enemy targeting blacklist", "mask hornets, roaming locusts, jester, hygrodere, butler, barber, ghost girl, circuit bees, giant sapsucker, old bird, living trap, pikmin, cutiefly", "A blacklist for enemies that angel moai will not target or damage. Put in the name of the enemy you see when you scan them in game. Not case sensitive. Comma separated list."); ConfigEntry<float> obj = moaiAngelChance; FloatSliderOptions val = new FloatSliderOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val).Min = 0f; ((BaseRangeOptions<float>)val).Max = 1f; FloatSliderConfigItem val2 = new FloatSliderConfigItem(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(moaiConsumeScrap, new BoolCheckBoxOptions { RequiresRestart = false }); TextInputFieldConfigItem val14 = new TextInputFieldConfigItem(moaiSpawnDistribution, new TextInputFieldOptions { RequiresRestart = false }); ConfigEntry<float> obj7 = baseRarity; FloatInputFieldOptions val15 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val15).Min = 0f; ((BaseRangeOptions<float>)val15).Max = 10000f; FloatInputFieldConfigItem val16 = new FloatInputFieldConfigItem(obj7, val15); ConfigEntry<float> obj8 = greenRarity; FloatInputFieldOptions val17 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val17).Min = 0f; ((BaseRangeOptions<float>)val17).Max = 10000f; FloatInputFieldConfigItem val18 = new FloatInputFieldConfigItem(obj8, val17); ConfigEntry<float> obj9 = purpleRarity; FloatInputFieldOptions val19 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val19).Min = 0f; ((BaseRangeOptions<float>)val19).Max = 10000f; FloatInputFieldConfigItem val20 = new FloatInputFieldConfigItem(obj9, val19); ConfigEntry<float> obj10 = redRarity; FloatInputFieldOptions val21 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val21).Min = 0f; ((BaseRangeOptions<float>)val21).Max = 10000f; FloatInputFieldConfigItem val22 = new FloatInputFieldConfigItem(obj10, val21); ConfigEntry<float> obj11 = blueRarity; FloatInputFieldOptions val23 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val23).Min = 0f; ((BaseRangeOptions<float>)val23).Max = 10000f; FloatInputFieldConfigItem val24 = new FloatInputFieldConfigItem(obj11, val23); ConfigEntry<float> obj12 = goldRarity; FloatInputFieldOptions val25 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val25).Min = 0f; ((BaseRangeOptions<float>)val25).Max = 10000f; FloatInputFieldConfigItem val26 = new FloatInputFieldConfigItem(obj12, val25); ConfigEntry<float> obj13 = orangeRarity; FloatInputFieldOptions val27 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val27).Min = 0f; ((BaseRangeOptions<float>)val27).Max = 10000f; FloatInputFieldConfigItem val28 = new FloatInputFieldConfigItem(obj13, val27); ConfigEntry<float> obj14 = goldRarity; FloatInputFieldOptions val29 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val29).Min = 0f; ((BaseRangeOptions<float>)val29).Max = 10000f; FloatInputFieldConfigItem val30 = new FloatInputFieldConfigItem(obj14, val29); ConfigEntry<float> obj15 = simpleSpawnMultiplier; FloatInputFieldOptions val31 = new FloatInputFieldOptions { RequiresRestart = false }; ((BaseRangeOptions<float>)val31).Min = 0f; ((BaseRangeOptions<float>)val31).Max = 10000f; FloatInputFieldConfigItem val32 = new FloatInputFieldConfigItem(obj15, val31); TextInputFieldConfigItem val33 = new TextInputFieldConfigItem(moaiTargetBlacklist, new TextInputFieldOptions { RequiresRestart = false }); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val32); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val10); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val4); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val2); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val6); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val12); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val13); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val16); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val24); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val22); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val14); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val18); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val20); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val26); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val28); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val30); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val8); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val33); } } public static class PluginInfo { public const string PLUGIN_GUID = "MoaiEnemy"; public const string PLUGIN_NAME = "MoaiEnemy"; public const string PLUGIN_VERSION = "2.2.5"; } } namespace MoaiEnemy.src.Utilities { internal class EntityWarp { public struct entrancePack { public EntranceTeleport tele; public Vector3 navPosition; } public static EntranceTeleport[] mapEntrances; public static entrancePack findNearestEntrance(EnemyAI __instance) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) float num = 100000000f; EntranceTeleport val = null; EntranceTeleport[] array = mapEntrances; for (int i = 0; i < array.Length; i++) { if (__instance.isOutside == array[i].isEntranceToBuilding && Vector3.Distance(((Component)__instance).transform.position, ((Component)array[i]).transform.position) < num) { num = Vector3.Distance(((Component)__instance).transform.position, ((Component)array[i]).transform.position); val = array[i]; } } entrancePack result = default(entrancePack); NavMeshHit val2 = default(NavMeshHit); if ((Object)(object)val != (Object)null && NavMesh.SamplePosition(((Component)val).transform.position, ref val2, 10f, -1)) { result.navPosition = ((NavMeshHit)(ref val2)).position; } result.tele = val; return result; } public static void SendEnemyInside(EnemyAI __instance) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) __instance.isOutside = false; __instance.allAINodes = GameObject.FindGameObjectsWithTag("AINode"); EntranceTeleport tele = findNearestEntrance(__instance).tele; if (!Object.op_Implicit((Object)(object)tele)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find entrance teleport."); } Transform entrancePoint = tele.entrancePoint; if (!Object.op_Implicit((Object)(object)entrancePoint)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find best exit position."); } NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(((Component)entrancePoint).transform.position, ref val, 10f, -1)) { __instance.serverPosition = ((NavMeshHit)(ref val)).position; ((Component)__instance).transform.position = ((NavMeshHit)(ref val)).position; __instance.agent.Warp(__instance.serverPosition); __instance.SyncPositionToClients(); } else { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find exit NavmeshHit position"); } } public static void SendEnemyOutside(EnemyAI __instance, bool SpawnOnDoor = true) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) __instance.isOutside = true; __instance.allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode"); EntranceTeleport tele = findNearestEntrance(__instance).tele; if (!Object.op_Implicit((Object)(object)tele)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find entrance teleport."); } Transform entrancePoint = tele.entrancePoint; if (!Object.op_Implicit((Object)(object)entrancePoint)) { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find best exit position."); } NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(((Component)entrancePoint).transform.position, ref val, 10f, -1)) { __instance.serverPosition = ((NavMeshHit)(ref val)).position; ((Component)__instance).transform.position = ((NavMeshHit)(ref val)).position; __instance.agent.Warp(__instance.serverPosition); __instance.SyncPositionToClients(); } else { Debug.LogError((object)"MOAI EntranceTeleport: Failed to find exit NavmeshHit position"); } } } public class RawspawnHandler { public struct enemyRarityPkg { public string name; public int rarity; } public static void setLevelSpawnWeights(enemyRarityPkg[] dayReferences, enemyRarityPkg[] nightReferences) { RoundManager instance = RoundManager.Instance; SelectableLevel currentLevel = instance.currentLevel; for (int i = 0; i < currentLevel.DaytimeEnemies.Count; i++) { SpawnableEnemyWithRarity val = currentLevel.DaytimeEnemies[i]; for (int j = 0; j < dayReferences.Length; j++) { enemyRarityPkg enemyRarityPkg = dayReferences[j]; if (((Object)val.enemyType).name.Equals(enemyRarityPkg.name)) { currentLevel.DaytimeEnemies[i].rarity = enemyRarityPkg.rarity; } } } for (int k = 0; k < currentLevel.OutsideEnemies.Count; k++) { SpawnableEnemyWithRarity val2 = currentLevel.OutsideEnemies[k]; for (int l = 0; l < nightReferences.Length; l++) { enemyRarityPkg enemyRarityPkg2 = nightReferences[l]; if (((Object)val2.enemyType).name.Equals(enemyRarityPkg2.name)) { currentLevel.OutsideEnemies[k].rarity = enemyRarityPkg2.rarity; } } } } public static float getSpawnMultiplier(bool pickMax = false) { float num = 0f; float num2 = Random.Range(0f, 1f); List<float> list = new List<float>(); List<float> list2 = new List<float>(); string value = Plugin.moaiSpawnDistribution.Value; string[] array = value.Split(","); try { string[] array2 = array; foreach (string text in array2) { string[] array3 = text.Split("%"); list.Add(Math.Min(100f, float.Parse(array3[0]) * Plugin.simpleSpawnMultiplier.Value) / 100f); list2.Add(float.Parse(array3[1]) * Plugin.simpleSpawnMultiplier.Value / 100f); } if (pickMax) { float num3 = 0f; for (int j = 0; j < list2.Count; j++) { float num4 = list2[j]; if (num4 > num3) { num3 = num4; num = num4; } } } else { float num5 = 0f; for (int k = 0; k < list.Count; k++) { float num6 = list[k]; float num7 = list2[k]; if (num2 > num5 && num2 < num6 + num5) { num = num7; break; } num5 += num6; } } } catch (Exception ex) { Debug.LogError((object)("Moai Enemy: Exception when parsing spawn distribution chances! Error is: " + ex.ToString())); } Debug.Log((object)"Moai Enemy: Spawn Distribution Parsed is -->"); if (pickMax) { Debug.Log((object)"Moai Enemy: Picked largest spawn multiplier due to being in easter island."); Debug.Log((object)"Moai Enemy: Multipliers:"); Debug.Log((object)string.Join(",", list2)); Debug.Log((object)("Moai Enemy: Selected multiplier for the day is " + num * 100f + "%")); } else { Debug.Log((object)"Moai Enemy: Chances:"); Debug.Log((object)string.Join(",", list)); Debug.Log((object)"Moai Enemy: Multipliers:"); Debug.Log((object)string.Join(",", list2)); Debug.Log((object)"Moai Enemy: Random chance roll:"); Debug.Log((object)num2); Debug.Log((object)("Moai Enemy: Selected multiplier for the day is " + num * 100f + "%")); } return num; } } } namespace MoaiEnemy.src.MoaiOrange { internal class OrangeEnemyAI : MOAIAICORE { private new enum State { SearchingForPlayer, Guard, StickingInFrontOfEnemy, StickingInFrontOfPlayer, HeadSwingAttackInProgress, HeadingToEntrance, Kidnapping, GroundHopping } private float surfaceTime = 13.8f; private float undergroundTime = 16.8f; private float cycleTimer = 0f; private bool isUnderground = false; private int diggingState = 0; private float digStateTimer = 0f; public AudioSource customMoaiDrillSound; public AudioSource customMoaiDigSound; private bool hasPlayedDigAnim = false; private bool hasPlayedUndergroundAnim = false; private float leapAnimationLength = 1f; private float leapPeakHeight = 3f; private float timeBetweenLeaps = 1.1f; public AudioSource leapPrepareSound; public AudioSource[] leapHitSounds; private bool isInLeapSequence = false; private bool doneWithLeaps = false; private float hopMinRange = 12f; private float hopMaxRange = 18f; public AudioSource explosionImpactSound; private float beeSpawnChance = 0.25f; private float impactRange = 5.7f; private int impactDamage = 35; private float impactForce = 4f; public ParticleSystem undergroundParticleSystem; public ParticleSystem emergeParticleSystem; public ParticleSystem explosionParticles; private List<RedLocustBees> spawnedBees; private PlayerControllerB yoinkedPlayer; public Transform playerGrabPoint; private bool sneakingUpOnPlayer = false; private float letGoTimer = 0f; private PlayerControllerB targetToYoink; private List<Collider> disabledColliders = new List<Collider>(); private float kidnapImpatienceTimer = 12f; private float kidnapImpatienceDuration = 12f; private float grabRange = 2f; public override void Start() { baseInit(); spawnedBees = new List<RedLocustBees>(); AudioSource obj = leapPrepareSound; obj.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; for (int i = 0; i < leapHitSounds.Length; i++) { AudioSource obj2 = leapHitSounds[i]; obj2.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; } AudioSource obj3 = explosionImpactSound; obj3.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource obj4 = customMoaiDrillSound; obj4.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; AudioSource obj5 = customMoaiDigSound; obj5.volume *= Plugin.moaiGlobalMusicVol.Value / 0.6f; } public override void setPitches(float pitchAlter) { AudioSource obj = leapPrepareSound; obj.pitch /= pitchAlter; for (int i = 0; i < leapHitSounds.Length; i++) { AudioSource obj2 = leapHitSounds[i]; obj2.pitch /= pitchAlter; } AudioSource obj3 = explosionImpactSound; obj3.pitch /= pitchAlter; AudioSource obj4 = customMoaiDrillSound; obj4.pitch /= pitchAlter; AudioSource obj5 = customMoaiDigSound; obj5.pitch /= pitchAlter; } public override void OnDestroy() { for (int i = 0; i < spawnedBees.Count; i++) { RedLocustBees val = spawnedBees[i]; destroyBeesClientRpc(((NetworkBehaviour)val).NetworkObject.NetworkObjectId); } spawnedBees.Clear(); if (((NetworkBehaviour)RoundManager.Instance).IsHost && Object.op_Implicit((Object)(object)yoinkedPlayer)) { letGoOfPlayerClientRpc(((NetworkBehaviour)yoinkedPlayer).NetworkObject.NetworkObjectId); } base.OnDestroy(); } [ClientRpc] public void destroyBeesClientRpc(ulong netid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2210511200u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2210511200u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RedLocustBees[] array = Object.FindObjectsOfType<RedLocustBees>(); RedLocustBees[] array2 = array; foreach (RedLocustBees val3 in array2) { if (Object.op_Implicit((Object)(object)val3) && ((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { if (Object.op_Implicit((Object)(object)val3.hive)) { Object.Destroy((Object)(object)((Component)val3.hive).gameObject); } Object.Destroy((Object)(object)((Component)val3).gameObject); } } } [ClientRpc] public void moveHiveClientRpc(ulong netid) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1297456321u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, netid); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1297456321u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RedLocustBees[] array = Object.FindObjectsOfType<RedLocustBees>(); RedLocustBees[] array2 = array; foreach (RedLocustBees val3 in array2) { if (Object.op_Implicit((Object)(object)val3) && ((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid) { GrabbableObject hive = val3.hive; hive.targetFloorPosition = new Vector3(-333f, -333f, -333f); hive.fallTime = 0f; ((EnemyAI)val3).agent.speed = 4.5f; if (Object.op_Implicit((Object)(object)((Component)hive).GetComponent<MeshRenderer>())) { ((Renderer)((Component)hive).GetComponent<MeshRenderer>()).enabled = false; } if (Object.op_Implicit((Object)(object)((Component)hive).GetComponent<BoxCollider>())) { ((Collider)((Component)hive).GetComponent<BoxCollider>()).enabled = false; } } } } public override void Update() { //IL_0309: 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_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); baseUpdate(); if (Object.op_Implicit((Object)(object)yoinkedPlayer) && ((NetworkBehaviour)yoinkedPlayer).NetworkObject.NetworkObjectId == ((NetworkBehaviour)RoundManager.Instance.playersManager.localPlayerController).NetworkObject.NetworkObjectId) { StartOfRound.Instance.drowningTimer = (float)(enemyRandom.NextDouble() + 0.10000000149011612); } if (!((Behaviour)animator).enabled) { ((Behaviour)animator).enabled = true; } if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } cycleTimer += Time.deltaTime; if (((EnemyAI)this).currentBehaviourStateIndex == 0 || ((EnemyAI)this).currentBehaviourStateIndex == 1 || ((EnemyAI)this).currentBehaviourStateIndex == 5) { if (isUnderground) { if (cycleTimer > undergroundTime) { cycleTimer = 0f; diggingState = 1; hasPlayedDigAnim = false; hasPlayedUndergroundAnim = false; } } else if (cycleTimer > surfaceTime) { cycleTimer = 0f; diggingState = 2; hasPlayedDigAnim = false; hasPlayedUndergroundAnim = false; } } if ((((EnemyAI)this).currentBehaviourStateIndex == 4 || ((EnemyAI)this).currentBehaviourStateIndex == 2) && isUnderground && (double)cycleTimer > 2.5) { cycleTimer = 0f; diggingState = 1; hasPlayedDigAnim = false; hasPlayedUndergroundAnim = false; } if (((EnemyAI)this).currentBehaviourStateIndex == 7) { animator.speed = 1f; } if (diggingState == 1) { digStateTimer += Time.deltaTime; if (!hasPlayedDigAnim) { orangeEmergeClientRpc(); hasPlayedDigAnim = true; } if (digStateTimer > 1.1f) { diggingState = 0; isUnderground = false; hasPlayedDigAnim = false; digStateTimer = 0f; } } else if (diggingState == 2) { digStateTimer += Time.deltaTime; if (!hasPlayedDigAnim) { orangeDigClientRpc(); hasPlayedDigAnim = true; } if (digStateTimer > 1.1f) { diggingState = 0; isUnderground = true; hasPlayedDigAnim = false; digStateTimer = 0f; } } else { digStateTimer = 0f; } AnimatorStateInfo currentAnimatorStateInfo; if (isUnderground && diggingState == 0) { currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("RemainUnderground") && !hasPlayedUndergroundAnim) { undergroundActivateClientRpc(); hasPlayedUndergroundAnim = true; } if (!customMoaiDigSound.isPlaying) { playUndergroundSoundClientRpc(active: true); } } else { hasPlayedUndergroundAnim = false; if (customMoaiDigSound.isPlaying) { playUndergroundSoundClientRpc(active: false); } } currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("RemainUnderground")) { currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("DigUp")) { currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("DigDown")) { return; } } } if (diggingState == 0 && !isUnderground) { playWalkClientRpc(); } } [ClientRpc] public void playWalkClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2811000729u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2811000729u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; animator.Play("Walk"); } } } public async void summonBees(Vector3 position) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) RedLocustBees[] beeArr = Resources.FindObjectsOfTypeAll<RedLocustBees>(); RedLocustBees beeobj = beeArr[0]; Debug.Log((object)("Orange Moai: spawning bee obj: " + ((Object)beeobj).name + " - " + ((object)beeobj).GetType()?.ToString() + " - " + ((object)beeobj).ToString())); GameObject beebase = ((EnemyAI)beeobj).enemyType.enemyPrefab; GameObject bees = Object.Instantiate<GameObject>(beebase, position, Quaternion.identity, new GameObject().transform); ((Renderer)bees.GetComponentInChildren<MeshRenderer>()).enabled = false; bees.GetComponentInChildren<NetworkObject>().Spawn(true); bees.SetActive(true); RedLocustBees comp = bees.GetComponent<RedLocustBees>(); spawnedBees.Add(comp); await Task.Delay((int)(enemyRandom.NextDouble() * 5000.0 + 15000.0)); destroyBeesClientRpc(((NetworkBehaviour)comp).NetworkObject.NetworkObjectId); } public static void moaiSpawnExplosion(Vector3 explosionPosition, float killRange = 1f, float damageRange = 1f, int nonLethalDamage = 50, float physicsForce = 0f, GameObject overridePrefab = null, bool goThroughCar = false) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, explosionPosition); if (num < 14f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else if (num < 25f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } bool flag = false; Collider[] array = Physics.OverlapSphere(explosionPosition, damageRange, 2621448, (QueryTriggerInteraction)2); RaycastHit val = default(RaycastHit); Vector3 val3; PlayerControllerB component; for (int i = 0; i < array.Length; i++) { float num2 = Vector3.Distance(explosionPosition, ((Component)array[i]).transform.position); if (Physics.Linecast(explosionPosition, ((Component)array[i]).transform.position + Vector3.up * 0.3f, ref val, 1073742080, (QueryTriggerInteraction)1) && ((!goThroughCar && ((Component)((RaycastHit)(ref val)).collider).gameObject.layer == 30) || !(num2 <= 4f))) { continue; } if (((Component)array[i]).gameObject.layer == 3 && !flag) { component = ((Component)array[i]).gameObject.GetComponent<PlayerControllerB>(); if ((Object)(object)component != (Object)null && ((NetworkBehaviour)component).IsOwner) { flag = true; if (num2 < killRange) { Vector3 val2 = Vector3.Normalize(((Component)component.gameplayCamera).transform.position - explosionPosition) * 80f / Vector3.Distance(((Component)component.gameplayCamera).transform.position, explosionPosition); PlayerControllerB obj = component; val3 = default(Vector3); obj.KillPlayer(val2, true, (CauseOfDeath)3, 0, val3, false); } else if (num2 < damageRange) { Vector3 val4 = Vector3.Normalize(((Component)component.gameplayCamera).transform.position - explosionPosition) * 80f / Vector3.Distance(((Component)component.gameplayCamera).transform.position, explosionPosition); component.DamagePlayer(nonLethalDamage, true, true, (CauseOfDeath)3, 0, false, val4); } } } else if (((Component)array[i]).gameObject.layer == 19) { EnemyAICollisionDetect componentInChildren = ((Component)array[i]).gameObject.GetComponentInChildren<EnemyAICollisionDetect>(); if ((Object)(object)componentInChildren != (Object)null && ((NetworkBehaviour)componentInChildren.mainScript).IsOwner && num2 < 4.5f && ((Object)((Component)componentInChildren).gameObject).name.ToLower().Contains("moai")) { EnemyAI mainScript = componentInChildren.mainScript; val3 = default(Vector3); mainScript.HitEnemyOnLocalClient(6, val3, (PlayerControllerB)null, false, -1); componentInChildren.mainScript.HitFromExplosion(num2); } } } component = GameNetworkManager.Instance.localPlayerController; if (physicsForce > 0f && Vector3.Distance(((Component)component).transform.position, explosionPosition) < 35f && !Physics.Linecast(explosionPosition, ((Component)component).transform.position + Vector3.up * 0.3f, ref val, 256, (QueryTriggerInteraction)1)) { float num3 = Vector3.Distance(((Component)component).transform.position, explosionPosition); Vector3 val5 = Vector3.Normalize(((Component)component).transform.position + Vector3.up * num3 - explosionPosition) / (num3 * 0.35f) * physicsForce; if (((Vector3)(ref val5)).magnitude > 2f) { if (((Vector3)(ref val5)).magnitude > 10f) { component.CancelSpecialTriggerAnimations(); } if (component.inVehicleAnimation) { val3 = component.externalForceAutoFade + val5; if (!(((Vector3)(ref val3)).magnitude > 50f)) { goto IL_0408; } } PlayerControllerB obj2 = component; obj2.externalForceAutoFade += val5; } } goto IL_0408; IL_0408: VehicleController val6 = Object.FindObjectOfType<VehicleController>(); if ((Object)(object)val6 != (Object)null && !val6.magnetedToShip && physicsForce > 0f && Vector3.Distance(((Component)val6).transform.position, explosionPosition) < 35f) { val6.mainRigidbody.AddExplosionForce(physicsForce * 50f, explosionPosition, 12f, 3f, (ForceMode)1); } int num4 = ~LayerMask.GetMask(new string[1] { "Room" }); num4 = ~LayerMask.GetMask(new string[1] { "Colliders" }); array = Physics.OverlapSphere(explosionPosition, 10f, num4); for (int j = 0; j < array.Length; j++) { Rigidbody component2 = ((Component)array[j]).GetComponent<Rigidbody>(); if ((Object)(object)component2 != (Object)null) { component2.AddExplosionForce(70f, explosionPosition, 10f); } } } [ClientRpc] public void explosionClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2935351581u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2935351581u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; explosionParticles.Play(); explosionImpactSound.Play(); moaiSpawnExplosion(((Component)this).transform.position, 0f, impactRange, impactDamage, impactForce, null, goThroughCar: true); } } } [ClientRpc] public void playUndergroundSoundClientRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(889205728u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 889205728u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (active) { customMoaiDigSound.Play(); } else { customMoaiDigSound.Stop(); } } } [ClientRpc] public void playHitSoundClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(262053526u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 262053526u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; leapHitSounds[enemyRandom.Next(0, leapHitSounds.Length)].Play(); } } } [ClientRpc] public void playPrepareSoundClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2241132640u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2241132640u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; leapPrepareSound.Play(); } } } [ClientRpc] public void orangeDigClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3005134860u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3005134860u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; animator.Play("DigDown"); stopAllSound(); customMoaiDrillSound.Play(); } } } [ClientRpc] public void hopAnimationClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(15556307u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 15556307u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; animator.Play("Hop"); stopAllSound(); } } } [ClientRpc] public void orangeEmergeClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3073668375u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3073668375u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; animator.Play("DigUp"); stopAllSound(); customMoaiDrillSound.Play(); } } } [ClientRpc] public void undergroundActivateClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(314637701u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 314637701u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; animator.Play("RemainUnderground"); } } } private bool ShouldKidnap(PlayerControllerB target) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_0096: 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) if ((Object)(object)target == (Object)null || target.isPlayerDead || (Object)(object)yoinkedPlayer != (Object)null) { return false; } float num = Vector3.Distance(((Component)this).transform.position, ((Component)target).transform.position); if (num > 16.5f) { return false; } Vector3 val = ((Component)this).transform.position - ((Component)target.gameplayCamera).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num2 = Vector3.Dot(((Component)target.gameplayCamera).transform.forward, normalized); float num3 = 0.15f; float num4 = Mathf.Clamp01((0f - num2 - 0.1f) / 0.9f); float num5 = Mathf.Lerp(num3, 1f, num4); float num6 = Random.Range(0f, 1f); return num6 < num5; } public override void DoAIInterval() { //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0622: Unknown result type (might be due to invalid IL or missing references) //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0560: Unknown result type (might be due to invalid IL or missing references) //IL_06f8: Unknown result type (might be due to invalid IL or missing references) //IL_06b3: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } letGoTimer -= 0.2f; if (((EnemyAI)this).isEnemyDead) { if (customMoaiDigSound.isPlaying) { customMoaiDigSound.Stop(); } if (((NetworkBehaviour)RoundManager.Instance).IsHost && Object.op_Implicit((Object)(object)yoinkedPlayer)) { letGoOfPlayerClientRpc(((NetworkBehaviour)yoinkedPlayer).NetworkObject.NetworkObjectId); } return; } if (isUnderground) { if (!undergroundParticleSystem.isEmitting) { ToggleUndergroundParticlesClientRpc(value: true); } } else if (undergroundParticleSystem.isEmitting) { ToggleUndergroundParticlesClientRpc(value: false); } if (((EnemyAI)this).currentBehaviourStateIndex == 6 && sneakingUpOnPlayer) { customMoaiDrillSound.volume = 0.15f * Plugin.moaiGlobalMusicVol.Value; customMoaiDigSound.volume = 0.1f * Plugin.moaiGlobalMusicVol.Value; } else { customMoaiDrillSound.volume = 0.647f * Plugin.moaiGlobalMusicVol.Value; customMoaiDigSound.volume = 0.208f * Plugin.moaiGlobalMusicVol.Value; } List<RedLocustBees> list = new List<RedLocustBees>(); for (int i = 0; i < spawnedBees.Count; i++) { RedLocustBees val = spawnedBees[i]; if ((Object)(object)val == (Object)null) { list.Add(val); } else if (Object.op_Implicit((Object)(object)val.hive)) { moveHiveClientRpc(((NetworkBehaviour)val).NetworkObject.NetworkObjectId); } } for (int j = 0; j < list.Count; j++) { RedLocustBees item = list[j]; spawnedBees.Remove(item); } ((EnemyAI)this).DoAIInterval(); baseAIInterval(); if (Object.op_Implicit((Object)(object)yoinkedPlayer) && yoinkedPlayer.isPlayerDead) { yoinkedPlayer = null; } if (((EnemyAI)this).currentBehaviourStateIndex != 7) { isInLeapSequence = false; } if ((letGoTimer < 0f && (Object)(object)yoinkedPlayer != (Object)null) || ((Object)(object)yoinkedPlayer != (Object)null && yoinkedPlayer.isPlayerDead)) { letGoOfPlayerClientRpc(((NetworkBehaviour)yoinkedPlayer).NetworkObject.NetworkObjectId); } ((EnemyAI)this).agent.acceleration = 8f * Plugin.moaiGlobalSpeed.Value; switch (((EnemyAI)this).currentBehaviourStateIndex) { case 0: baseSearchingForPlayer(); break; case 5: baseHeadingToEntrance(); break; case 1: baseGuard(); break; case 2: baseStickingInFrontOfEnemy(); break; case 3: baseStickingInFrontOfPlayer(); if (Object.op_Implicit((Object)(object)((EnemyAI)this).targetPlayer)) { if (ShouldKidnap(((EnemyAI)this).targetPlayer)) { sneakingUpOnPlayer = true; kidnapImpatienceTimer = kidnapImpatienceDuration; targetToYoink = ((EnemyAI)this).targetPlayer; ((EnemyAI)this).SwitchToBehaviourClientRpc(6); ((EnemyAI)this).StopSearch(((EnemyAI)this).currentSearch, true); } else { ((EnemyAI)this).SwitchToBehaviourClientRpc(7); doneWithLeaps = false; } } break; case 4: baseHeadSwingAttackInProgress(); break; case 7: ((EnemyAI)this).agent.speed = 0f; if (!isInLeapSequence && !doneWithLeaps) { isInLeapSequence = true; ((MonoBehaviour)this).StartCoroutine(DoGroundHopSequence(Random.Range(2, 5))); } else if (doneWithLeaps) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).targetPlayer = null; ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } break; case 6: stopAllSound(); if (!Object.op_Implicit((Object)(object)targetToYoink) || targetToYoink.isPlayerDead || Vector3.Distance(((Component)this).transform.position, ((Component)targetToYoink).transform.position) > 35f) { ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); break; } ((EnemyAI)this).SetDestinationToPosition(((Component)targetToYoink).transform.position, false); if (sneakingUpOnPlayer) { ((EnemyAI)this).agent.speed = 5.3f * Plugin.moaiGlobalSpeed.Value; kidnapImpatienceTimer -= 0.2f; if (isUnderground) { if (Vector3.Distance(((Component)this).transform.position, ((Component)targetToYoink).transform.position) < grabRange * ((Component)this).transform.localScale.x) { sneakingUpOnPlayer = false; diggingState = 1; } } else { diggingState = 2; } if (kidnapImpatienceTimer <= 0f) { cycleTimer = 0f; diggingState = 1; letGoTimer = (float)(enemyRandom.NextDouble() * 25.0 + 2.0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } } else if (isUnderground) { diggingState = 1; } else if (Vector3.Distance(((Component)this).transform.position, ((Component)targetToYoink).transform.position) < grabRange * ((Component)this).transform.localScale.x) { attachPlayerClientRpc(((NetworkBehaviour)targetToYoink).NetworkObject.NetworkObjectId, healPlayer: true); cycleTimer = 0f; diggingState = 2; letGoTimer = (float)(enemyRandom.NextDouble() * 25.0 + 2.0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } else { letGoTimer = (float)(enemyRandom.NextDouble() * 25.0 + 2.0); ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } break; default: LogDebug("This Behavior State doesn't exist!"); break; } } [ClientRpc] public void attachPlayerClientRpc(ulong playerId, bool healPlayer = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3618973511u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref healPlayer, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3618973511u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val3 in allPlayerScripts) { if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == playerId) { yoinkedPlayer = val3; ((Component)val3).transform.position = playerGrabPoint.position; ((Component)val3).transform.parent = playerGrabPoint; val3.playerCollider.enabled = false; if (healPlayer) { val3.DamagePlayer(-30, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } break; } } } [ClientRpc] public void letGoOfPlayerClientRpc(ulong playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(567840958u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 567840958u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = null; RoundManager instance = RoundManager.Instance; PlayerControllerB[] allPlayerScripts = instance.playersManager.allPlayerScripts; foreach (PlayerControllerB val4 in allPlayerScripts) { if (((NetworkBehaviour)val4).NetworkObject.NetworkObjectId == playerId) { val3 = val4; } } ((Component)val3).transform.parent = null; 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; } yoinkedPlayer = null; } [ClientRpc] public void ToggleUndergroundParticlesClientRpc(bool value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1832729899u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1832729899u, val, (RpcDelivery)0); } i